pi-swamp-autocomplete
v0.1.0
Published
Pi extension that autocompletes Swamp model types, models, and workflow names
Downloads
28
Maintainers
Readme
pi-swamp-autocomplete
A Pi extension that adds autocomplete for Swamp names in the prompt editor.
Requirements
- Pi
- The
swampCLI on yourPATH
What it completes
- Model type names (e.g.
command/shell,@shelson/newrelic-alerts) - Model names (e.g.
dashboards,alerts) - Workflow names (e.g.
sync-newrelic-dashboards)
Install
From npm:
pi install npm:pi-swamp-autocompleteFrom git:
pi install git:github.com/shelson/[email protected]Or from a local checkout:
pi install /path/to/pi-swamp-autocompleteAdd -l to write the install to project settings (.pi/settings.json) instead of your user settings.
Then reload Pi:
/reloadUsage
In any directory that contains a .swamp.yaml file, type \ in the Pi prompt:
\An autocomplete dropdown will appear with model types, models, and workflows. Keep typing to fuzzy-filter the list.
To reload the cached name lists after creating or renaming Swamp resources:
/swamp-refreshDevelopment
Test changes without installing:
pi -e /path/to/pi-swamp-autocomplete/extensions/index.tsType-check against the local Pi installation:
cp tsconfig.json.example tsconfig.json
# edit tsconfig.json paths to point at your local Pi installation
npm install
npm run typecheck
tsconfig.jsonis gitignored so your local machine paths are never committed.
License
MIT
