terminaluse

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

TerminalUse

TerminalUse

Build, deploy, interact with agents. Flow: init → deploy → create task → send messages.
构建、部署并与Agent交互。流程:初始化 → 部署 → 创建任务 → 发送消息。

CLI Setup

CLI 配置

The
tu
CLI is provided by the
terminaluse
Python package. Before running any
tu
commands:
  1. Verify
    tu
    is available
    :
    bash
    which tu || echo "tu CLI not found"
  2. If not installed, ask user whether they would like to install it or if there's a venv they would like to source
  3. Ensure you have an active token with
    tu login
    . You can run the command which will open a browser for the user to login.
tu
CLI由
terminaluse
Python包提供。在运行任何
tu
命令之前:
  1. 验证
    tu
    是否可用
    bash
    which tu || echo "tu CLI not found"
  2. 若未安装,询问用户是否想要安装它,或者是否有想要激活的虚拟环境(venv)
  3. 使用
    tu login
    确保你拥有有效的令牌。运行该命令会打开浏览器供用户登录。

Context Requirement

上下文要求

Most
tu
commands require
config.yaml
in current directory to know what agent to target. Before running commands:
bash
ls config.yaml || echo "Not in agent directory"
If not present,
cd
into the agent project folder first.
大多数
tu
命令需要当前目录下存在
config.yaml
来指定目标Agent。在运行命令之前:
bash
ls config.yaml || echo "Not in agent directory"
若不存在,先切换到Agent项目文件夹中。

Quick Reference

快速参考

ActionCommand
Login
tu login
,
tu whoami
Init agent
tu init
(creates agent directory, no need to mkdir first)
Deploy
tu deploy -y
List deployments
tu ls
Rollback
tu rollback
Add env var
tu env add <KEY> -v <val> -e prod|preview|all [--secret]
Import env file
tu env import <file> -e <env> [--secret KEY]
Create task
tu tasks create -f <fs-id> -m "message"
Create task (auto-create fs)
tu tasks create -p <project-id> -m "message"
Send message
tu tasks send <task-id> -m "message"
操作命令
登录
tu login
,
tu whoami
初始化Agent
tu init
(创建Agent目录,无需提前创建文件夹)
部署
tu deploy -y
列出部署记录
tu ls
回滚
tu rollback
添加环境变量
tu env add <KEY> -v <val> -e prod|preview|all [--secret]
导入环境变量文件
tu env import <file> -e <env> [--secret KEY]
创建任务
tu tasks create -f <fs-id> -m "message"
创建任务(自动创建文件系统)
tu tasks create -p <project-id> -m "message"
发送消息
tu tasks send <task-id> -m "message"

Workflows

工作流

TaskReference
Create a new agent./workflows/create.md
Deploy to platform./workflows/deploy.md
Test/interact with agent./workflows/interact.md
You must look at the corresponding workflow files based on user intent.
任务参考文档
创建新Agent./workflows/create.md
部署到平台./workflows/deploy.md
测试/与Agent交互./workflows/interact.md
需根据用户的需求查看对应的工作流文件。

Anti-patterns

反模式

  • Creating task without filesystem or project. Tasks either need a filesystem. If project is provided, a filesystem is auto-created in the project
  • Modifying Dockerfile
    ENTRYPOINT
    /
    CMD
    → breaks deployment
  • Trying to use the agent right after updating secrets. You must wait for the new version to become active. Check with
    tu ls
  • 未指定文件系统(filesystem)或项目就创建任务。任务必须关联文件系统;若提供了项目,系统会自动在该项目中创建一个文件系统。
  • 修改Dockerfile的
    ENTRYPOINT
    /
    CMD
    → 会导致部署失败
  • 在更新密钥后立即尝试使用Agent。你必须等待新版本激活后再使用。可通过
    tu ls
    检查状态。

Error Recovery

错误恢复

ErrorAction
Deploy fails
tu ls <branch>
lists deployments events for branch → find FAILED → fix → redeploy
Need rollback
tu rollback
错误操作
部署失败
tu ls <branch>
会列出分支的部署事件 → 找到FAILED状态的事件 → 修复问题 → 重新部署
需要回滚
tu rollback

Docs/Skills Feedback

文档/技能反馈

If docs or skills are wrong/unclear, ask user permission to send feedback to (include the feedback in the user request): Never include any sensitive information.
bash
curl -X POST 'https://uutzjuuimuclittwbvef.supabase.co/functions/v1/tu-docs-feedback' \
  -H 'Content-Type: application/json' \
  -d '{"feedback":"<issue>", "page":"<page URL> or section name"}'
若文档或技能存在错误/表述不清,需先征得用户同意,再将反馈发送至(反馈内容需包含在用户请求中): 请勿包含任何敏感信息。
bash
curl -X POST 'https://uutzjuuimuclittwbvef.supabase.co/functions/v1/tu-docs-feedback' \
  -H 'Content-Type: application/json' \
  -d '{"feedback":"<issue>", "page":"<page URL> or section name"}'