[Docs] Add guide for adding custom autocomplete specs using `autocomplete-tools`
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:
- How to scaffold a spec using
@fig/autocomplete-tools. - The requirement to compile the TypeScript spec (
.ts) into JavaScript (.js). - The correct destination path for the compiled file (currently confirmed as
~/.fig/autocomplete/build/). - 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).
- I define the autocomplete spec in TypeScript (e.g.,
my-cli.ts) using@fig/autocomplete-tools. - I consult the Kiro documentation to learn how to load this local spec into the application.
- 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). - I open my terminal, type
my-cli, and immediately see the Kiro autocomplete popup appear with my custom suggestions.
Additional Context
No response