Skip to content

feat: add devcats/coder-cli template for managing Coder deployments f… - #1111

Open
DevelopmentCats wants to merge 1 commit into
coder:mainfrom
DevelopmentCats:devcats/coder-cli
Open

feat: add devcats/coder-cli template for managing Coder deployments f…#1111
DevelopmentCats wants to merge 1 commit into
coder:mainfrom
DevelopmentCats:devcats/coder-cli

Conversation

@DevelopmentCats

Copy link
Copy Markdown
Collaborator

…ent from an agent

Description

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/[namespace]/modules/[module-name]
New version: v1.0.0
Breaking change: [ ] Yes [ ] No

Template Information

Path: registry/[namespace]/templates/[template-name]

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

Copilot AI lite review requested due to automatic review settings September 10, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Docker agent entrypoint handling and container memory configuration have correctness issues that can prevent the workspace from functioning.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new Docker-based workspace template under registry/coder-labs/templates/coder-cli intended to provide a pre-authenticated Coder CLI “ops” workspace (optionally with Claude Code and registry agent skills) for managing an existing Coder deployment.

Changes:

  • Introduces a new template coder-cli with Docker volume-backed persistent /home/coder and a container running the Coder agent init script.
  • Adds workspace parameters for image selection, CPU/memory sizing, optional repo cloning, optional Claude Code install, and optional registry skills installation.
  • Documents template prerequisites, architecture, and usage in a new README.
File summaries
File Description
registry/coder-labs/templates/coder-cli/README.md Adds template documentation and usage guidance (prereqs, architecture, agent workflow).
registry/coder-labs/templates/coder-cli/main.tf Implements the Docker-based Coder CLI workspace template (parameters, agent, modules, volume, container).
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +256 to +257
cpu_shares = data.coder_parameter.cpu.value * 1024
memory = data.coder_parameter.memory_gb.value * 1024
name = "coder-${data.coder_workspace_owner.me.name}-${lower(data.coder_workspace.me.name)}"
hostname = lower(data.coder_workspace.me.name)

entrypoint = ["sh", "-c", coder_agent.main.init_script]
Comment on lines +2 to +3
display_name: Coder CLI Workspace
description: A pre-authenticated Coder CLI workspace for operating a Coder deployment from the agent
metadata {
display_name = "Registry skills"
key = "registry_skills"
script = "ls /home/coder/.claude/skills 2>/dev/null | tr '\\n' ' ' | sed 's/ $//' || echo 'none'"
Comment on lines +228 to +233
resource "docker_volume" "home" {
name = "coder-${data.coder_workspace.me.id}-home"
lifecycle {
ignore_changes = all
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants