Overview
Traycer allows you to create custom CLI agent with custom arguments and permissions for any CLI-based coding agent. This powerful feature enables you to pass special flags and create platform-specific configurations tailored to your workflow.What are Custom CLI Agents?
Custom CLI agents allow you to:- Execute any CLI-based coding agent with custom arguments.
- Pass special flags like
--dangerousor--forcefor elevated permissions. - Create platform-specific CLI agent for different environments.
Available Template Tags
Custom CLI agents support the following environment variables set by Traycer at runtime:$TRAYCER_PROMPT or $TRAYCER_PROMPT_TMP_FILE must be referenced in your CLI agent template.cat "$TRAYCER_PROMPT_TMP_FILE" or Get-Content -Raw "$env:TRAYCER_PROMPT_TMP_FILE" to read and pass the prompt content to the CLI agent at runtime.
The temporary file is automatically cleaned up by Traycer after 30 seconds.Creating Custom CLI Agents

1. Open Manage CLI Agents
2. Click Add CLI Agent
3. Choose scope
4. CLI Agent Name
5. Add CLI Agent Command
Template Scopes
Custom CLI agents can be created in two different scopes:- User scope: Personal CLI agents that are available across all your projects. These are stored in the home directory under
.traycer/cli-agentsand travel with you. - Workspace scope: Project-specific CLI agents that are stored in your workspace root under
.traycer/cli-agents. These are ideal for team-shared configurations or project-specific agent setups.
Popular CLI Agents
Here are some popular CLI-based coding agents you can set up:- Claude Code CLI
- Codex CLI
- Gemini CLI
- Cline CLI
- Factory Droid CLI
- Cursor CLI
- Aider
Using Custom Paths
If your CLI agent is installed at a custom location, you can specify the full path in your template:Use Cases
Custom CLI agents are particularly useful for:- Passing dangerous/elevated permissions flags.
- Using custom model configurations.
- Setting specific output formats.
- Creating environment-specific agent configurations.
FAQ
Can I pass dangerous or elevated permission flags?
Can I pass dangerous or elevated permission flags?
--dangerous, --force, or other elevated permission flags. However, be cautious as these flags grant the agent more control over your system. Always understand what permissions you’re granting before using such flags.How do I share custom CLI agents with my team?
How do I share custom CLI agents with my team?
What's the difference between User and Workspace scope?
What's the difference between User and Workspace scope?
Can I edit an existing CLI agent?
Can I edit an existing CLI agent?
What happens if I don't include the $TRAYCER_PROMPT or $TRAYCER_PROMPT_TMP_FILE environment variable?
What happens if I don't include the $TRAYCER_PROMPT or $TRAYCER_PROMPT_TMP_FILE environment variable?
$TRAYCER_PROMPT or $TRAYCER_PROMPT_TMP_FILE must be referenced in your CLI agent template to pass the task instructions to the agent.When should I use TRAYCER_PROMPT_TMP_FILE instead of TRAYCER_PROMPT?
When should I use TRAYCER_PROMPT_TMP_FILE instead of TRAYCER_PROMPT?
TRAYCER_PROMPT is the recommended default for most use cases. Use TRAYCER_PROMPT_TMP_FILE when:- Dealing with very large prompts (multiple files, extensive context)
- Encountering environment variable size limits (Windows: ~32KB, Linux/macOS: varies)
- Experiencing prompt truncation issues
TRAYCER_PROMPT_TMP_FILE directly in your commands just like TRAYCER_PROMPT - no need for file reading commands.How does TRAYCER_PROMPT_TMP_FILE work internally?
How does TRAYCER_PROMPT_TMP_FILE work internally?
TRAYCER_PROMPT_TMP_FILE to the file path. When you reference $TRAYCER_PROMPT_TMP_FILE in your template, you need to read the file content using commands like cat "$TRAYCER_PROMPT_TMP_FILE" (bash/sh) or Get-Content -Raw "$env:TRAYCER_PROMPT_TMP_FILE" (PowerShell). This approach bypasses environment variable size limits that can cause issues with very large prompts. The temporary file is automatically cleaned up by Traycer after 30 seconds.Can I use custom CLI agents with YOLO Mode?
Can I use custom CLI agents with YOLO Mode?
Can I have multiple versions of the same agent?
Can I have multiple versions of the same agent?
claude CLI agent.What if the CLI tool isn't installed on my system?
What if the CLI tool isn't installed on my system?