|
| 1 | +--- |
| 2 | +display_name: Auggie CLI |
| 3 | +icon: ../../../../.icons/auggie.svg |
| 4 | +description: Run Auggie CLI in your workspace for AI-powered coding assistance with AgentAPI integration |
| 5 | +verified: true |
| 6 | +tags: [agent, auggie, ai, tasks, augment] |
| 7 | +--- |
| 8 | + |
| 9 | +# Auggie CLI |
| 10 | + |
| 11 | +Run Auggie CLI in your workspace to access Augment's AI coding assistant with advanced context understanding and codebase integration. This module integrates with [AgentAPI](https://github.com/coder/agentapi) for Coder Tasks compatibility. |
| 12 | + |
| 13 | +```tf |
| 14 | +module "auggie" { |
| 15 | + source = "registry.coder.com/coder-labs/auggie/coder" |
| 16 | + version = "0.1.0" |
| 17 | + agent_id = coder_agent.example.id |
| 18 | + folder = "/home/coder/project" |
| 19 | +} |
| 20 | +``` |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +- You must add the [Coder Login](https://registry.coder.com/modules/coder/coder-login) module to your template |
| 25 | +- **Augment session token for authentication (required for tasks)** |
| 26 | + |
| 27 | +## Usage Examples |
| 28 | + |
| 29 | +### Simple Usage |
| 30 | + |
| 31 | +```tf |
| 32 | +module "auggie" { |
| 33 | + count = data.coder_workspace.me.start_count |
| 34 | + source = "registry.coder.com/coder-labs/auggie/coder" |
| 35 | + version = "0.1.0" |
| 36 | + agent_id = coder_agent.example.id |
| 37 | + folder = "/home/coder/project" |
| 38 | +
|
| 39 | + # Optional: Specify Auggie version |
| 40 | + install_auggie = true |
| 41 | + auggie_version = "latest" |
| 42 | +} |
| 43 | +``` |
| 44 | + |
| 45 | +### Advanced Usage with Tasks and Configuration |
| 46 | + |
| 47 | +```tf |
| 48 | +data "coder_parameter" "ai_prompt" { |
| 49 | + type = "string" |
| 50 | + name = "AI Prompt" |
| 51 | + default = "" |
| 52 | + description = "Initial task prompt for Auggie CLI" |
| 53 | + mutable = true |
| 54 | +} |
| 55 | +
|
| 56 | +module "coder-login" { |
| 57 | + count = data.coder_workspace.me.start_count |
| 58 | + source = "registry.coder.com/coder/coder-login/coder" |
| 59 | + version = "1.0.31" |
| 60 | + agent_id = coder_agent.example.id |
| 61 | +} |
| 62 | +
|
| 63 | +module "auggie" { |
| 64 | + source = "registry.coder.com/coder-labs/auggie/coder" |
| 65 | + version = "0.1.0" |
| 66 | + agent_id = coder_agent.example.id |
| 67 | + folder = "/home/coder/project" |
| 68 | +
|
| 69 | + # Authentication |
| 70 | + augment_session_token = <<-EOF |
| 71 | + {"accessToken":"xxxx-yyyy-zzzz-jjjj","tenantURL":"https://d1.api.augmentcode.com/","scopes":["read","write"]} |
| 72 | +EOF # Required for tasks |
| 73 | +
|
| 74 | + # Task configuration |
| 75 | + ai_prompt = data.coder_parameter.ai_prompt.value |
| 76 | + continue_previous_conversation = true |
| 77 | + interaction_mode = "quiet" |
| 78 | + auggie_model = "gpt-5" |
| 79 | +
|
| 80 | + # MCP configuration for additional integrations |
| 81 | + mcp = <<-EOF |
| 82 | +{ |
| 83 | + "mcpServers": { |
| 84 | + "filesystem": { |
| 85 | + "command": "npx", |
| 86 | + "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/coder/project"] |
| 87 | + }, |
| 88 | + "git": { |
| 89 | + "command": "npx", |
| 90 | + "args": ["-y", "@modelcontextprotocol/server-git", "--repository", "/home/coder/project"] |
| 91 | + } |
| 92 | + } |
| 93 | +} |
| 94 | +EOF |
| 95 | +
|
| 96 | + # Workspace guidelines |
| 97 | + rules = <<-EOT |
| 98 | + # Project Guidelines |
| 99 | +
|
| 100 | + ## Code Style |
| 101 | + - Use TypeScript for all new JavaScript files |
| 102 | + - Follow consistent naming conventions |
| 103 | + - Add comprehensive comments for complex logic |
| 104 | +
|
| 105 | + ## Testing |
| 106 | + - Write unit tests for all new functions |
| 107 | + - Ensure test coverage above 80% |
| 108 | +
|
| 109 | + ## Documentation |
| 110 | + - Update README.md for any new features |
| 111 | + - Document API changes in CHANGELOG.md |
| 112 | + EOT |
| 113 | +} |
| 114 | +``` |
| 115 | + |
| 116 | +### Using Multiple MCP Configuration Files |
| 117 | + |
| 118 | +```tf |
| 119 | +module "auggie" { |
| 120 | + source = "registry.coder.com/coder-labs/auggie/coder" |
| 121 | + version = "0.1.0" |
| 122 | + agent_id = coder_agent.example.id |
| 123 | + folder = "/home/coder/project" |
| 124 | +
|
| 125 | + # Multiple MCP configuration files |
| 126 | + mcp_files = [ |
| 127 | + "/path/to/filesystem-mcp.json", |
| 128 | + "/path/to/database-mcp.json", |
| 129 | + "/path/to/api-mcp.json" |
| 130 | + ] |
| 131 | +
|
| 132 | + mcp = <<-EOF |
| 133 | + { |
| 134 | + "mcpServers": { |
| 135 | + "Test MCP": { |
| 136 | + "command": "uv", |
| 137 | + "args": [ |
| 138 | + "--directory", |
| 139 | + "/home/coder/test-mcp", |
| 140 | + "run", |
| 141 | + "server.py" |
| 142 | + ], |
| 143 | + "timeout": 600 |
| 144 | + } |
| 145 | + } |
| 146 | +} |
| 147 | +EOF |
| 148 | +
|
| 149 | + # Custom install scripts |
| 150 | + pre_install_script = <<-EOT |
| 151 | + #!/usr/bin/env bash |
| 152 | + set -euo pipefail |
| 153 | + # Install additional dependencies |
| 154 | + npm install -g typescript |
| 155 | + pip install -r requirements.txt |
| 156 | + EOT |
| 157 | +
|
| 158 | + post_install_script = <<-EOT |
| 159 | + #!/usr/bin/env bash |
| 160 | + set -euo pipefail |
| 161 | + # Setup project-specific configuration |
| 162 | + echo "Auggie setup complete for $(pwd)" |
| 163 | + EOT |
| 164 | +} |
| 165 | +``` |
| 166 | + |
| 167 | +### Log Files |
| 168 | + |
| 169 | +```bash |
| 170 | +# Installation logs |
| 171 | +cat ~/.auggie-module/install.log |
| 172 | + |
| 173 | +# Startup logs |
| 174 | +cat ~/.auggie-module/agentapi-start.log |
| 175 | + |
| 176 | +# Pre/post install script logs |
| 177 | +cat ~/.auggie-module/pre_install.log |
| 178 | +cat ~/.auggie-module/post_install.log |
| 179 | +``` |
| 180 | + |
| 181 | +> [!NOTE] |
| 182 | +> To use tasks with Auggie CLI, create a `coder_parameter` named `"AI Prompt"` and pass its value to the auggie module's `ai_prompt` variable. The `folder` variable is required for the module to function correctly. |
| 183 | +
|
| 184 | +## References |
| 185 | + |
| 186 | +- [Augment Code Documentation](https://docs.augmentcode.com/) |
| 187 | +- [Auggie CLI Reference](https://docs.augmentcode.com/cli/reference) |
| 188 | +- [MCP Integration Guide](https://docs.augmentcode.com/cli/integrations#mcp-integrations) |
| 189 | +- [AgentAPI Documentation](https://github.com/coder/agentapi) |
| 190 | +- [Coder AI Agents Guide](https://coder.com/docs/tutorials/ai-agents) |
0 commit comments