# 命令索引与通用选项

快速查找当前 Semifold 命令、对应行为页面和全局执行选项。

Source: https://semifold.noctisynth.org/zh/docs/commands/reference/
Language: zh



```text
smif [OPTIONS] <COMMAND>
```

`semifold` 是等价的完整命令名。本页是命令索引；逐条行为、默认交互路径和失败语义在对应命令页面中说明。运行 `smif <command> --help` 可以查看当前安装版本的参数类型、默认值、可重复性和冲突关系。

## 命令 [#命令]

| 命令                     | 语法                                            | 详细行为                                       |
| ---------------------- | --------------------------------------------- | ------------------------------------------ |
| `init`                 | `smif init [OPTIONS]`                         | [初始化](https://semifold.noctisynth.org/zh/docs/commands/init/)             |
| `commit`（`add`）        | `smif commit [OPTIONS]`                       | [创建变更集](https://semifold.noctisynth.org/zh/docs/commands/commit/)         |
| `config sync`          | `smif config sync [OPTIONS]`                  | [维护配置](https://semifold.noctisynth.org/zh/docs/commands/config/)          |
| `config migrate`       | `smif config migrate [OPTIONS]`               | [维护配置](https://semifold.noctisynth.org/zh/docs/commands/config/)          |
| `config channel set`   | `smif config channel set [OPTIONS] <CHANNEL>` | [维护配置](https://semifold.noctisynth.org/zh/docs/commands/config/)          |
| `config channel clear` | `smif config channel clear [OPTIONS]`         | [维护配置](https://semifold.noctisynth.org/zh/docs/commands/config/)          |
| `status`               | `smif status [OPTIONS]`                       | [检查版本决定](https://semifold.noctisynth.org/zh/docs/commands/status/)        |
| `version`              | `smif version [OPTIONS]`                      | [应用版本修改](https://semifold.noctisynth.org/zh/docs/commands/version/)       |
| `publish`              | `smif publish [OPTIONS]`                      | [执行发布](https://semifold.noctisynth.org/zh/docs/commands/publish/)         |
| `ci`                   | `smif ci [OPTIONS]`                           | [GitHub Actions 编排](https://semifold.noctisynth.org/zh/docs/commands/ci/) |
| `mcp`                  | `smif mcp [OPTIONS]`                          | [MCP 服务器](https://semifold.noctisynth.org/zh/docs/commands/mcp/)          |

## 全局选项 [#全局选项]

| 选项               | 含义                                                                                   |
| ---------------- | ------------------------------------------------------------------------------------ |
| `--dry-run`      | 为所有命令启用预演。不会修改 Semifold 管理的文件、registry 或 Forge 资源及 Pull Request 评论；明确允许预演的配置命令仍可能执行。 |
| `--debug`        | 启用额外诊断，但不会把敏感配置变成公开输出契约。                                                             |
| `-h`、`--help`    | 输出当前命令层级的帮助。                                                                         |
| `-V`、`--version` | 输出可执行文件版本。                                                                           |

## 命令专用选项速查 [#命令专用选项速查]

### `init` [#init]

`--target`、可重复的 `--resolvers`、`--no-resolvers`、`--force`、`--base-branch`、`--release-branch`、`--default-tags`、`--no-default-tags`、`--github-actions`、`--no-github-actions` 和 `--allow-non-root`。

### `commit` [#commit]

`--name`、`--level`、可重复的 `--summary`、可重复的 `--package PACKAGE[=LEVEL]`、`--tag` 和 `--no-tag`。

### `config` [#config]

* `sync`：`--check`、`--prune`、可重复的 `--resolver`；
* `migrate`：`--check`；
* `channel set`：位置参数 `CHANNEL`、`--bump`、可重复的 `--package` 或 `--all`、`--check`；
* `channel clear`：可重复的 `--package` 或 `--all`、`--check`。

### 发布相关命令 [#发布相关命令]

* `status`：`--comment`；
* `version`：`--allow-dirty`；
* `publish`：`--github-release`、`--allow-dirty`；
* `ci`：没有专用选项；
* `mcp`：`-C`、`--project-root`（别名 `--cd`）。

