droid-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Droid CLI Target

Droid CLI 目标

The orchestrator routed you here. Layer these target-specific patterns on top of the driver skill you already loaded.
Droid-specific shortcuts, modes, and launch patterns.
编排器将您引导至此。请在已加载的驱动skill基础上,叠加这些特定于目标的模式。
以下是Droid专属的快捷键、模式及启动模式。

Shortcuts

快捷键

ActionKey chordResult
Toggle Spec mode
shift tab
toggles Spec mode on/off
Cycle autonomy
ctrl l
Off > Low > Med > High > Off
Cycle models
ctrl n
cycles available models
Cycle reasoning
tab
High > none > Low > Medium > High
Cancel / close / stop
esc
stops streaming, closes overlays
Clear input
ctrl u
clears current line
Toggle bash mode
!
on empty input
switches prompt between
>
and
$
Help / shortcuts
?
opens keybinding help
Multiline input
shift enter
inserts newline without submitting
操作快捷键组合效果
切换Spec模式
shift tab
开启/关闭Spec模式
切换自主程度
ctrl l
关闭 > 低 > 中 > 高 > 关闭 循环切换
切换模型
ctrl n
循环切换可用模型
切换推理级别
tab
高 > 无 > 低 > 中 > 高 循环切换
取消/关闭/停止
esc
停止流传输,关闭覆盖层
清空输入
ctrl u
清空当前行内容
切换bash模式空输入时输入
!
在提示符
>
$
之间切换
帮助/快捷键
?
打开快捷键绑定帮助
多行输入
shift enter
插入换行但不提交

Dialogs

对话框

When a dialog shows
Use up/down to navigate...
:
up
/
down
moves the highlight,
enter
selects,
esc
closes.
当对话框显示
Use up/down to navigate...
时:按
up
/
down
移动高亮,
enter
选择,
esc
关闭。

Slash commands

斜杠命令

CommandPurpose
/help
Show commands
/settings
Open settings menu
/model
Open model selector
/clear
or
/new
Start a new session
/sessions
Browse previous sessions
/review
Start AI code review
/status
Show current config
/cost
Show usage / cost
/compress [prompt]
Summarize and move to fresh session
命令用途
/help
显示命令列表
/settings
打开设置菜单
/model
打开模型选择器
/clear
/new
启动新会话
/sessions
浏览历史会话
/review
启动AI代码评审
/status
显示当前配置
/cost
显示使用情况/成本
/compress [prompt]
总结内容并切换到新会话

File mentions

文件提及

Type
@
to open file suggestions, filter by typing,
tab
to accept,
esc
to cancel:
bash
$TCTL -s demo type "review @"
$TCTL -s demo type "package.json"
$TCTL -s demo press tab
输入
@
打开文件建议,输入内容进行筛选,按
tab
确认,
esc
取消:
bash
$TCTL -s demo type "review @"
$TCTL -s demo type "package.json"
$TCTL -s demo press tab

Visual cues

视觉提示

StateWhat to look for
Spec mode oninput border shows
Spec
Bash mode onprompt is
$
Idle / readyprompt is
>
with no spinner
Dialog openboxed menu + navigation hint
File suggestionsdropdown under input
Thinking
Thinking...
and stop hint
状态识别特征
Spec模式开启输入框边框显示
Spec
Bash模式开启提示符为
$
空闲/就绪提示符为
>
且无加载动画
对话框打开带框菜单+导航提示
文件建议输入框下方显示下拉列表
思考中显示
Thinking...
及停止提示

Launching Droid

启动Droid

How
droid-dev
works

droid-dev
工作原理

droid-dev
is a thin bash shim at
~/.local/bin/droid-dev
. It runs
bun
against whichever checkout
DROID_DEV_REPO_ROOT
points to — it does NOT use a pre-compiled binary. This means:
  • No per-branch builds. One
    npm run setup
    (in any checkout) installs the shim. Switching branches is instant via
    --repo-root
    .
  • Prerequisite: The target worktree must have
    node_modules
    installed (
    npm install
    at the repo root). If missing, the bun launch fails.
  • tctl --repo-root
    sets
    DROID_DEV_REPO_ROOT
    automatically and pins the session to that worktree.
droid-dev
是位于
~/.local/bin/droid-dev
的轻量bash脚本。它会根据
DROID_DEV_REPO_ROOT
指向的代码仓库,通过
bun
运行代码——不使用预编译二进制文件。这意味着:
  • 无需按分支构建。在任意代码仓库中执行一次
    npm run setup
    即可安装该脚本。通过
    --repo-root
    可即时切换分支。
  • 前提条件:目标工作树必须已安装
    node_modules
    (在仓库根目录执行
    npm install
    )。如果缺失,bun启动会失败。
  • **
    tctl --repo-root
    **会自动设置
    DROID_DEV_REPO_ROOT
    ,并将会话固定到该工作树。

droid-dev

droid-dev
启动方式

