Plugin platform
Shortcuts
Run a plugin action under a short name, and move your shortcuts between machines with export and import.
↓ on this page
A shortcut runs a plugin action under a short name. With a shortcut called inspect, lla inspect . does the same work as lla plugin run project_context inspect -- .. Add one for any action you run often.
Add a shortcut
Give the name, the plugin and the action. -d adds an optional description.
lla shortcut add inspect project_context inspect -d "Summarize this project"✓ Added shortcut 'inspect' -> project_context inspect
Description: Summarize this projectlla doesn't check the plugin or action when you add a shortcut. A wrong name shows up as an error when you run it. To see a plugin's actions, run its help action.
lla plugin run project_context helpproject_context
inspect [path] Detect Rust, Node, Python, and Go context
refresh Clear cached project state
help Show this helpTo pick from menus instead, run lla shortcut create. It asks for the plugin, action, name and description. If you leave the description empty, it uses the action's own description.
Run a shortcut
Use the shortcut's name as the first argument. Everything after it goes to the action unchanged, with no -- separator.
lla inspect .warning: 'lla plugin <plugin> <action>' is deprecated; use 'lla plugin run <plugin> <action> -- <arguments>'
Root: .
Project types: rust
Health: warning (1 issues)
Locks: rust:missing
Artifacts: target
Repository: not-a-repositorylla 0.6.6 prints that warning on every shortcut run. It goes to stderr and you can ignore it.
Three rules follow from how lla matches the name:
| Rule | Example |
|---|---|
| The name must come first. Anything before it turns it into a directory argument. | lla --no-color inspect tries to list a directory called inspect. |
| A shortcut wins over a subcommand or directory with the same name. | A shortcut called config hides lla config. To list a directory called inspect, run lla ./inspect. |
Flags go to the action, including --help. | lla hash --help fails with unknown option '--help' for action 'help'. |
Running a shortcut for a disabled plugin turns that plugin on, and it stays on for your later listings. Run lla --disable-plugin NAME to turn it off again.
List shortcuts
lla shortcut listConfigured Shortcuts:
audit → security_audit audit
Description: Audit permissions and secrets
hash → file_hash help
Description: Show file_hash usage
inspect → project_context inspect
Description: Summarize this projectThe order can change between runs. With nothing configured, the command prints No shortcuts configured.
Remove a shortcut
lla shortcut remove inspect✓ Removed shortcut 'inspect'An unknown name prints ✗ Shortcut 'inspect' not found and still exits with status 0.
Where shortcuts live
Shortcuts are saved under [shortcuts] in ~/.config/lla/config.toml, with one inline table for each.
[shortcuts]
hash={ plugin_name = "file_hash", action = "help", description = "Show file_hash usage"}Export
Export writes your shortcuts as TOML. Give it a path, or leave the path off to print to stdout.
lla shortcut export shortcuts.toml✓ Exported 3 shortcuts to shortcuts.tomlThe file has one table for each shortcut, followed by a [plugin_aliases] table.
[shortcuts.audit]
plugin_name = "security_audit"
action = "audit"
description = "Audit permissions and secrets"
[shortcuts.hash]
plugin_name = "file_hash"
action = "help"
description = "Show file_hash usage"
[shortcuts.inspect]
plugin_name = "project_context"
action = "inspect"
description = "Summarize this project"
[plugin_aliases]Import
Import takes a required file path and has two modes.
| Command | Effect on existing shortcuts | Output |
|---|---|---|
lla shortcut import shortcuts.toml | Removes every shortcut that isn't in the file. | ✓ Imported 3 shortcuts (replaced existing) |
lla shortcut import shortcuts.toml --merge | Keeps them. When a name is in both, your existing shortcut wins. | ✓ Imported 1 shortcuts, skipped 1 conflicts |
Each shortcut needs plugin_name and action, and description is optional. You can write the inline form from config.toml too. Both top-level tables are optional, so a replace import from a file with no [shortcuts] table removes all your shortcuts.
A file with the wrong key fails and changes nothing:
✗ Error
Failed to parse TOML file: TOML parse error at line 2, column 8
|
2 | snip = { plugin = "code_snippet_extractor", action = "extract" }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing field `plugin_name`To carry shortcuts to another machine, keep the file with your dotfiles:
lla shortcut export ~/dotfiles/lla-shortcuts.toml
lla shortcut import ~/dotfiles/lla-shortcuts.toml --mergeImporting doesn't install plugins. On a machine without the plugin, the shortcut fails with Plugin 'NAME' not found until you install it. See Plugins.