Skip to content

Latest commit

 

History

History
84 lines (60 loc) · 2.78 KB

README.md

File metadata and controls

84 lines (60 loc) · 2.78 KB


os Signup Documentation Discord Twitter

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

😊 Need Help?

Email [email protected]

Join our community