droid-dev
launches require
--repo-root
(or
--env DROID_DEV_REPO_ROOT=...
).
tctl
enforces this — launches without it will fail:
bash
undefined
启动
droid-dev
需要指定
--repo-root
(或
--env DROID_DEV_REPO_ROOT=...
)。
tctl
会强制执行此要求——未指定的启动会失败:
bash
undefined

tuistory (default — virtual PTY)

tuistory(默认——虚拟PTY)

$TCTL launch "droid-dev" -s demo --backend tuistory
--repo-root /path/to/worktree
--cols 120 --rows 36
$TCTL launch "droid-dev" -s demo --backend tuistory
--repo-root /path/to/worktree
--cols 120 --rows 36

true-input (real terminal proof — headless Wayland compositor)

true-input(真实终端验证——无头Wayland合成器)

$TCTL launch "droid-dev" -s demo --backend true-input
--repo-root /path/to/worktree
undefined
$TCTL launch "droid-dev" -s demo --backend true-input
--repo-root /path/to/worktree
undefined

Feature branch / worktree

功能分支/工作树

For comparisons, launch separate sessions pointing at different worktrees:
bash
$TCTL launch "droid-dev" -s before --backend tuistory \
  --repo-root /path/to/baseline-worktree \
  --cols 120 --rows 36 --record /tmp/before.cast \
  --env FORCE_COLOR=3 --env COLORTERM=truecolor

$TCTL launch "droid-dev" -s after --backend tuistory \
  --repo-root /path/to/candidate-worktree \
  --cols 120 --rows 36 --record /tmp/after.cast \
  --env FORCE_COLOR=3 --env COLORTERM=truecolor
如需对比,可启动指向不同工作树的独立会话:
bash
$TCTL launch "droid-dev" -s before --backend tuistory \
  --repo-root /path/to/baseline-worktree \
  --cols 120 --rows 36 --record /tmp/before.cast \
  --env FORCE_COLOR=3 --env COLORTERM=truecolor

$TCTL launch "droid-dev" -s after --backend tuistory \
  --repo-root /path/to/candidate-worktree \
  --cols 120 --rows 36 --record /tmp/after.cast \
  --env FORCE_COLOR=3 --env COLORTERM=truecolor

Comparison setup (before/after demos)

对比设置(前后版本演示)

For before/after comparisons, you need two worktree paths — one for the baseline and one for the candidate.
  1. Find existing worktrees:
    git worktree list
    in any checkout. The main clone (often on
    dev
    or
    main
    ) is a valid baseline.
  2. Create if needed:
    git worktree add /tmp/baseline-worktree dev
    (or the relevant base branch).
  3. Ensure
    node_modules
    : Run
    npm install
    in any worktree that lacks it. This is the only setup needed — no
    npm run setup
    or CLI build per branch.
  4. Launch with
    --repo-root
    : Each
    tctl launch
    pins to one worktree.
如需进行前后版本对比,您需要两个工作树路径——一个用于基线版本,一个用于候选版本。
  1. 查找现有工作树:在任意代码仓库中执行
    git worktree list
    。主克隆(通常在
    dev
    main
    分支)可作为有效的基线版本。
  2. 按需创建工作树:执行
    git worktree add /tmp/baseline-worktree dev
    (或相关基础分支)。
  3. 确保
    node_modules
    已安装
    :在缺少
    node_modules
    的工作树中执行
    npm install
    。这是唯一需要的设置——无需按分支执行
    npm run setup
    或CLI构建。
  4. 通过
    --repo-root
    启动
    :每个
    tctl launch
    命令都会固定到一个工作树。

Environment safety

环境安全性

tctl
's runner script launches
droid-dev
via
bash -lc
, which loads a clean login shell. Stale
FACTORY_*
env vars from parent processes are typically overridden by the runner. If you suspect env contamination, pass explicit overrides with
--env
.
tctl
的运行器脚本通过
bash -lc
启动
droid-dev
,这会加载干净的登录shell。父进程中过时的
FACTORY_*
环境变量通常会被运行器覆盖。如果怀疑存在环境污染,可通过
--env
传递显式覆盖参数。

Exec mode

执行模式

Non-interactive single-shot execution:
bash
droid exec "analyze this file"
droid exec --auto medium "run the tests"
非交互式单次执行:
bash
droid exec "analyze this file"
droid exec --auto medium "run the tests"

Logging

日志

Enable debug logging by passing the log file path via
--env
:
bash
$TCTL launch "droid-dev" -s demo --backend tuistory \
  --repo-root /path/to/worktree \
  --env FACTORY_LOG_FILE=/tmp/droid-test.log
tail -f /tmp/droid-test.log
通过
--env
传递日志文件路径来启用调试日志:
bash
$TCTL launch "droid-dev" -s demo --backend tuistory \
  --repo-root /path/to/worktree \
  --env FACTORY_LOG_FILE=/tmp/droid-test.log
tail -f /tmp/droid-test.log