@pi-unipi/command-enchantment
Enhanced TUI autocomplete for /unipi:* commands — colored, sorted, and grouped by package
Package details
Install @pi-unipi/command-enchantment from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@pi-unipi/command-enchantment- Package
@pi-unipi/command-enchantment- Version
3.0.3- Published
- Nov 4, 2026
- Downloads
- 3,373/mo · 622/wk
- Author
- neuron-mr-white
- License
- MIT
- Types
- extension
- Size
- 32.3 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"skills": [],
"themes": [],
"prompts": [],
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Command Enchantment
Command Enchantment makes /unipi:* suggestions in the editor easy to scan, with package tags, colors and a stable order.
@pi-unipi/command-enchantment · part of UniPi · source folder packages/autocomplete
What it does
- Adds a colored package tag, for example
[workflow], to each/unipi:*suggestion. The tag replaces the pi source tag. - Sorts suggestions by match quality: exact, then prefix, then fuzzy.
- Puts
/unipi:settingsfirst when you type/settings. - Hides
/skill:*suggestions until you type/skill:. - Keeps argument suggestions for
/unipi:*commands, also when you press Tab after a space.
Quick start
Command Enchantment ships in @pi-unipi/unipi. To install it alone:
pi install npm:@pi-unipi/command-enchantment
- Type
/unipi:in the editor. - Read the package tag next to each suggestion.
- Type a short name, for example
/plan. The exact match/unipi:plancomes first.
The package has no commands and no agent tools.
Settings
Open /unipi:settings → Command Enchantment. The namespace is command-enchantment.
| Key | Default | What it does |
|---|---|---|
autocompleteEnhanced |
true |
Turns the enhanced suggestions on or off. Applies at the next session start. |
With false, the package does not add its provider. Pi suggestions stay as they are.
How it works
At session start, Command Enchantment wraps the pi autocomplete provider. It changes only text that starts with /. Other text goes to the pi provider without a change.
For a command name, it uses this order:
- A UniPi command that replaces a pi command with the same name (
settings). - An exact match of the full command.
- An exact match of the short name after
unipi:. - A prefix match.
- A fuzzy match. A shorter name comes first.
In the same tier, pi commands come before UniPi commands. UniPi commands then follow a fixed package order.
The command list is in src/constants.ts. An audit test checks that each registered /unipi:* command is in this list and has a description. Run it before a release:
npm --workspace packages/autocomplete test