cli_pkg 1.0.0-beta.5

Dart CLI Packager #

This package provides a set of Grinder tasks that make it easy to release a Dart command-line application on many different release channels, to Dart users and non-Dart users alike. It also integrates with Travis CI to make it easy to automatically deploy packages.

To use this package, import package:cli_pkg/cli_pkg.dart and call pkg.addAllTasks() before calling grind():

import 'package:cli_pkg/cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) {

The following sets of tasks are provided, each of which can also be enabled individually:

It's strongly recommended that this package be imported with the prefix pkg.

Configuration #

This package is highly configurable, using properties defined [at the top level of the library][]. By default, it infers as much configuration as possible from the package's pubspec, but almost all properties can be overridden in the main() method:

import 'package:cli_pkg/cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) { = "bot-name";
  pkg.humanName = "My App";


Each task describes exactly which configuration variables it uses. Configuration that just applies to one set of tasks is always prefixed with a corresponding name. For example, pkg.jsFlags applies to JavaScript compilation.

1.0.0-beta.5 #

  • Use the correct URL when fetching GitHub release metadata.

1.0.0-beta.4 #

  • Add a pkg.npmDistTag getter that controls the distribution tag for an npm release.

  • Add a pkg.homebrewCreateVersionedFormula getter that controls whether the Homebrew release creates a new formula or updates an existing one.

  • Run pub publish --force so it doesn't hang forever.

  • Properly parse GitHub repositories from HTTP URLs ending in .git.

  • Drop support for Mac OS ia32 packages, since Dart 2.7 doesn't support them anymore.

1.0.0-beta.3 #

  • Add a cli_pkg/testing.dart library to make it easier for users to efficiently and reliably test their executables.

1.0.0-beta.2 #

  • Add a pkg-standalone-dev task for building a script that can be invoked for testing.

  • Fix a bug where the version variable wouldn't be set for certain executables.

1.0.0-beta.1 #

  • Initial beta release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  cli_pkg: ^1.0.0-beta.5

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:cli_pkg/cli_pkg.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (package_config).

The package description is too short. (-14 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and cli_pkg.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
archive >=1.0.0 <3.0.0 2.0.13
async >=1.13.0 <3.0.0 2.4.0
charcode ^1.1.0 1.1.3
collection >=1.8.0 <2.0.0 1.14.12
crypto ^2.0.0 2.1.4
grinder ^0.8.0 0.8.3+1
http >=0.11.0 <0.13.0 0.12.0+4
js ^0.6.0 0.6.1+1
meta ^1.1.7 1.1.8
mustache ^1.0.0 1.1.1
node_preamble ^1.1.0 1.4.8
package_config ^1.1.0 1.1.0 2.0.0
path ^1.0.0 1.6.4
pub_semver ^1.0.0 1.4.3
pubspec_parse ^0.1.0 0.1.5
string_scanner ^1.0.0 1.0.5
test ^1.0.0 1.12.0
test_process ^1.0.0 1.0.5
xml ^3.6.0 3.7.0
yaml ^2.0.0 2.2.0
Transitive dependencies
_fe_analyzer_shared 1.0.3
analyzer 0.39.4
args 1.5.2
boolean_selector 2.0.0
checked_yaml 1.0.2
cli_util 0.1.3+2
convert 2.1.1
coverage 0.13.6
csslib 0.16.1
glob 1.2.0
html 0.14.0+3
http_multi_server 2.2.0
http_parser 3.1.3
io 0.3.3
json_annotation 3.0.1
logging 0.11.4
matcher 0.12.6
mime 0.9.6+3
multi_server_socket 1.0.2
node_interop 1.0.3
node_io 1.0.1+2
package_resolver 1.0.10
petitparser 3.0.1
pool 1.4.0
shelf_packages_handler 1.0.4
shelf_static 0.2.8
shelf_web_socket 0.2.3
source_map_stack_trace 1.1.5
source_maps 0.10.9
source_span 1.6.0
stack_trace 1.9.3
stream_channel 2.0.0
term_glyph 1.1.0
test_api 0.2.14
test_core 0.3.0
typed_data 1.1.6
vm_service 2.3.1
watcher 0.9.7+13
web_socket_channel 1.1.0
webkit_inspection_protocol 0.5.0
Dev dependencies
pedantic ^1.6.0 1.9.0
shelf ^0.7.0 0.7.5
shelf_test_handler ^1.0.0
test_descriptor ^1.2.0
tuple ^1.0.0