Search packages, repositories and app categories

Package detailsv2.16.0

cli_pkg

Grinder tasks for releasing Dart CLI packages.

macOSWindowsLinux
30-day downloads
75.7K
Likes
23
Pub points
110

Install package

flutter pub add cli_pkg

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

cli_pkg is a Dart package designed to streamline the release process for command-line interface (CLI) packages. It provides Grinder tasks that automate common publishing workflows, such as version management, testing, and generating release notes. Built by sass-lang.com and hosted on GitHub, it supports macOS, Windows, and Linux, making it ideal for developers maintaining cross-platform CLI tools. The package integrates seamlessly with Flutter and Dart ecosystems, reducing manual steps during package releases.

Use cases

  • Automating CLI package releases
  • Managing versioning in CLI projects
  • Generating release notes
  • Cross-platform CLI development
  • Streamlining CI/CD pipelines

Key features

  • Predefined Grinder tasks
  • Version bump automation
  • Release note generation
  • Cross-platform support
  • Integration with Dart pub

Suitable for

  • Dart CLI tool maintainers
  • Open-source package publishers
  • CI/CD pipeline integrators
  • Developers using Grinder
  • Teams managing frequent releases

Considerations

  • Requires Grinder setup
  • Limited to CLI package workflows
  • Dependent on GitHub for release workflows
  • Not suitable for non-CLI packages
  • Needs manual configuration for custom release logic

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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) {
  pkg.addAllTasks();
  grind(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 ConfigVariable fields 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) {
  pkg.name.value = "bot-name";
  pkg.humanName.value = "My App";

  pkg.addAllTasks();
  grind(args);
}

ConfigVariables whose values are expensive to compute or that might fail under some circumstances can also be set to callback functions, which are called lazily when the variables are used by the Grinder tasks:

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

void main(List<String> args) {
  pkg.githubReleaseNotes.fn = () => File.read("RELNOTES.md");

  pkg.addAllTasks();
  grind(args);
}

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.

Categories

Dependencies

Dependency list 25 items

Source repository

Projects using this package