-
Notifications
You must be signed in to change notification settings - Fork 0
Custom Command Aliases
Custom Command Aliases allow you to create powerful, reusable shortcuts for long prompts or complex multi-step workflows. By mapping a simple alias like /save to a descriptive instruction, you can trigger specific tool sequences instantly.
You can create aliases directly from the interactive loop using the following syntax:
/customCommand /yourAlias Your detailed prompt here
/customCommand /sql Translate the following natural language request into a optimized SQL query:
The most powerful use of aliases is Tool Priming. You can define aliases that instruct Gemma to use tools in a specific sequence, effectively creating "macros."
| Alias | Prompt (Macro) | What it does |
|---|---|---|
/saveIdea |
"Summarize what we were talking about and writefile [subject]Idea.txt" | Triggers a summary followed by an automatic writefile tool call. |
/findFunc |
"searchdir -path . -recursive -search_string 'function' -include '*.ps1'" | Forces a recursive search for function definitions across all project files. |
/wordOfDay |
"Use http_get to fetch merriam-webster.com/word-of-the-day and tell user the word." | Chains a web request tool with a final natural language summary. |
-
Direct Execution:
/wordOfDay(Gemma fetches the data and responds immediately.)
-
Contextual Addition:
/saveIdea Research into quantum computing(The alias expands, and your text is used to fill in the [subject] or provide additional context for the tool.)
All custom commands are saved in your project folder:
config/custom_commands.json
Batch-editing or deleting aliases is best done in a text editor.
File structure example:
{
"/saveIdea": "summarize what we were talking about and writefile [subject]Idea.txt",
"/findFunc": "searchdir -path . -recursive -search_string \"function\" -include \"*.ps1\"",
"/wordOfDay": "use http_get tool to fethch https://www.merriam-webster.com/word-of-the-day..."
}Next Steps: Check out the Interactive Commands for more ways to control the workstation.