-
Notifications
You must be signed in to change notification settings - Fork 53
feat: add auggie cli #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: add auggie cli #350
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8faa831
feat: add auggie cli
35C4n0r 7dbf18c
chore: update readme
35C4n0r 0f87683
feat: pretty shell script
35C4n0r 337baa2
chore: bump agentapi version
35C4n0r 1639ce5
Update registry/coder-labs/modules/auggie/README.md
35C4n0r 9e753c6
Update registry/coder-labs/modules/auggie/README.md
35C4n0r a620613
Update registry/coder-labs/modules/auggie/README.md
35C4n0r d6b46bb
chore: update README.md
35C4n0r 0fb7823
chore: update README.md
35C4n0r 86ee31e
fix: update user mcp creation to follow coder_mcp method since mcp fl…
DevelopmentCats 9de4f54
fix: update auggie model name format in README.md from "gpt-5" to "gpt5"
DevelopmentCats 1e567f4
chore: update to make auggie work more like other ai modules
DevelopmentCats 31d1a45
chore: update spacing in task reporting example
DevelopmentCats dbde485
chore: set cli_app to false as default
DevelopmentCats 5a2cf10
chore: remove duplicate references
DevelopmentCats 9e8fcfb
chore: add auggie svg
DevelopmentCats 7fc820a
chore: remove hardcoded node/mpn installation so that it can be handl…
DevelopmentCats d2297b1
chore: update installation script to use system package manager for N…
DevelopmentCats 7cff853
chore: use sudo auggie install since its done in pre install script now
DevelopmentCats 2de0adc
Merge branch 'main' into feat-auggie-cli
DevelopmentCats a95ca85
chore: cleanup readme
DevelopmentCats d5d6330
Update registry/coder-labs/modules/auggie/scripts/start.sh
DevelopmentCats 52d7b77
chore: update install script to configure npm global prefix and updat…
DevelopmentCats File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
--- | ||
display_name: Auggie CLI | ||
icon: ../../../../.icons/auggie.svg | ||
description: Run Auggie CLI in your workspace for AI-powered coding assistance with AgentAPI integration | ||
verified: true | ||
tags: [agent, auggie, ai, tasks, augment] | ||
--- | ||
|
||
# Auggie CLI | ||
|
||
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). | ||
|
||
```tf | ||
module "auggie" { | ||
source = "registry.coder.com/coder-labs/auggie/coder" | ||
version = "0.1.0" | ||
agent_id = coder_agent.example.id | ||
folder = "/home/coder/project" | ||
} | ||
``` | ||
|
||
## Prerequisites | ||
|
||
- **Node.js and npm must be sourced/available before the auggie module installs** - ensure they are installed in your workspace image or via earlier provisioning steps | ||
- You must add the [Coder Login](https://registry.coder.com/modules/coder/coder-login) module to your template | ||
- **Augment session token for authentication (required for tasks). [Instructions](https://docs.augmentcode.com/cli/setup-auggie/authentication) to get the session token** | ||
|
||
## Examples | ||
|
||
### Usage with Tasks and Configuration | ||
|
||
```tf | ||
data "coder_parameter" "ai_prompt" { | ||
type = "string" | ||
name = "AI Prompt" | ||
default = "" | ||
description = "Initial task prompt for Auggie CLI" | ||
mutable = true | ||
} | ||
|
||
module "coder-login" { | ||
count = data.coder_workspace.me.start_count | ||
source = "registry.coder.com/coder/coder-login/coder" | ||
version = "1.0.31" | ||
agent_id = coder_agent.example.id | ||
} | ||
|
||
module "auggie" { | ||
source = "registry.coder.com/coder-labs/auggie/coder" | ||
version = "0.1.0" | ||
agent_id = coder_agent.example.id | ||
folder = "/home/coder/project" | ||
|
||
# Authentication | ||
augment_session_token = <<-EOF | ||
{"accessToken":"xxxx-yyyy-zzzz-jjjj","tenantURL":"https://d1.api.augmentcode.com/","scopes":["read","write"]} | ||
EOF # Required for tasks | ||
|
||
# Version | ||
auggie_version = "0.3.0" | ||
|
||
# Task configuration | ||
ai_prompt = data.coder_parameter.ai_prompt.value | ||
continue_previous_conversation = true | ||
interaction_mode = "quiet" | ||
auggie_model = "gpt5" | ||
report_tasks = true | ||
|
||
# MCP configuration for additional integrations | ||
mcp = <<-EOF | ||
{ | ||
"mcpServers": { | ||
"filesystem": { | ||
"command": "npx", | ||
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/coder/project"] | ||
} | ||
} | ||
} | ||
EOF | ||
|
||
# Workspace guidelines | ||
rules = <<-EOT | ||
# Project Guidelines | ||
|
||
## Code Style | ||
- Use TypeScript for all new JavaScript files | ||
- Follow consistent naming conventions | ||
- Add comprehensive comments for complex logic | ||
|
||
## Testing | ||
- Write unit tests for all new functions | ||
- Ensure test coverage above 80% | ||
|
||
## Documentation | ||
- Update README.md for any new features | ||
- Document API changes in CHANGELOG.md | ||
EOT | ||
} | ||
``` | ||
|
||
### Using Multiple MCP Configuration Files | ||
|
||
```tf | ||
module "auggie" { | ||
source = "registry.coder.com/coder-labs/auggie/coder" | ||
version = "0.1.0" | ||
agent_id = coder_agent.example.id | ||
folder = "/home/coder/project" | ||
|
||
# Multiple MCP configuration files | ||
mcp_files = [ | ||
"/path/to/filesystem-mcp.json", | ||
"/path/to/database-mcp.json", | ||
"/path/to/api-mcp.json" | ||
] | ||
|
||
mcp = <<-EOF | ||
{ | ||
"mcpServers": { | ||
"Test MCP": { | ||
"command": "uv", | ||
"args": [ | ||
"--directory", | ||
"/home/coder/test-mcp", | ||
"run", | ||
"server.py" | ||
], | ||
"timeout": 600 | ||
} | ||
} | ||
} | ||
35C4n0r marked this conversation as resolved.
Show resolved
Hide resolved
|
||
EOF | ||
} | ||
``` | ||
|
||
### Troubleshooting | ||
|
||
If you have any issues, please take a look at the log files below. | ||
|
||
```bash | ||
# Installation logs | ||
cat ~/.auggie-module/install.log | ||
|
||
# Startup logs | ||
cat ~/.auggie-module/agentapi-start.log | ||
|
||
# Pre/post install script logs | ||
cat ~/.auggie-module/pre_install.log | ||
cat ~/.auggie-module/post_install.log | ||
``` | ||
|
||
> [!NOTE] | ||
> 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. | ||
35C4n0r marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## References | ||
|
||
- [Auggie CLI Reference](https://docs.augmentcode.com/cli/reference) | ||
- [Auggie CLI MCP Integration](https://docs.augmentcode.com/cli/integrations#mcp-integrations) | ||
- [Augment Code Documentation](https://docs.augmentcode.com/) | ||
- [AgentAPI Documentation](https://github.com/coder/agentapi) | ||
- [Coder AI Agents Guide](https://coder.com/docs/tutorials/ai-agents) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
run "test_auggie_basic" { | ||
command = plan | ||
|
||
variables { | ||
agent_id = "test-agent-123" | ||
folder = "/home/coder/projects" | ||
} | ||
|
||
assert { | ||
condition = coder_env.auggie_session_auth.name == "AUGMENT_SESSION_AUTH" | ||
error_message = "Auggie session auth environment variable should be set correctly" | ||
} | ||
|
||
assert { | ||
condition = var.folder == "/home/coder/projects" | ||
error_message = "Folder variable should be set correctly" | ||
} | ||
|
||
assert { | ||
condition = var.agent_id == "test-agent-123" | ||
error_message = "Agent ID variable should be set correctly" | ||
} | ||
|
||
assert { | ||
condition = var.install_auggie == true | ||
error_message = "Install auggie should default to true" | ||
} | ||
|
||
assert { | ||
condition = var.install_agentapi == true | ||
error_message = "Install agentapi should default to true" | ||
} | ||
} | ||
|
||
run "test_auggie_with_session_token" { | ||
command = plan | ||
|
||
variables { | ||
agent_id = "test-agent-456" | ||
folder = "/home/coder/workspace" | ||
augment_session_token = "test-session-token-123" | ||
} | ||
|
||
assert { | ||
condition = coder_env.auggie_session_auth.value == "test-session-token-123" | ||
error_message = "Auggie session token value should match the input" | ||
} | ||
} | ||
|
||
run "test_auggie_with_custom_options" { | ||
command = plan | ||
|
||
variables { | ||
agent_id = "test-agent-789" | ||
folder = "/home/coder/custom" | ||
order = 5 | ||
group = "development" | ||
icon = "/icon/custom.svg" | ||
auggie_model = "gpt-4" | ||
ai_prompt = "Help me write better code" | ||
interaction_mode = "compact" | ||
continue_previous_conversation = true | ||
install_auggie = false | ||
install_agentapi = false | ||
auggie_version = "1.0.0" | ||
agentapi_version = "v0.6.0" | ||
} | ||
|
||
assert { | ||
condition = var.order == 5 | ||
error_message = "Order variable should be set to 5" | ||
} | ||
|
||
assert { | ||
condition = var.group == "development" | ||
error_message = "Group variable should be set to 'development'" | ||
} | ||
|
||
assert { | ||
condition = var.icon == "/icon/custom.svg" | ||
error_message = "Icon variable should be set to custom icon" | ||
} | ||
|
||
assert { | ||
condition = var.auggie_model == "gpt-4" | ||
error_message = "Auggie model variable should be set to 'gpt-4'" | ||
} | ||
|
||
assert { | ||
condition = var.ai_prompt == "Help me write better code" | ||
error_message = "AI prompt variable should be set correctly" | ||
} | ||
|
||
assert { | ||
condition = var.interaction_mode == "compact" | ||
error_message = "Interaction mode should be set to 'compact'" | ||
} | ||
|
||
assert { | ||
condition = var.continue_previous_conversation == true | ||
error_message = "Continue previous conversation should be set to true" | ||
} | ||
|
||
assert { | ||
condition = var.auggie_version == "1.0.0" | ||
error_message = "Auggie version should be set to '1.0.0'" | ||
} | ||
|
||
assert { | ||
condition = var.agentapi_version == "v0.6.0" | ||
error_message = "AgentAPI version should be set to 'v0.6.0'" | ||
} | ||
} | ||
|
||
run "test_auggie_with_mcp_and_rules" { | ||
command = plan | ||
|
||
variables { | ||
agent_id = "test-agent-mcp" | ||
folder = "/home/coder/mcp-test" | ||
mcp = jsonencode({ | ||
mcpServers = { | ||
test = { | ||
command = "test-server" | ||
args = ["--config", "test.json"] | ||
} | ||
} | ||
}) | ||
mcp_files = [ | ||
"/path/to/mcp1.json", | ||
"/path/to/mcp2.json" | ||
] | ||
rules = "# General coding rules\n- Write clean code\n- Add comments" | ||
} | ||
|
||
assert { | ||
condition = var.mcp != "" | ||
error_message = "MCP configuration should be provided" | ||
} | ||
|
||
assert { | ||
condition = length(var.mcp_files) == 2 | ||
error_message = "Should have 2 MCP files" | ||
} | ||
|
||
assert { | ||
condition = var.rules != "" | ||
error_message = "Rules should be provided" | ||
} | ||
} | ||
|
||
run "test_auggie_with_scripts" { | ||
command = plan | ||
|
||
variables { | ||
agent_id = "test-agent-scripts" | ||
folder = "/home/coder/scripts" | ||
pre_install_script = "echo 'Pre-install script'" | ||
post_install_script = "echo 'Post-install script'" | ||
} | ||
|
||
assert { | ||
condition = var.pre_install_script == "echo 'Pre-install script'" | ||
error_message = "Pre-install script should be set correctly" | ||
} | ||
|
||
assert { | ||
condition = var.post_install_script == "echo 'Post-install script'" | ||
error_message = "Post-install script should be set correctly" | ||
} | ||
} | ||
|
||
run "test_auggie_interaction_mode_validation" { | ||
command = plan | ||
|
||
variables { | ||
agent_id = "test-agent-validation" | ||
folder = "/home/coder/test" | ||
interaction_mode = "print" | ||
} | ||
|
||
assert { | ||
condition = contains(["interactive", "print", "quiet", "compact"], var.interaction_mode) | ||
error_message = "Interaction mode should be one of the valid options" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.