Skip to content

Custom Command Aliases

SpdrByte edited this page Mar 4, 2026 · 1 revision

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.


🆕 Creating a Custom Command

You can create aliases directly from the interactive loop using the following syntax:

/customCommand /yourAlias Your detailed prompt here

Example:

/customCommand /sql Translate the following natural language request into a optimized SQL query:

⛓️ Tool Chaining & Priming (Macros)

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."

Real-World Examples:

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.

🚀 Usage Styles

  1. Direct Execution:

    /wordOfDay
    

    (Gemma fetches the data and responds immediately.)

  2. 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.)


📂 Management & Persistence

Local Storage

All custom commands are saved in your project folder: config/custom_commands.json

Deleting or Editing Aliases

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.

Clone this wiki locally