Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ build/
npm-debug.log*
yarn-debug.log*
yarn-error.log*


# Visual Studio Code workspace settings
.vscode/
50 changes: 50 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ id: getting-started
title: Getting Started
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Getting Started

Get PicoClaw running in 2 minutes.
Expand All @@ -11,6 +14,53 @@ Get PicoClaw running in 2 minutes.
Set your API Key in `~/.picoclaw/config.json`. Get API Keys: [Volcengine (CodingPlan)](https://console.volcengine.com) (LLM) · [OpenRouter](https://openrouter.ai/keys) (LLM) · [Zhipu](https://open.bigmodel.cn/usercenter/proj-mgmt/apikeys) (LLM). Web search is **optional** — get a free [Tavily API](https://tavily.com) (1000 free queries/month) or [Brave Search API](https://brave.com/search/api) (2000 free queries/month).
:::

## Step 0: Install PicoClaw

<Tabs>
<TabItem value="pwsh" label="PowerShell (Cross-platform)" default>

PowerShell script supports Windows and Unix-like systems.

- On Linux/macOS/FreeBSD/NetBSD, install PowerShell Core (`pwsh`) first.
- Supports user mode and system mode.
- Run the following commands in a PowerShell terminal only. Do not paste them into bash/ash/zsh.
- For users in Chinese Mainland, you may append `-Source cdn` to use the CDN source.
- `user` mode installation is **not recommended** on lightweight Linux distros (e.g. OpenWrt) due to potential PATH issues. The better option is to run the installer in `system` mode with root privileges.

```powershell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.ps1" -OutFile install-picoclaw.ps1

if (Get-Command pwsh -ErrorAction SilentlyContinue) {
pwsh -ExecutionPolicy Bypass -File ./install-picoclaw.ps1 -InstallMode user
} elseif ($env:OS -eq "Windows_NT" -and (Get-Command powershell.exe -ErrorAction SilentlyContinue)) {
powershell.exe -ExecutionPolicy Bypass -File .\install-picoclaw.ps1 -InstallMode user
} else {
throw "PowerShell executable not found. Please install PowerShell Core (pwsh)."
}
```

</TabItem>
<TabItem value="bash" label="Bash (Unix-like)">

Bash installer supports Linux/macOS/FreeBSD/NetBSD.

- Not supported on Windows.
- Requires GNU Bash 4+.
- `ash` / BusyBox shell are not supported.
- `user` mode installation is **not recommended** on lightweight Linux distros (e.g. OpenWrt) due to potential PATH issues. The better option is to run the installer in `system` mode with root privileges.

```bash
curl -fsSL https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.sh -o install-picoclaw.sh
chmod +x ./install-picoclaw.sh
# For users in Chinese Mainland, append: --source cdn
bash ./install-picoclaw.sh --mode user
```

</TabItem>
</Tabs>

See [Installation](./installation) for full installation options.

## Step 1: Initialize

```bash
Expand Down
77 changes: 73 additions & 4 deletions docs/installation.md → docs/installation/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,80 @@
---
id: installation
id: index
title: Installation
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Installation

## Option 1: Precompiled Binary (Recommended)
## Option 1: Automated Installer (Recommended)

<Tabs>
<TabItem value="pwsh" label="PowerShell (Cross-platform)" default>

PowerShell installer works on Windows and Unix-like platforms.

- On Linux/macOS/FreeBSD/NetBSD, install PowerShell Core (`pwsh`) first.
- Supports both user mode and system mode.
- Run the following commands in a PowerShell terminal only. Do not paste them into bash/ash/zsh.
- For users in Chinese Mainland, you may append `-Source cdn` to use the CDN source.
- `user` mode installation is **not recommended** on lightweight Linux distros (e.g. OpenWrt) due to potential PATH issues. The better option is to run the installer in `system` mode with root privileges.

```powershell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.ps1" -OutFile install-picoclaw.ps1

if (Get-Command pwsh -ErrorAction SilentlyContinue) {
pwsh -ExecutionPolicy Bypass -File ./install-picoclaw.ps1 -InstallMode user
} elseif ($env:OS -eq "Windows_NT" -and (Get-Command powershell.exe -ErrorAction SilentlyContinue)) {
powershell.exe -ExecutionPolicy Bypass -File .\install-picoclaw.ps1 -InstallMode user
} else {
throw "PowerShell executable not found. Please install PowerShell Core (pwsh)."
}
```

```powershell
# System install (requires Administrator/root privileges)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.ps1" -OutFile install-picoclaw.ps1

if (Get-Command pwsh -ErrorAction SilentlyContinue) {
pwsh -ExecutionPolicy Bypass -File ./install-picoclaw.ps1 -InstallMode system
} elseif ($env:OS -eq "Windows_NT" -and (Get-Command powershell.exe -ErrorAction SilentlyContinue)) {
powershell.exe -ExecutionPolicy Bypass -File .\install-picoclaw.ps1 -InstallMode system
} else {
throw "PowerShell executable not found. Please install PowerShell Core (pwsh)."
}
```

</TabItem>
<TabItem value="bash" label="Bash (Unix-like)">

Bash installer supports Unix-like systems only.

- Not supported on Windows.
- Requires GNU Bash 4+.
- `ash` / BusyBox shell are not supported.
- `user` mode installation is **not recommended** on lightweight Linux distros (e.g. OpenWrt) due to potential PATH issues. The better option is to run the installer in `system` mode with root privileges.

```bash
curl -fsSL https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.sh -o install-picoclaw.sh
chmod +x ./install-picoclaw.sh
# For users in Chinese Mainland, append: --source cdn
bash ./install-picoclaw.sh --mode user
```

```bash
# System install (requires root privileges)
curl -fsSL https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.sh -o install-picoclaw.sh
chmod +x ./install-picoclaw.sh
# For users in Chinese Mainland, append: --source cdn
sudo bash ./install-picoclaw.sh --mode system
```

</TabItem>
</Tabs>

## Option 2: Precompiled Binary

Download the latest release from the [Releases page](https://github.com/sipeed/picoclaw/releases/latest). All releases are packaged as `.tar.gz` (Linux/macOS/FreeBSD) or `.zip` (Windows).

Expand All @@ -31,7 +100,7 @@ tar -xzf picoclaw_Linux_arm64.tar.gz
./picoclaw onboard
```

## Option 2: Build from Source
## Option 3: Build from Source

Requires Go 1.21+.

Expand All @@ -54,7 +123,7 @@ make install

The binary is placed in `build/picoclaw-{platform}-{arch}`.

## Option 3: Docker Compose
## Option 4: Docker Compose

Run PicoClaw without installing anything locally.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ id: getting-started
title: 快速开始
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# 快速开始

2 分钟内启动 PicoClaw。
Expand All @@ -11,6 +14,51 @@ title: 快速开始
在 `~/.picoclaw/config.json` 中设置您的 API Key。获取 API Key:[Volcengine(CodingPlan)](https://console.volcengine.com)(LLM)· [OpenRouter](https://openrouter.ai/keys)(LLM)· [智谱 AI](https://open.bigmodel.cn/usercenter/proj-mgmt/apikeys)(LLM)。网络搜索是**可选的** — 获取免费的 [Tavily API](https://tavily.com)(每月 1000 次免费查询)或 [Brave Search API](https://brave.com/search/api)(每月 2000 次免费查询)
:::

## 第零步:安装 PicoClaw

<Tabs>
<TabItem value="pwsh" label="PowerShell(跨平台)" default>

PowerShell 安装脚本支持 Windows 与类 Unix 平台。

- Linux/macOS/FreeBSD/NetBSD 需先安装 PowerShell Core(`pwsh`)。
- 支持用户安装与系统安装两种模式。
- 以下命令必须在 PowerShell 终端执行,不能直接粘贴到 bash/ash/zsh。
- 在轻量 Linux 发行版(例如 OpenWrt)上,**不建议**使用 `user` 模式,可能会遇到 PATH 问题。更推荐使用 root 权限执行 `system` 模式安装。

```powershell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.ps1" -OutFile install-picoclaw.ps1

if (Get-Command pwsh -ErrorAction SilentlyContinue) {
pwsh -ExecutionPolicy Bypass -File ./install-picoclaw.ps1 -InstallMode user -Source cdn
} elseif ($env:OS -eq "Windows_NT" -and (Get-Command powershell.exe -ErrorAction SilentlyContinue)) {
powershell.exe -ExecutionPolicy Bypass -File .\install-picoclaw.ps1 -InstallMode user -Source cdn
} else {
throw "未找到 PowerShell 可执行程序,请先安装 PowerShell Core(pwsh)。"
}
```

</TabItem>
<TabItem value="bash" label="Bash(类 Unix)">

Bash 安装脚本支持 Linux/macOS/FreeBSD/NetBSD。

- 暂不支持 Windows。
- 需要 GNU Bash 4+。
- 不支持 `ash` / BusyBox 等轻量 shell。
- 在轻量 Linux 发行版(例如 OpenWrt)上,**不建议**使用 `user` 模式,可能会遇到 PATH 问题。更推荐使用 root 权限执行 `system` 模式安装。

```bash
curl -fsSL https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.sh -o install-picoclaw.sh
chmod +x ./install-picoclaw.sh
bash ./install-picoclaw.sh --mode user --source cdn
```

</TabItem>
</Tabs>

完整安装方式请查看 [安装页面](./installation)。

## 第一步:初始化

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,77 @@
---
id: installation
id: index
title: 安装
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# 安装

## 方式一:使用预编译二进制文件(推荐)
## 方式一:自动化安装(推荐)

<Tabs>
<TabItem value="pwsh" label="PowerShell(跨平台)" default>

PowerShell 安装脚本可用于 Windows 与类 Unix 平台。

- Linux/macOS/FreeBSD/NetBSD 需先安装 PowerShell Core(`pwsh`)。
- 支持用户安装与系统安装两种模式。
- 以下命令必须在 PowerShell 终端执行,不能直接粘贴到 bash/ash/zsh。
- 在轻量 Linux 发行版(例如 OpenWrt)上,**不建议**使用 `user` 模式,可能会遇到 PATH 问题。更推荐使用 root 权限执行 `system` 模式安装。

```powershell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.ps1" -OutFile install-picoclaw.ps1

if (Get-Command pwsh -ErrorAction SilentlyContinue) {
pwsh -ExecutionPolicy Bypass -File ./install-picoclaw.ps1 -InstallMode user -Source cdn
} elseif ($env:OS -eq "Windows_NT" -and (Get-Command powershell.exe -ErrorAction SilentlyContinue)) {
powershell.exe -ExecutionPolicy Bypass -File .\install-picoclaw.ps1 -InstallMode user -Source cdn
} else {
throw "未找到 PowerShell 可执行程序,请先安装 PowerShell Core(pwsh)。"
}
```

```powershell
# 系统安装(需要管理员或 root 权限)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.ps1" -OutFile install-picoclaw.ps1

if (Get-Command pwsh -ErrorAction SilentlyContinue) {
pwsh -ExecutionPolicy Bypass -File ./install-picoclaw.ps1 -InstallMode system -Source cdn
} elseif ($env:OS -eq "Windows_NT" -and (Get-Command powershell.exe -ErrorAction SilentlyContinue)) {
powershell.exe -ExecutionPolicy Bypass -File .\install-picoclaw.ps1 -InstallMode system -Source cdn
} else {
throw "未找到 PowerShell 可执行程序,请先安装 PowerShell Core(pwsh)。"
}
```

</TabItem>
<TabItem value="bash" label="Bash(类 Unix)">

Bash 安装脚本仅支持类 Unix 系统。

- 暂不支持 Windows。
- 需要 GNU Bash 4+。
- 不支持 `ash` / BusyBox 等轻量 shell。
- 在轻量 Linux 发行版(例如 OpenWrt)上,**不建议**使用 `user` 模式,可能会遇到 PATH 问题。更推荐使用 root 权限执行 `system` 模式安装。

```bash
curl -fsSL https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.sh -o install-picoclaw.sh
chmod +x ./install-picoclaw.sh
bash ./install-picoclaw.sh --mode user --source cdn
```

```bash
# 系统安装(需要 root 权限)
curl -fsSL https://raw.githubusercontent.com/sipeed/picoclaw_docs/main/static/scripts/picoclaw/install-picoclaw.sh -o install-picoclaw.sh
chmod +x ./install-picoclaw.sh
sudo bash ./install-picoclaw.sh --mode system --source cdn
```

</TabItem>
</Tabs>

## 方式二:使用预编译二进制文件

从 [Releases 页面](https://github.com/sipeed/picoclaw/releases/latest) 下载最新版本。所有版本打包为 `.tar.gz`(Linux/macOS/FreeBSD)或 `.zip`(Windows)。

Expand All @@ -31,7 +97,7 @@ tar -xzf picoclaw_Linux_arm64.tar.gz
./picoclaw onboard
```

## 方式二:从源码构建
## 方式三:从源码构建

需要 Go 1.21+。

Expand All @@ -52,7 +118,7 @@ make build-all
make install
```

## 方式三:Docker Compose
## 方式四:Docker Compose

无需本地安装,直接运行。

Expand Down
2 changes: 1 addition & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const sidebars = {
label: 'Installation',
collapsible: true,
collapsed: true,
link: { type: 'doc', id: 'installation' },
link: { type: 'doc', id: 'installation/index' },
items: [
'installation/licheervnano',
'installation/maixcam',
Expand Down
Loading