Amazon Q Developer CLI Autocomplete Specifications

repository·master·Indexed 12 days ago

https://github.com/withfig/autocomplete

Declarative completion specifications used by Amazon Q Developer CLI (formerly Fig) to provide terminal autocompletion for hundreds of CLI tools. Includes documentation on creating and testing completion specs using TypeScript, pnpm, and the Amazon Q for command line environment.

Tokens
16.8K
Snippets
72
Records
90
Agent score
97%

What's inside Amazon Q Developer CLI Autocomplete

  1. What are completion specs?

    master
    A completion spec is a declarative schema that defines the structure of a CLI tool, including its subcommands, options, and args. Amazon Q uses these schemas to generate contextually relevant suggestions in the terminal.
  2. Contribute a new completion spec

    master

    To create and test your own completion spec, follow these steps. This requires Amazon Q for command line, Node, and pnpm installed on your machine.

    1. Fork the repository.
    2. Clone your fork and set the upstream remote:
      git clone https://github.com/YOUR_GITHUB_USERNAME/autocomplete.git autocomplete
      cd autocomplete
      git remote add upstream https://github.com/withfig/autocomplete.git
    3. Install dependencies:
      pnpm install
    4. Create a new spec (e.g., named abc):
      pnpm create-spec abc
    5. Start development mode to see changes in real-time:
      pnpm dev

    Development Workflow:

    • Edit your spec using TypeScript in the src/ folder.
    • On save, specs are automatically compiled to the build/ folder.
    • In dev mode, specs are read from the build folder, and generators run on every keystroke. To verify, type abc[space] in your terminal.
    # Example workflow for creating a spec named 'abc'
    git clone https://github.com/YOUR_GITHUB_USERNAME/autocomplete.git autocomplete
    cd autocomplete
    git remote add upstream https://github.com/withfig/autocomplete.git
    pnpm install
    pnpm create-spec abc
    pnpm dev
  3. Install Amazon Q Developer CLI

    master

    Amazon Q Developer CLI (formerly Fig) provides IDE-style completions for terminal commands.

    macOS Installation:

    Linux/Windows:

    • Support is currently in progress. Follow the official discussions for updates.

    Important: After installation, you must launch the app to complete the setup.

    brew install amazon-q
  4. Manage App Engine versions with gcloud app versions

    master

    The gcloud app versions command group allows you to view, browse, and delete App Engine versions.

    View and Manage Versions

    • gcloud app versions browse [VERSIONS]: Opens specified versions in a browser.
      • Use --launch-browser (default) to open automatically, or --no-launch-browser to just show the URL.
      • Use --service SERVICE to filter by a specific service.
    • gcloud app versions delete [VERSIONS]: Deletes specified versions.
      • Use --service SERVICE to filter by a specific service.

    Note: VERSIONS is a variadic argument, meaning you can specify multiple versions at once.

    # Browse versions for a specific service
    gcloud app versions browse --service my-service
    
    # Delete multiple versions
    gcloud app versions delete v1 v2
  5. Manage SSL certificates with gcloud

    master

    The gcloud CLI provides several subcommands to manage SSL certificates. These commands allow you to create, delete, describe, list, and update certificates within your Google Cloud project.

    Available Subcommands

    • create: Creates a new SSL certificate.
    • delete <ID>: Deletes an existing SSL certificate by its ID.
    • describe <ID>: Provides detailed information about a specific SSL certificate.
    • list: Lists all available SSL certificates.
    • update <ID>: Updates the properties of an existing SSL certificate.
    gcloud ssl-certificates create ...
    gcloud ssl-certificates delete [ID]
    gcloud ssl-certificates describe [ID]
    gcloud ssl-certificates list
    gcloud ssl-certificates update [ID] ...
  6. Manage domain mappings with gcloud app domain-mappings

    master

    The gcloud app domain-mappings command group allows you to manage domain mappings for your Google Cloud App Engine application. It supports the following subcommands:

    • delete DOMAIN: Deletes a specified domain mapping.
    • describe DOMAIN: Describes a specified domain mapping.
    • list: Lists domain mappings. Supports filtering, sorting, and limiting results.
    • update DOMAIN: Updates an existing domain mapping, including certificate management settings.
  7. Manage App Engine instances with gcloud app instances

    master

    The gcloud app instances command group allows you to view and manage your App Engine instances. It supports several subcommands for lifecycle management and inspection.

    Subcommands

    • delete INSTANCE: Deletes a specified instance. Requires the INSTANCE argument.
    • describe INSTANCE: Displays all data about an existing instance. Requires the INSTANCE argument.
    • disable-debug INSTANCE: Disables debug mode for an instance. If INSTANCE is not specified, it will attempt to select an instance interactively. Requires the INSTANCE argument.
    • enable-debug: Enables debug mode for an instance (note: this only works on the flexible environment).
  8. Manage Capgo Cloud applications

    master

    The app subcommand allows you to manage your applications in Capgo Cloud.

    Commands

    • app add <appId>: Add a new app.
      • Options: -n, --name <name>, -i, --icon <icon>, -a, --apikey <apikey>
    • app delete <appId>: Delete an app.
      • Option: -a, --apikey <apikey>
    • app list: List all apps.
      • Option: -a, --apikey <apikey>
    • app debug <appId>: Listen for live updates events to debug your app.
      • Options: -a, --apikey <apikey>, -d, --device <device>
    • app set <appId>: Update app settings.
      • Options: -n, --name <name>, -i, --icon <icon>, -a, --apikey <apikey>, -r, --retention <retention> (Retention period in days)
    cli app add <appId> [-n <name>] [-i <icon>] [-a <apikey>]
    cli app delete <appId> [-a <apikey>]
    cli app list [-a <apikey>]
    cli app debug <appId> [-a <apikey>] [-d <device>]
    cli app set <appId> [-n <name>] [-i <icon>] [-a <apikey>] [-r <retention>]
  9. Manage Capgo Cloud bundles

    master

    The bundle subcommand is used for handling application bundles, including encryption and zipping.

    Commands

    • bundle delete <bundleId> <appId>: Delete a specific bundle.
      • Option: -a, --apikey <apikey>
    • bundle decrypt <zipPath> <sessionKey>: Decrypt a signed zip bundle.
      • Options: --key <key> (path to private signing key), --key-data <keyData> (Base64 private signing key)
    • bundle encrypt <zipPath>: Encrypt a zip bundle.
      • Options: --key <key>, --key-data <keyData>
    • bundle zip <appId>: Zip a bundle for upload.
      • Option: -p, --path <path> (Path of the folder to upload)
    cli bundle delete <bundleId> <appId> [-a <apikey>]
    cli bundle decrypt <zipPath> <sessionKey> [--key <key>] [--key-data <keyData>]
    cli bundle encrypt <zipPath> [--key <key>] [--key-data <keyData>]
    cli bundle zip <appId> [-p <path>]
  10. Manage Capgo Cloud channels

    master

    The channel subcommand manages deployment channels within Capgo Cloud.

    Commands

    • channel add <channelId> <appId>: Create a new channel.
      • Option: -d, --default: Set the channel as the default.
    • channel delete <channelId> <appId>: Delete a channel.
    • channel list <appId>: List channels for an app.
    • channel currentBundle <channel> <appId>: Get the current bundle for a specific channel.
      • Options: -c, --channel <channel>, -a, --apikey <apikey>, --quiet (print only the bundle version)
    • channel set <channelId> <appId>: Set a channel.
    cli channel add <channelId> <appId> [-d]
    cli channel delete <channelId> <appId>
    cli channel list <appId>
    cli channel currentBundle <channel> <appId> [-c <channel>] [-a <apikey>] [--quiet]
    cli channel set <channelId> <appId>
  11. Manage signing keys

    master

    The key subcommand manages signing keys used for bundle security.

    Commands

    • key save: Save a base64 signing key into your capacitor config (useful for CI).
      • Options: -f, --force (force generate new), --key <key> (path to save in config), --key-data <keyData> (data to save in config)
    • key create: Create a new signing key.
      • Option: -f, --force (force generate new)
    cli key save [-f] [--key <key>] [--key-data <keyData>]
    cli key create [-f]