@withfig/autocomplete-tools
v2.10.0
Published
Command line tools for working with fig autocomplete specs
Downloads
1,806
Keywords
Readme
Fig Autocomplete Boilerplate Repo
Looking to build Fig autocomplete for private CLI tools, scripts, or NPM packages? This npx module makes it easy to build Fig autocomplete specs and share them specs with your team.
This repo is similar to a minimal version of our public specs repo,
withfig/autocomplete, except with an empty src/
folder.
Usage
Init the .fig folder
Go to the directory that contains your CLI tool, script, or NPM package and run the following
npx @withfig/autocomplete-tools init
This will create initialise a .fig/
folder in your current working directory like the following
cli/
├── .fig/
│ └── autocomplete/
│ ├── src/ # where you edit your completion specs
│ ├── build/ # where your specs compile to
│ ├── .eslintrc.js
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── node_mod/
└── my_cli_tool.sh
Create, test, and compile specs
cd
into the .fig/autocomplete/
folder and run the remaining commands as package.json scripts
# Make a new empty completion spec object in src/
npm run create-spec
# Start dev mode to see live updates to your spec in your terminal as you edit.
npm run dev
# Compile your specs from the src/ folder to build/
npm run build
Push Specs to Fig's Cloud
Coming soon
Documentation
- Building your first autocomplete spec
- Personal shortcut autocomplete
- Autocomplete for teams / internal CLI tools
- Autocomplete for local scripts
😊 Need Help?
Email [email protected]