@pithos-kit/squiggle
v0.6.0
Published
Quietly polish grammar and spelling in your Pi prompts.
Maintainers
Readme
squiggle
Quietly polish grammar and spelling in your pi prompts.
The extension intercepts user input, shows a squiggling... spinner while processing, corrects spelling and grammar using a configured model, shows a colored diff, and submits the corrected prompt automatically without confirmation. Named after the red squiggle from your favorite spell-checker.
Install
pi install npm:@pithos-kit/squigglePin to a version:
pi install npm:@pithos-kit/squiggle@<version>For local development from a checkout of pithos-kit:
pi install ./pithos.squiggleProject-local install:
pi install ./pithos.squiggle -lTemporary test run:
pi -e ./pithos.squigglePithos .pithos config
pi:
extensions:
"@pithos-kit/squiggle": "npm:0.6.0"Configuration
Run /squiggle config to choose an exact correction model from providers with configured authentication, just like Translate's model picker. If none are available, run /login first. The picker opens directly and saves to <cwd>/.pi/squiggle.json (honors Pi's configured project directory name). There is no session or user-level model configuration.
Model precedence is SQUIGGLE_MODEL > project > default. An environment override may still take precedence after saving, which the completion message shows. Cancelling the picker changes nothing. Existing file fields are preserved, and malformed files are not overwritten.
You can still edit .pi/squiggle.json directly:
{
"mode": "on",
"model": "openai-codex/gpt-5.4-mini",
"maxInputChars": 500,
"timeoutMs": 10000
}Options:
mode:"on"or"off"model: exact pi model spec inprovider/modelformat (model IDs may contain additional slashes)maxInputChars: maximum input length to send to the correction modeltimeoutMs: correction deadline in milliseconds, from1000to60000(default:10000)
Environment variables override the project config (except the session on/off toggle):
SQUIGGLE_MODE=off pi
SQUIGGLE_MODEL=openai-codex/gpt-5.4-mini pi
SQUIGGLE_MAX_CHARS=1000 pi
SQUIGGLE_TIMEOUT_MS=15000 piCommands
Inside pi:
/squiggle toggle # switch between on/off
/squiggle config # choose and save the correction model
/squiggle --help # show toggle/config usage
/squiggle-status # show status
/squiggle-status --help # show status-command usage-h is accepted wherever --help is shown.
The toggle state is saved in the current pi session and overrides .pi/squiggle.json and environment configuration for that session.
The default correction model is openai-codex/gpt-5.4-mini. Squiggle uses only the exact configured model, never silently substituting the active coding model. /squiggle-status shows its exact ID, configuration source, and whether it is missing from the registry. Missing models or failed authentication leave the original prompt unchanged.
If authentication or correction exceeds the configured deadline, Squiggle cancels the request, clears the spinner, and submits the original prompt unchanged. Session shutdown, reload, and an active Pi cancellation signal also cancel in-flight correction.
Notes
This package imports pi runtime packages as peer dependencies:
@earendil-works/pi-ai@earendil-works/pi-coding-agent
Do not bundle those dependencies; pi provides them at runtime.
