dcli

所属分类:工具库
开发工具:Dart
文件大小:0KB
下载次数:0
上传日期:2023-07-02 06:39:32
上 传 者sh-1993
说明:  一个广泛的库和工具,用于使用Dart编程语言构建控制台cli应用程序和脚本。,
(An extensive library and tooling for building console cli applications and scripts using the Dart programming language.,)

文件列表:
.vscode/ (0, 2023-12-10)
.vscode/launch.json (2192, 2023-12-10)
.vscode/settings.json (3, 2023-12-10)
CONTRIBUTING.md (20, 2023-12-10)
SECURITY.md (16, 2023-12-10)
dcli.code-workspace (109, 2023-12-10)
dcli/ (0, 2023-12-10)
dcli/.dockerignore (14, 2023-12-10)
dcli/.pubignore (119, 2023-12-10)
dcli/CHANGELOG.md (77496, 2023-12-10)
dcli/CONTRIBUTING.md (116, 2023-12-10)
dcli/LICENSE (1062, 2023-12-10)
dcli/SECURITY.md (392, 2023-12-10)
dcli/analysis_options.yaml (82, 2023-12-10)
dcli/bin/ (0, 2023-12-10)
dcli/bin/dcli.dart (403, 2023-12-10)
dcli/dart_test.yaml (163, 2023-12-10)
dcli/example/ (0, 2023-12-10)
dcli/example/dshell.dart (1624, 2023-12-10)
dcli/example/dshell_advanced.dart (1688, 2023-12-10)
dcli/example/dsort.dart (5173, 2023-12-10)
dcli/example/example.dart (4198, 2023-12-10)
dcli/example/example.md (13315, 2023-12-10)
dcli/example/kill_tomcat.dart (829, 2023-12-10)
dcli/example/read_stdin.dart (374, 2023-12-10)
dcli/example/tryme.dart (932, 2023-12-10)
... ...

[![pub package](https://img.shields.io/pub/v/dcli.svg)](https://pub.dev/packages/dcli) ![Pub Version (including pre-releases)](https://img.shields.io/pub/v/dcli?include_prereleases) [![pub publisher](https://img.shields.io/pub/publisher/dcli)](https://pub.dev/packages/dcli) ![Pub Likes](https://img.shields.io/pub/likes/dcli) ![Pub Popularity](https://img.shields.io/pub/popularity/dcli) ![Pub Points](https://img.shields.io/pub/points/dcli) # README See the online [documentation](https://dcli.onepub.dev) for DCli DCli is an API and tooling for building cross platform command line \(CLI\) applications and scripts using the Dart programming language. DCli - pronounced d-cli # Overview DCli is intended to to allow you to create Command Line (CLI) Applications from simple scripts to full blown CLI apps. DCli is a great replacement for CLI apps that would have traditionally been built with Bash, C, python, ruby, Go, Rust .... Whether its a 5 line Bash script or a 100,000 line production management system (like we run internally) DCli is the right place to start building your CLI infrastructure. # So why DCli? DCli is based on Dart which is a modern programming language that has a set of features that makes building CLI apps easy and reliable. * Dart and DCli are simple to learn * Compiled or JIT * Shebang support (run .dart scripts directly from the cli ./hello.dart) * Small transportable execs (from 10MB), Dart VM is NOT required on target system. * Typesafe language catches errors at compile time * Sound null safety reduces null pointer exceptions * Fast * Great development environment using vs-code * Local and Remote development/debugging * Cross platform supporting Linux/Windows/osx/arm # Sponsored by OnePub Help support DCli by supporting [OnePub](https://onepub.dev), the private dart repository. OnePub allows you to privately share dart packages between your own projects or with colleagues. Try it for free and publish your first private package in seconds. https://onepub.dev Publish a private package in six commands: ```bash dart pub global activate onepub onepub login dcli create --template=full myclipackage cd myclipackage onepub pub private dart pub publish ``` You can now activate your dcli script from any system with dart installed ```bash dart pub global activate onepub onepub login onepub pub global activate myclipackage ``` # Example: ```dart #! /usr/bin/env dcli import 'dart:io'; import 'package:dcli/dcli.dart'; void main() { var name = ask('name:', required: true, validator: Ask.alpha); print('Hello $name'); } ``` To run the above script called hello.dart: `./hello.dart` # So why is DCli different? DCli is based on the relatively new programming language; [Dart](https://dart.dev/). Dart is currently the [fastest growing language](https://www.linkedin.com/pulse/google-dart-tops-githubs-list-fastest-growing-2019-bill-detwiler#:~:text=According%20to%20GitHub%27s%20annual%20%22The,tagged%20with%20a%20primary%20language) on github and is the basis on which Flutter is built. [Ubuntu has just announced](https://medium.com/flutter/announcing-flutter-linux-alpha-with-canonical-19eb824590a9) that Flutter will be the primary platform for building GUI's on Ubuntu and is currently working on replacing the Ubuntu installer using Flutter. You can now use Dart to build GUI's on Android, IOS, Windows, OSX, Linux and the Web, server side applications and with DCli you can also target console apps. Imagine the benefits of using a single language across you complete ecosystem. Dart is a simple to learn, and uses the all too familiar 'C' style syntax. I've heard Dart described as the love child of Java and JavaScript. If you come from either of these environments you will find Dart easy to work with. Being easy to learn also helps with the maintenance cycle of you CLI apps. You no longer need a specialised developer, as anyone that has even a vague familiarity with Java, Javascript or C, ... will be right at home with Dart in a couple of days. Dart and DCli are easy to install; DCli makes it a breeze to create simple scripts and provides the tools to manage a script that started out as 100 lines but somehow grew to 10,000 lines. Dart has is also a large and growing ecosystem of [third party libraries](https://pub.dev/) that you can include in your CLI app with no more than an import statement and a dependency declaration. Dart is fast and if you need even more speed it can be compiled to a single file executable that is portable between binary compatible machines. ```bash # compile, install to the local PATH and run hello.dart $> dcli compile --install hello.dart $> hello name: brett Hello brett # copy to a remote machine (where dart is NOT installed) $> scp hello remote.domain.com: # login to remote machine and run the app hello $> ssh remote.domain.com ./hello name: brett Hello brett ``` You can use your favourite editor to create DCli scripts. Vi or VIM work fine but Visual Studio Code is recommended. Use Visual Studio Code for the best development experience with Dart. Visual Studio Code with the dart-code extension provide a great development an debugging experience including the ability to develop and debug code on a remote server. # Contributing Read the [contributing guide](https://dcli.onepub.dev/contributing) for details on how to get involved.

近期下载者

相关文件


收藏者