Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

[Docs] Add guide for adding custom autocomplete specs using `autocomplete-tools`

Open line1029 opened this issue 4 weeks ago • 1 comments

Feature Description

Problem:

Currently, there is no official documentation on how to register custom local autocomplete specs (created via withfig/autocomplete and withfig/autocomplete-tools) into kiro-cli. Users who want to add autocompletion for unsupported CLIs or internal tools are left guessing where to place their spec files.

Through trial and error, I discovered that kiro-cli still respects the legacy path ~/.fig/autocomplete/build/<cli-name>.js, but this behavior is not documented anywhere in the Kiro repository.

Proposed Solution:

I would like to request a new documentation section (or a guide in the README) that explicitly explains the workflow for adding custom specs. The guide should cover:

  1. How to scaffold a spec using @fig/autocomplete-tools.
  2. The requirement to compile the TypeScript spec (.ts) into JavaScript (.js).
  3. The correct destination path for the compiled file (currently confirmed as ~/.fig/autocomplete/build/).
  4. Any necessary configuration.

This would greatly help developers extend Kiro's capabilities without having to reverse-engineer the file structure.

Use Case

As a developer, I want to add autocompletion for a custom or unsupported CLI tool (e.g. an internal company tool, custom python script, etc).

  1. I define the autocomplete spec in TypeScript (e.g., my-cli.ts) using @fig/autocomplete-tools.
  2. I consult the Kiro documentation to learn how to load this local spec into the application.
  3. Following the provided guide, I compile the file to JavaScript and place it in the correct directory (e.g., ~/.fig/autocomplete/build/my-cli.js).
  4. I open my terminal, type my-cli, and immediately see the Kiro autocomplete popup appear with my custom suggestions.

Additional Context

No response

line1029 avatar Dec 16 '25 02:12 line1029