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

# CLI 命令

> login, logout, whoami, chat, help, tools, skill 和 update。

这些命令在 CLI 本身上工作：登录、与 Olostep 代理对话、查找命令和更新。

## 登录

### olostep login

使用你的 Olostep 账户登录。你的浏览器会打开 Olostep 登录页面；登录后，CLI 会在此计算机上保存登录信息。

```bash theme={null}
olostep login
```

参见 [认证](https://docs.olostep.com/cli/authentication.md)。

### olostep logout

在此计算机上注销。Olostep 撤销此计算机的连接，CLI 忘记保存的登录信息。

```bash theme={null}
olostep logout
```

### olostep whoami

显示你登录的 Olostep 账户、你的团队、团队的计划及其信用余额。与 `olostep account info` 相同。

```bash theme={null}
olostep whoami [--json] [--fields a,b]
```

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep whoami
olostep whoami --json
```

## 向代理提问

### olostep chat

用简单的语言向 Olostep 代理询问任何事情，它会完成。如果有消息，它会发送该消息并打印回复。如果没有消息，它会在你的终端中打开一个对话，直到你输入 `/exit`。

```bash theme={null}
olostep chat ["<message>"] [--json] [--plain] [--new]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--json` | 否 | 以 JSON 格式打印完整响应。 |
| `--plain` | 否 | 按原样打印回复，并且永远不打开全屏视图。当编码代理运行 CLI 时默认开启。 |
| `--new` | 否 | 开始一个新对话。忘记此终端保存的对话引用；代理为你保存的历史记录保持不变。 |

```bash theme={null}
olostep chat "上周我们用了多少积分？"
olostep chat "抓取 https://example.com/pricing 并列出计划"
olostep chat --new
```

在对话视图中：

| 键 | 操作 |
| - | - |
| Enter | 发送。 |
| Shift+Enter, Alt+Enter, 或 `\` 然后 Enter | 新行。 |
| Ctrl+O | 显示或隐藏工具详情。 |
| PageUp, PageDown | 滚动。 |
| Tab | 完成 `/help`、`/details`、`/new` 和 `/exit`。 |
| Escape | 停止等待回复。代理已接受的工作可能仍会完成。 |
| Ctrl+D | 离开，从空提示符开始。 |

没有消息的 `olostep chat` 需要一个终端。从脚本中，总是传递消息；没有消息会以代码 `2` 退出。

## 查找命令

### olostep help

通过它们的功能查找命令。列出名称或描述中包含你提供的每个单词的命令。

```bash theme={null}
olostep help <words>...
```

```bash theme={null}
olostep help invoices
olostep help monitor pause
```

### olostep tools

列出 Olostep 服务器上的每个工具，或打印一个工具的完整描述：其输入、输出和提示。更改某些内容的工具标记为 `(changes things)`。

```bash theme={null}
olostep tools [--search text] [--json] [<tool>]
```

**参数**

| 参数 | 描述 |
| - | - |
| `tool` | 一个工具的名称。可选。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--search` | 否 | 仅名称或描述中包含此文本的工具。 |
| `--json` | 否 | 打印 JSON。 |

```bash theme={null}
olostep tools --search monitor
olostep tools scrape_create
```

### olostep skill

列出技能，或读取你命名的技能。技能是为一种任务编写的简短指令集，适用于 AI 代理。`olostep-cli` 是 CLI 本身的指南，由其命令生成。

```bash theme={null}
olostep skill list
olostep skill get <name> [name...] [--json] [--write <dir>]
```

**参数**

| 参数 | 描述 |
| - | - |
| `action/name...` | `list`，或 `get` 后跟一个或多个技能名称。没有参数时，列出技能。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--json` | 否 | 以 JSON 记录格式打印你命名的技能。 |
| `--write` | 否 | 将你命名的每个技能写入此技能文件夹中，格式为 `<dir>/<name>/SKILL.md`。 |

```bash theme={null}
olostep skill list
olostep skill get credit-usage
olostep skill get olostep-cli --write .claude/skills
```

参见 [与 AI 代理一起使用](https://docs.olostep.com/cli/ai-agents.md#olostep-skill)。

## 更新

### olostep update

将 CLI 更新到最新版本。运行 `curl -fsSL https://cli.olostep.com | sh`。

```bash theme={null}
olostep update
```

参见 [安装和更新](https://docs.olostep.com/cli/install.md#update)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.