Skip to content
pubscout

cli_completion

0.6.0, released 3 months ago by verygood.ventures

Completion functionality for Dart Command-Line Interfaces built using CommandRunner.

$ flutter pub add cli_completion
Source repository

What it does

Provides tab completion functionality for Dart Command-Line Interfaces built using CommandRunner. Automatically installs or allows manual installation of shell completion files.

AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a custom Dart command-line interface using CommandRunner.
  • You want to provide tab-completion functionality for your CLI users.

Skip it when

  • You are not using CommandRunner for your Dart CLI.

Strengths

  • Automates completion file installation on first run.
  • Supports multiple shells like bash and zsh.

Weaknesses

  • Requires manual zsh setup if not using a framework like Oh My Zsh.
  • Requires fast tracking the completion command if extra checks are run.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
5

Add cli_completion to your dependencies and extend CompletionCommandRunner in your CommandRunner class.

import 'package:cli_completion/cli_completion.dart';

class ExampleCommandRunner extends CompletionCommandRunner<int> {
  // ...
}

Alternatives

Packages that do the same job and could replace cli_completion.

  • completion

    Adds shell command completion support to Dart console apps.

  • cli_util

    Utilities to help build Dart command-line apps, find the SDK, and display progress.

  • cli_tools

    Utilities for building command‑line interfaces, including argument parsing, analytics, and progress reporting.

  • config

    Typed CLI argument and config file parser with env support

Works with

Packages commonly used together with cli_completion: ones it builds on, ones built on it, and its own family.