Skip to content

feat(spec): add Kiro / Amazon Q CLI autocomplete spec#6

Merged
bthnkucuk merged 4 commits into
mainfrom
feat/amazon-q-autocomplete-spec
May 18, 2026
Merged

feat(spec): add Kiro / Amazon Q CLI autocomplete spec#6
bthnkucuk merged 4 commits into
mainfrom
feat/amazon-q-autocomplete-spec

Conversation

@bthnkucuk

@bthnkucuk bthnkucuk commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a Fig.Spec autocomplete spec for fastlane_cli consumed by Amazon Q
Developer CLI for command line
(formerly Fig) and Kiro CLI. Surfaces
inline AI ghost-text + rich dropdown completions for every subcommand,
option, and argument exposed by lib/src/cli/.

  • New: dist/amazon-q-spec/fastlane_cli.ts — the spec itself.
  • New: dist/amazon-q-spec/README.md — how to test locally, how to
    typecheck standalone, where the upstream copy lives.
  • One-line mention in the root README.md pointing users at the spec dir.
  • Version bump to 0.2.0 in pubspec.yaml + dist/homebrew/Formula/fastlane_cli.rb
    per the fastlane-cli-version-bump skill
    (new shipped surface => minor).

Why a copy lives here

The spec is mirrored upstream at withfig/autocomplete/src/fastlane_cli.ts
(the spec collection consumed by Q + Kiro). Tracking it in our own repo
means:

  1. It travels with the CLI version it describes.
  2. Drift between code and spec gets caught by the same reviewers who own
    lib/src/cli/*_command.dart.
  3. Users can opt into the spec before the upstream PR lands by pointing
    their local dev-mode autocomplete clone at this file.

Generator pattern (no static action lists)

The run <action-id> arg and list --category <id> arg both use a
generator that runs fastlane_cli list --json and parses the result. The
JSON shape (id, title, description, category) is emitted by
list_command.dart. Cached for 5s inside the autocomplete runtime.

This means the spec never goes stale when consumers add custom
actions in their cli_profile.yaml — the dropdown reflects whatever
fastlane_cli list --json reports.

Opt-in (local dev-mode)

Until the upstream PR is merged, users can preview the spec locally:

git clone https://github.com/<you>/autocomplete.git
cd autocomplete && pnpm install
cp <fastlane_cli>/dist/amazon-q-spec/fastlane_cli.ts src/
pnpm dev
# In another terminal: type `fastlane_cli ` and hit space.

Upstream PR

Sibling PR against withfig/autocomplete:
withfig/autocomplete#2625

Test plan

  • fvm dart analyzeNo issues found!
  • fvm dart test — 193/193 passing
  • TypeScript typecheck (TS ~5.5.4 + @withfig/autocomplete-types@^1.31.0):
    passes against the entire upstream src/ tree.
  • prettier --check against the upstream config: passing.
  • Every flag in the spec maps 1:1 to an option declared in the
    matching lib/src/cli/*_command.dart.
  • fastlane_cli list --json shape confirmed in code: id,
    title, description, category.

bthnkucuk added 2 commits May 19, 2026 02:38
Add `dist/amazon-q-spec/fastlane_cli.ts` — a Fig.Spec mirror of every
subcommand, option, and argument in `lib/src/cli/`. The `run` and
`list --category` arguments use a generator that shells out to
`fastlane_cli list --json` so action ids never go stale when consumers
add custom entries in their `cli_profile.yaml`.

Companion `dist/amazon-q-spec/README.md` explains local dev-mode testing
and standalone typecheck. The canonical destination is
`withfig/autocomplete/src/fastlane_cli.ts`; the upstream PR is a sibling
of this one.

Bumps `pubspec.yaml` + the homebrew formula draft to 0.2.0 per the
fastlane-cli-version-bump skill (new shipped surface = minor bump).
@bthnkucuk
bthnkucuk merged commit d93db03 into main May 18, 2026
5 checks passed
@bthnkucuk
bthnkucuk deleted the feat/amazon-q-autocomplete-spec branch May 21, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant