dcli
  • Introduction
  • What does DCli do?
  • Install DCli
    • Installing on Windows
  • Writing your first CLI app
  • Add DCli to your project
  • pub.dev
  • github
  • Dart basics
    • Dart lambda functions
    • Function Arguments
    • Futures
    • stdin/stdout/stderr a primer
  • Tour
    • Overview
    • Using DCli functions
    • User input
      • Ask Validators
    • Displaying information
    • Managing Files And Directories
    • Environment variables
    • Calling apps
    • Redirecting output
    • Command Line Arguments
    • Paths
    • Glob Expansion
    • Piping
    • Locking
    • Fetch
    • The evils of CD
    • Assets/Resources
    • Cross Platform
      • Posix
      • Windows
      • Docker
        • Detecting Docker
        • Add DCli to a Docker Container
        • Example DCli app in Docker
  • Elevated Privileges
    • Sudo
  • Performance
  • Dependency Management
    • Dependency Management
    • Pubspec Managment
  • DCli Tools
    • DCli tools
    • Use a shebang #!
    • DCli Compile
    • DCli Clean
    • DCli Create
    • DCli Doctor
    • DCli Install
    • DCli Run
    • DCli Warmup
    • DCli Pack
    • Upgrade DCli
  • Internal Workings
    • Internal Workings
    • waitForEx
  • Contributing
    • Creating a release
    • Running Unit tests
    • Implemention support for a shell
    • Templates
  • References
  • Examples
    • Projects
    • Code
      • hello world.
      • dcompress
      • dpath
      • dmysql
      • dshell
      • dwhich
      • dipaddr
      • gnome launcher
  • Articles
    • build CLI apps in dart - part 1
    • build CLI apps in dart - part 2
    • Dealing with permissions
    • 3rd Party console packages
  • Dart on Linux - the perfect CLI tooling
  • Improving your build environment
    • Existing tooling
    • Building with Dart
    • A home for your build tools
  • Olivier Revial - CLI apps made easy
  • Video: package of the week
Powered by GitBook
On this page
  • Option 1) Use DCli library from your project
  • Option 2) Install Dart/DCli
  • Option 3) Install Dart/DCli
  • Install VSCode

Was this helpful?

Install DCli

PreviousWhat does DCli do?NextInstalling on Windows

Last updated 1 year ago

Was this helpful?

To get started with DCli you first need to install Dart and optionally the DCli tools.

If you just want to use the DCli library then you don't need to install the .

There are three methods for installing Dart and the DCli tools.

Option 1) Use DCli library from your project

If you only want to use the DCli library then you can add DCli to your pubspec.yaml as you would any other package.

cd /my/dart/project
dart pub add dcli

Option 2) Install Dart/DCli

Start by installing Dart as per:

Install Dart from:

If you want to use the , including Shebang (#!) support you need to globally activate DCli.

Now activate the DCli tools:

dart pub global activate dcli
dcli install

Option 3) Install Dart/DCli

This is still a work in progress but is intended to provide a three-line script to install Dart and the DCli tools.

wget https://github.com/onepub-dev/dcli/releases/download/latest.linux/dcli_install
chmod +x dcli_install
sudo ./dcli_install
curl https://github.com/onepub-dev/dcli/releases/download/latest.windows/dcli_install.exe
dcli_install.exe
Coming soon:

curl https://github.com/onepub-dev/dcli/releases/download/latest.osx/dcli_install
dcli_install.exe

Install VSCode

You can use virtually any editor to create DCli scripts but we use and recommend Visual Studio Code (vscode) with the Dart-Code plugin.

Now install the vs code extension for Dart - Dart Code:

We use and recommend the following additional vscode extensions:

  • Dart-Code.flutter

  • dart-import

  • pubspec-assist

  • vscode-browser-preview

  • bracket-pair-colorizer

  • LogFileHighlighter

Install Visual Studio Code from:

Install Dart-Code from:

DCli tools
https://dart.dev/get-dart
DCli tools
https://code.visualstudio.com/download
dartcode.org