{"id":19197161,"url":"https://github.com/verygoodopensource/cli_completion","last_synced_at":"2025-04-07T11:08:01.683Z","repository":{"id":64470839,"uuid":"554827131","full_name":"VeryGoodOpenSource/cli_completion","owner":"VeryGoodOpenSource","description":"Completion functionality for Dart Command-Line Interfaces built using CommandRunner.  Built by Very Good Ventures. 🦄","archived":false,"fork":false,"pushed_at":"2024-12-20T20:16:02.000Z","size":803,"stargazers_count":49,"open_issues_count":6,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-31T10:03:10.980Z","etag":null,"topics":["cli","command-line","completion","dart"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/cli_completion","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VeryGoodOpenSource.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-20T13:15:18.000Z","updated_at":"2025-02-26T19:13:03.000Z","dependencies_parsed_at":"2023-02-09T16:46:07.646Z","dependency_job_id":"5000c803-307f-48a0-b2f4-904bf71789b4","html_url":"https://github.com/VeryGoodOpenSource/cli_completion","commit_stats":{"total_commits":68,"total_committers":9,"mean_commits":7.555555555555555,"dds":0.3970588235294118,"last_synced_commit":"a5fd3235612edd322097fb43ebe5381bb94825d7"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fcli_completion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fcli_completion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fcli_completion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VeryGoodOpenSource%2Fcli_completion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VeryGoodOpenSource","download_url":"https://codeload.github.com/VeryGoodOpenSource/cli_completion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640463,"owners_count":20971557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","completion","dart"],"created_at":"2024-11-09T12:15:43.146Z","updated_at":"2025-04-07T11:08:01.650Z","avatar_url":"https://github.com/VeryGoodOpenSource.png","language":"Dart","readme":"\n# CLI Completion\n\n[![Very Good Ventures][logo_black]][very_good_ventures_link_light]\n[![Very Good Ventures][logo_white]][very_good_ventures_link_dark]\n\n\n[![ci][ci_badge]][ci_link]\n[![coverage][coverage_badge]][ci_link]\n[![pub package][pub_badge]][pub_link]\n[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]\n[![License: MIT][license_badge]][license_link]\n\n---\n\n![screen][screen_gif]\n\nCompletion functionality for Dart Command-Line Interfaces built using `CommandRunner`.\n\nDeveloped with 💙 by [Very Good Ventures][very_good_ventures_link] 🦄\n\n\n## Installation 💻\n\n**❗ In order to start using CLI Completion you must have the [Dart SDK][dart_install_link] installed\non your machine.**\n\n```\nflutter pub add cli_completion\n```\n\n\n\n## Usage ✨\n\nOn your `CommandRunner` class, extend `CompletionCommandRunner` :\n\n```dart\nimport 'package:cli_completion/cli_completion.dart';\n\nclass ExampleCommandRunner extends CompletionCommandRunner\u003cint\u003e {\n...\n```\nThis will make the first command run to install the completion files automatically. To disable that behavior, set `enableAutoInstall` to false:\n\n```dart\nclass ExampleCommandRunner extends CompletionCommandRunner\u003cint\u003e {\n  \n  @override\n  bool get enableAutoInstall =\u003e false;\n...\n```\n\nWhen `enableAutoInstall` is set to false, users will have to call `install-completion-files` to install these files manually.\n\n```bash\n$ example_cli install-completion-files\n```\n\n## Documentation 📝\n\nFor an overview of how this package works, check out the [documentation][docs_link].\n\n---\n\n## Troubleshooting 🧠🔨\n\n### Tab completion is taking too long\n\nHandling completion requests should be straightforward.\n\nIf there are any checks (like analytics, telemetry, or anything that you may have on `run` or `runCommand` overrides) before running subcommands, make sure you fast track the `completion` command to skip all of the unnecessary computations.\n\nExample:\n\n```dart\n@override\nFuture\u003cint?\u003e runCommand(ArgResults topLevelResults) async {\n  if (topLevelResults.command?.name == 'completion') {\n    super.runCommand(topLevelResults);\n      return;\n  }\n  // ... analytics and other unrelated stuff \n```\n\n### Tab completion is not working on my zsh terminal\n\nIf you are not using any zsh framework such as [Oh My Zsh][oh_my_zsh], you have to start the completion system manually.\n\nAdd the following lines to your `~/.zshrc` file:\n\n```zsh\n# Add this to the start of your zsh starter file (~/.zshrc)\nautoload -Uz compinit\ncompinit\n```\n\n[dart_install_link]: https://dart.dev/get-dart\n[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[license_link]: https://opensource.org/licenses/MIT\n[screen_gif]: https://raw.githubusercontent.com/VeryGoodOpenSource/cli_completion/main/doc/screen.gif\n[logo_black]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_black.png#gh-light-mode-only\n[logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only\n[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg\n[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis\n[very_good_ventures_link]: https://verygood.ventures\n[very_good_ventures_link_light]: https://verygood.ventures#gh-light-mode-only\n[very_good_ventures_link_dark]: https://verygood.ventures#gh-dark-mode-only\n[very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows\n[docs_link]: https://github.com/VeryGoodOpenSource/cli_completion/tree/main/doc\n[pub_link]: https://cli_completion.pckg.pub\n[pub_badge]: https://img.shields.io/pub/v/cli_completion.svg\n[coverage_badge]: https://raw.githubusercontent.com/VeryGoodOpenSource/cli_completion/main/coverage_badge.svg\n[ci_badge]: https://github.com/VeryGoodOpenSource/cli_completion/workflows/ci/badge.svg\n[ci_link]: https://github.com/VeryGoodOpenSource/cli_completion/actions\n[oh_my_zsh]: https://ohmyz.sh/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodopensource%2Fcli_completion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverygoodopensource%2Fcli_completion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodopensource%2Fcli_completion/lists"}