> ## 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.

# Olostep CLI

> 从终端抓取网站、搜索网络并管理你的 Olostep 账户。

Olostep CLI 是 `olostep` 命令。它可以从你的终端、脚本以及 AI 编码代理中运行 Olostep，并登录到你在仪表板上使用的相同 Olostep 账户。

使用 CLI，你可以：

* [抓取、搜索、映射、爬取、研究和提取](https://docs.olostep.com/cli/reference/web-data.md) 网络数据。
* [运行和检查任务](https://docs.olostep.com/cli/reference/jobs.md)：批处理、爬取、监控、研究代理和请求日志。
* [管理你的账户](https://docs.olostep.com/cli/reference/account-billing.md)：团队、API 密钥、积分和账单。
* 使用 `olostep chat` [用简单的语言询问 Olostep 代理](https://docs.olostep.com/cli/reference/cli-commands.md#olostep-chat)任何事情。
* 使用 `--json` 为脚本和 [AI 代理](https://docs.olostep.com/cli/ai-agents.md)打印精确的 JSON。

## 安装

CLI 需要 [Node.js](https://nodejs.org) 20.19 或更新版本。在 macOS 或 Linux 上，运行：

```bash theme={null}
curl -fsSL https://cli.olostep.com | sh
```

该脚本将 CLI 安装到 `~/.olostep` 并将 `olostep` 添加到你的 `PATH`。查看 [安装和更新](https://docs.olostep.com/cli/install.md) 以获取详细信息、更新和卸载。

## 快速开始

**1. 登录**

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

你的浏览器将打开 Olostep 登录页面。使用你的 Olostep 账户登录并返回终端。

**2. 检查你的账户**

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

显示你的账户、团队、计划和积分余额。

**3. 抓取一个页面**

```bash theme={null}
olostep scrape https://example.com -f markdown
```

**4. 搜索网络**

```bash theme={null}
olostep search "best hiking trails"
```

**5. 为脚本获取 JSON**

```bash theme={null}
olostep credits balance --json
```

## 常用命令

| 任务 | 命令 |
| - | - |
| 抓取一个页面 | `olostep scrape https://example.com -f markdown` |
| 搜索网络 | `olostep search "query"` |
| 列出网站的 URL | `olostep map https://example.com -n 20` |
| 爬取一个网站 | `olostep crawl https://example.com -n 20` |
| 研究一个问题 | `olostep answer "Compare these products"` |
| 提取结构化数据 | `olostep extract https://example.com -i "Extract product prices"` |
| 检查你的积分 | `olostep credits balance` |
| 将 API 密钥保存到 `.env` | `olostep keys reveal <key> --write-env .env` |
| 询问代理 | `olostep chat "<request>"` |
| 查找命令 | `olostep help <words>` |

每个命令都有帮助。帮助在不登录的情况下也能使用：

```bash theme={null}
olostep --help
olostep scrape --help
olostep scrape create --help
```

## 了解更多

> **[安装和更新](https://docs.olostep.com/cli/install.md)**
>
> 要求、更新和卸载。

> **[认证](https://docs.olostep.com/cli/authentication.md)**
>
> 登录、登出和 CI 的令牌。

> **[使用](https://docs.olostep.com/cli/usage.md)**
>
> 输出、`--json`、全局标志、环境变量和退出代码。

> **[与 AI 代理一起使用](https://docs.olostep.com/cli/ai-agents.md)**
>
> 编码代理如何运行 CLI，以及 `skill` 和 `tools` 命令。

要从 MCP 客户端（如 Claude、Cursor 或 VS Code）而不是终端使用 Olostep，请参阅 [MCP 服务器](https://docs.olostep.com/integrations/mcp-server.md)。


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