Add Tab-key completion to a custom CLI tool without writing shell scripts.
Show dynamic completion suggestions fetched at the moment the user presses Tab.
Define subcommands and their options using the structured tree API.
Let users install completions for your tool with a single setup command.
| f/omelette | atom/fs-plus | atom/status-bar | |
|---|---|---|---|
| Stars | 1,406 | 107 | 100 |
| Language | CoffeeScript | CoffeeScript | CoffeeScript |
| Last pushed | — | 2022-12-07 | 2022-09-28 |
| Maintenance | — | Dormant | Dormant |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Omelette is a library for adding tab-completion to Node.js or Deno command-line tools. Tab-completion is the feature where you press Tab in a terminal and the shell suggests or fills in the next word for you. Adding this to a custom CLI tool normally requires writing shell-specific scripts, but Omelette handles that complexity so you can describe the completions in JavaScript instead. You define what suggestions to show at each position in the command using a simple template. For example, you can say that after the first argument the user should see a list of actions, and after the second argument they should see a list of usernames read from the file system. Omelette supports Bash, Zsh, and Fish shells. There are a few styles for defining completions. The simplest is a JavaScript template literal where you write the command name and pass arrays of options inline. A more structured option is the tree API, where you pass a nested object describing all the valid subcommands and their sub-options. For dynamic completions, you can provide functions or async functions that fetch options at the moment the user presses Tab. Omelette can also install and uninstall the completion setup automatically by writing the necessary lines into the user's shell configuration file. This means your tool can offer a setup command that users run once, after which completions work in every new terminal session.
A library that adds Tab-key autocompletion to your Node.js or Deno command-line tool, supporting Bash, Zsh, and Fish shells.
Mainly CoffeeScript. The stack also includes CoffeeScript, JavaScript, Node.js.
No license information was found in the material provided.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.