dcli
Search…
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
Displaying information
Managing Files And Directories
Environment variables
Calling apps
Command Line Arguments
Paths
Glob Expansion
Piping
Locking
Fetch
The evils of CD
Assets/Resources
Cross Platform
Elevated Privileges
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
References
Examples
Projects
Code
Articles
build CLI apps in dart - part 1
build CLI apps in dart - part 2
Dealing with permissions
Dart on Linux - the perfect CLI tooling
Improving your build environment
Olivier Revial - CLI apps made easy
Video: package of the week
Powered By
GitBook
Install DCli
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
DCli tools
.
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.
From the CLI run:
1
cd
myproject
2
dart pub
add
dcli
Copied!
Which adds dcli to your pubspec.yaml (with the latest version).
1
dependencies
:
2
dcli
:
1.30.2
Copied!
Check onepub.dev for the latest version no.
https://onepub.dev/packages/dcli
Option 2) Install Dart/DCli
Start by installing Dart as per:
Install Dart from :
https://dart.dev/get-dart
If you want to use the
DCli tools
, including Shebang (#!) support you need to globally activate DCli.
Now activate the DCli tools:
1
dart pub global activate dcli
2
dcli install
Copied!
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.
Linux
Windows
OSX
1
wget https://github.com/noojee/dcli/releases/download/latest.linux/dcli_install
2
chmod +x dcli_install
3
sudo ./dcli_install
Copied!
1
curl https://github.com/bsutton/dcli/releases/download/latest.windows/dcli_install.exe
2
dcli_install.exe
Copied!
1
Coming soon:
2
3
curl https://github.com/bsutton/dcli/releases/download/latest.osx/dcli_install
4
dcli_install.exe
Copied!
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.
Install Visual Studio Code from:
https://code.visualstudio.com/download
Now install the vscode extension for Dart - Dart Code:
Install Dart-Code from:
dartcode.org
We use and recommend the following additional vscode extensions:
Dart-Code.flutter
dart-import
pubspec-assist
vscode-browser-preview
bracket-pair-colorizer
LogFileHighlighter
Previous
What does DCli do?
Next
Installing on Windows
Last modified
9d ago
Copy link
Contents
Option 1) Use DCli library from your project
Option 2) Install Dart/DCli
Option 3) Install Dart/DCli
Install VSCode