SkillAgentSearch skills...

Completion.dart

A packaged to add shell command completion to your application

Install / Use

/learn @kevmoo/Completion.dart
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Add shell command completion to your Dart console applications.

Dart CI pub package package publisher

To use this package, instead of this:

import 'package:args/args.dart';

void main(List<String> args) {
  final argParser = ArgParser()..addFlag('option', help: 'flag help');
  // ... add more options ...
  final argResults = argParser.parse(args);
  // ...
}

do this:

import 'package:args/args.dart';
import 'package:completion/completion.dart' as completion;

void main(List<String> args) {
  final argParser = ArgParser()..addFlag('option', help: 'flag help');
  // ... add more options ...
  final argResults = completion.tryArgsCompletion(args, argParser);
  // ...
}

(The only difference is calling complete.tryArgsCompletion in place of argParser.parse)

This will add a "completion" command to your app, which the shell will use to complete arguments.

To generate the setup script automatically, call generateCompletionScript with the names of the executables that your Dart script runs as (typically just one, but it could be more), along with the target Shell.

Also, see the example.

View on GitHub
GitHub Stars60
CategoryDevelopment
Updated3d ago
Forks11

Languages

Dart

Security Score

95/100

Audited on Apr 6, 2026

No findings