Completely
Generate shell completion scripts from a JSON description of a command.
Install / Use
/learn @fvictorio/CompletelyREADME
completely
Generate shell completion scripts from a JSON description of a command.
Usage
You can use the CLI to generate scripts:
npm i -g @completely/cli
completely --shell bash completion.json > completion.sh
(Only bash and zsh are supported at the moment.)
For example, given this JSON description:
{
"command": "my-command",
"subcommands": [
{
"command": "draw",
"args": [],
"flags": [{
"type": "string",
"name": "color",
"completion": {
"type": "oneOf",
"values": ["red", "green", "blue"]
}
}]
}
]
}
If you generate a completion.sh file and source it, you'll get some completion suggestions:
source completion.sh
my-command # pressing <tab> will complete "draw"
my-command draw --color # pressing <tab><tab> will suggest "red", "green" and "blue"
You can also use the library directly:
npm i @completely/bash-generator
import { generate } from '@completely/bash-generator'
import completionSpec from './completion.json'
const script = generate(completionSpec)
console.log(script)
JSON description
You can check the spec package to learn more about how to describe a command with a JSON file. Ideally you wouldn't need to do this manually, since this JSON is meant to be an internal representation generated by other means.
Related Skills
node-connect
354.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
112.2kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
review-duplication
100.8kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
