网淘吧来吧,欢迎您!

返回首页 微信
微信
手机版
手机版

Coder Workspaces

2026-03-28 新闻来源:网淘吧 围观:15
电脑广告
手机广告

Coder工作空间

通过coder CLI管理Coder工作空间和AI编码代理任务。

注意:命令在隔离的、受管控的Coder工作空间内执行——而非主机系统。

设置

在使用coder CLI之前,请配置身份验证:

  1. 从以下位置安装CLICoder CLI文档

  2. 设置环境变量:

    export CODER_URL=https://your-coder-instance.com
    export CODER_SESSION_TOKEN=<your-token>  # Get from /cli-auth
    
  3. 测试连接:

    coder whoami
    

工作空间命令

coder list                              # List workspaces
coder list --all                        # Include stopped
coder list -o json                      # JSON output

coder start <workspace>
coder stop <workspace>
coder restart <workspace> -y
coder delete <workspace> -y

coder ssh <workspace>                   # Interactive shell
coder ssh <workspace> -- <command>      # Run command in workspace

coder logs <workspace>
coder logs <workspace> -f               # Follow logs

AI编码任务

Coder任务在隔离的工作空间中运行AI代理(Claude Code、Aider等)。

创建任务

coder tasks create --template <template> --preset "<preset>" "prompt"
  • 模板:必需。使用coder templates list
  • 列出模板预设:可能必需。首先尝试不指定。如果创建失败并提示“必需参数未提供”,请使用coder templates presets list <模板> -o json

管理任务

coder tasks list                        # List all tasks
coder tasks logs <task-name>            # View output
coder tasks connect <task-name>         # Interactive session
coder tasks delete <task-name> -y       # Delete task

任务状态

  • 初始化中:工作区资源调配(时间因模板而异)
  • 工作中:设置脚本正在运行
  • 活跃状态:代理正在处理提示
  • 空闲状态:代理正在等待输入

故障排除

  • 未找到CLI:请参阅Coder CLI 文档
  • 认证失败:请确认 CODER_URL 和 CODER_SESSION_TOKEN 已设置,然后运行coder login
  • 版本不匹配:请从您的 Coder 实例重新安装 CLI

更多信息

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Youtube Factory 下一篇:circle-wallet

相关文章

您是本站第287664名访客 今日有200篇新文章/评论