> ## Documentation Index
> Fetch the complete documentation index at: https://platform.stepfun.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# step 命令

在终端中使用 `step` 启动会话，或通过子命令管理安装、资源包和 MCP。

```text theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
step [选项] [--] [@文件...] [任务描述...]
```

查看当前版本提供的参数：

```bash theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
step --help
step --version
```

## 模型参数

| 参数                    | 说明                                                        |
| --------------------- | --------------------------------------------------------- |
| `--provider <名称>`     | 平台名称，如 `step`、`anthropic`、`openai`                        |
| `--model <模型>`        | 模型 ID 或匹配模式，支持 `provider/id` 和思考级别后缀                      |
| `--api-key <密钥>`      | 覆盖其他凭据来源；注意 Shell 历史和进程参数暴露风险                             |
| `--thinking <级别>`     | `off`、`minimal`、`low`、`medium`、`high`、`xhigh`、`max`，需模型支持 |
| `--models <列表>`       | Ctrl+P 循环模型列表，逗号分隔                                        |
| `--list-models [搜索词]` | 列出可用模型                                                    |

```bash theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
step --provider step --model step-3.7-flash
step --list-models flash
```

## 会话参数

| 参数                      | 说明                         |
| ----------------------- | -------------------------- |
| `-c`、`--continue`       | 继续最近一次会话                   |
| `-r`、`--resume`         | 浏览并选择历史会话，可附带路径或 ID        |
| `--session <路径或 ID>`    | 指定会话，支持部分 ID               |
| `--fork <路径或 ID>`       | 派生指定会话                     |
| `--session-dir <目录>`    | 自定义会话目录                    |
| `--no-session`          | 不保存本次会话                    |
| `--name <名称>`、`-n <名称>` | 设置会话名称                     |
| `-p`、`--print`          | 执行一次任务并退出，支持 stdin 和 `@文件` |

```bash theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
step --name "接口审查" @README.md "梳理接口约定"
step -p @screenshot.png "解释这张截图中的错误"
step --no-session -p "解释语义化版本号"
```

## 工具参数

| 参数                                | 说明                    |
| --------------------------------- | --------------------- |
| `--tools <列表>`、`-t <列表>`          | 工具白名单，逗号分隔；作用于内置和扩展工具 |
| `--exclude-tools <列表>`、`-xt <列表>` | 排除工具                  |
| `--no-builtin-tools`、`-nbt`       | 关闭内置工具，保留扩展工具         |
| `--no-tools`、`-nt`                | 关闭所有工具                |

例如，限制工具范围为文件读取与搜索：

```bash theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
step --tools read,grep,find,ls -p "检查 README 与项目结构是否一致，不修改文件"
```

权限与危险操作说明见[交互与输入](/docs/zh/step-code/guides/interaction#审批流程)。

## 资源参数

| 参数                                                                    | 说明               |
| --------------------------------------------------------------------- | ---------------- |
| `-e <来源>`、`--extension <来源>`                                          | 临时加载扩展，可重复       |
| `--skill <路径>`                                                        | 显式加载 Skill，可重复   |
| `--prompt-template <路径>`                                              | 加载 prompt 模板，可重复 |
| `--theme <路径>`                                                        | 加载主题资源，可重复       |
| `--no-extensions`、`--no-skills`、`--no-prompt-templates`、`--no-themes` | 关闭对应资源的自动发现      |
| `--no-context-files`、`-nc`                                            | 不自动加载项目指引        |

显式指定的资源可与关闭自动发现的选项配合使用；它们仍需来自可信来源。

## 其他参数

| 参数                       | 说明                          |
| ------------------------ | --------------------------- |
| `--plan`                 | 启动即进入 Plan 模式               |
| `--tui-mode <模式>`        | `regular` 或实验性 `fullscreen` |
| `--approval-mode <模式>`   | 非交互模式下的审批策略                 |
| `--version`              | 查看版本                        |
| `--use-theme <名称>`       | 本次启动使用的主题                   |
| `--export <会话文件> [输出文件]` | 导出会话为 HTML                  |
| `--`                     | 结束选项解析，其后作为消息或文件引用          |

## 子命令

| 命令                         | 说明                                                 |
| -------------------------- | -------------------------------------------------- |
| `step update`              | 更新到最新稳定版，别名 `step upgrade`                         |
| `step update <版本号>`        | 安装指定版本，例如 `step update 0.4.0`                      |
| `step update --all`        | 更新 Step 与全部包                                       |
| `step update --extensions` | 仅更新包                                               |
| `step install <来源>`        | 安装资源包                                              |
| `step remove <来源>`         | 移除资源包                                              |
| `step list`                | 列出资源包                                              |
| `step config`              | 可视化管理资源，Tab 切换全局与项目范围                              |
| `step mcp`                 | MCP 的 `list`、`get`、`add`、`remove`、`login`、`logout` |
| `step login`、`step logout` | Step 账号登录或退出                                       |
| `step login status`        | 查看 Step 登录方式和状态                                    |

更新流程包括下载、checksum 校验、冒烟测试和失败回滚。指定版本示例中的 `0.4.0` 请替换为所需的发行版本。包来源和版本锁定规则见[插件](/docs/zh/step-code/customization/plugins)。

## 下一步

* [斜杠命令](/docs/zh/step-code/reference/slash-commands)
* [键盘快捷键](/docs/zh/step-code/reference/keyboard-shortcuts)
* [配置文件](/docs/zh/step-code/configuration/files)
