dcli
10.4.7, released 3 weeks ago by onepub.dev
A Dart SDK for building cross‑platform command line applications and scripts.
What it does
Provides APIs for creating CLI tools, handling arguments, I/O, compilation to native executables, and remote deployment. Includes utilities like ask, file handling, and system interactions.
AI-written summary of version 10.4.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to write a Dart based CLI tool or script.
- You want to compile Dart scripts into single‑file executables.
- Cross‑platform console apps are required (Windows, macOS, Linux).
Skip it when
- You only need simple shell commands without a Dart runtime.
- You require a GUI or Flutter widget library.
Strengths
- Cross‑platform support with native compilation.
- Rich set of console utilities (prompt, file ops, permissions).
- Integrates with Dart's ecosystem and null‑safety.
Weaknesses
- Relies on Dart SDK; adds size overhead for compiled binaries.
- Limited to console use; not suitable for UI or web.
Setup
- Kind
- FFI (native library)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 34
import 'package:dcli/dcli.dart';
void main() {
var name = ask('name:', required: true, validator: Ask.alpha);
print('Hello $name');
}Alternatives
Packages that do the same job and could replace dcli.
- ansix
Provides ANSI color, text styling, grid, and tree view tools for Dart and Flutter.
63Compare - cli_script
Write shell-like scripts in Dart with support for subprocesses, pipelining, and streams.
50Compare
Works with
Packages commonly used together with dcli: ones it builds on, ones built on it, and its own family.
- archivedcli depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- yamldcli depends on itA Dart library for parsing YAML documents into Dart data structures.
- cryptodcli depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- pub_semverdcli depends on itVersions and version constraints implementing pub's versioning policy.
- uuiddcli depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- mimedcli depends on itUtilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
- stack_tracedcli depends on itProvides parsing, inspection, and readable formatting of Dart stack traces.
- globdcli depends on itA file and directory globbing library that supports Bash-style path matching and listing.