Skip to content
pubscout

completion

1.0.2, released a year ago by kevmoo.com

Adds shell command completion support to Dart console apps.

$ flutter pub add completion
Source repository

What it does

Provides a wrapper around ArgParser that registers a hidden "completion" command. The package can generate a shell script to enable tab‑completion for the app’s arguments.

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

Use it when

  • You need tab‑completion for a Dart CLI tool
  • You already use the args package for argument parsing

Skip it when

  • You are building a GUI or web app
  • You need runtime code generation

Strengths

  • Simple drop‑in replacement for ArgParser.parse
  • Works with the standard args package
  • Supports generating completion scripts automatically

Weaknesses

  • Limited to command‑line tools
  • No support for custom completion logic beyond args parsing

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:args/args.dart';
import 'package:completion/completion.dart' as completion;

void main(List<String> args) {
  final parser = ArgParser()..addFlag('verbose', help: 'Enable verbose output');
  final results = completion.tryArgsCompletion(args, parser);
  // use results as usual
}

Alternatives

Packages that do the same job and could replace completion.

  • cli_completion

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

Works with

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