Skip to content

Commit 776499d

Browse files
committed
修正文档内容与实际代码一致
修正下载文件格式(.dmg/.deb)、CLI 命令、日志文件名、加密方式描述、 代理类型、审批按钮名称、设置页路径等。添加代码块语法高亮。
1 parent 0ef9c31 commit 776499d

22 files changed

Lines changed: 133 additions & 142 deletions

File tree

‎docs/cli/exec.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This command requires approval from the running desktop app:
3232

3333
- Commands matching the asset's **allow list** execute without approval
3434
- Commands matching the **deny list** are rejected immediately
35-
- A session is auto-created if not specified. Once the user approves with "Allow Session", subsequent commands in the same session skip approval
35+
- A session is auto-created if not specified. Clicking "Remember" in the approval dialog stores the pattern, auto-approving matching subsequent commands in the same session
3636
- When the desktop app is offline, only commands matching the allow-list policy or a pre-approved grant are permitted
3737

3838
## Examples

‎docs/cli/overview.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ When the OpsKat desktop app is running, `opsctl` automatically connects to it vi
3737

3838
- **Connection pooling** — reuses the desktop app's SSH connections instead of opening new ones
3939
- **Approval workflow** — write operations (exec, cp, create, update) prompt an approval dialog in the desktop app
40-
- **Session approval** — once the user clicks "Allow Session", all subsequent operations in the same session are auto-approved
40+
- **Session approval** — clicking "Remember" in the approval dialog stores the command pattern for the current session, auto-approving matching subsequent operations
4141

4242
When the desktop app is not running, `opsctl` falls back to direct connections using the shared database and credentials.
4343

‎docs/development/architecture.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Standalone CLI for asset management and remote operations without the GUI:
4747
- `exec <asset-id> -- <command>` -- SSH command execution with stdio piping
4848
- `cp` -- scp-style file transfer: local-to-remote, remote-to-local, and remote-to-remote (direct streaming, no local disk)
4949
- `ssh <asset-id>` -- Interactive SSH terminal session
50-
- `db <asset-id>` / `sql <asset-id>` -- Database query execution
50+
- `sql <asset-id>` -- Database query execution
5151
- `redis <asset-id>` -- Redis command execution
5252
- `session` -- Session management for batch approval workflows
5353
- `grant submit` -- Submit command patterns for pre-approval
@@ -237,7 +237,7 @@ Resolved by `bootstrap.AppDataDir()`:
237237
| Windows | `%APPDATA%/opskat` |
238238
| Linux | `~/.config/opskat` |
239239

240-
Database, config, and logs (`info.log`, `error.log`) are stored here. opsctl can override with `--data-dir`.
240+
Database, config, and logs (`logs/opskat.log`, `logs/error.log`) are stored here. opsctl can override with `--data-dir`.
241241

242242
## Key Conventions
243243

‎docs/getting-started/installation.md‎

Lines changed: 42 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,65 @@ sidebar_label: Installation
55

66
# Installation
77

8-
OpsKat runs on macOS, Linux, and Windows. You can download a pre-built binary or build from source.
8+
OpsKat runs on macOS, Linux, and Windows.
99

10-
## Prerequisites
10+
## Download
1111

12-
Building from source requires:
12+
Download the latest release from [GitHub Releases](https://github.com/opskat/opskat/releases/latest):
1313

14-
| Dependency | Version | Purpose |
14+
| Platform | Architecture | File |
1515
|---|---|---|
16-
| [Go](https://go.dev/) | 1.25+ | Backend |
17-
| [Node.js](https://nodejs.org/) | 22+ | Frontend build |
18-
| [pnpm](https://pnpm.io/) | latest | Frontend package manager |
19-
| [Wails v2 CLI](https://wails.io/docs/gettingstarted/installation) | v2 | Desktop app framework |
16+
| macOS | Apple Silicon (M1/M2/M3/M4) | `opskat-vX.X.X-darwin-arm64.dmg` |
17+
| macOS | Intel | `opskat-vX.X.X-darwin-amd64.dmg` |
18+
| Windows | x64 | `opskat-vX.X.X-windows-amd64-installer.exe` |
19+
| Linux | x64 | `opskat-vX.X.X-linux-amd64.deb` |
20+
21+
- **macOS** — Open the `.dmg` file and drag OpsKat to the Applications folder.
22+
- **Windows** — Run the `.exe` installer and follow the prompts.
23+
- **Linux** — Install the `.deb` package: `sudo dpkg -i opskat-vX.X.X-linux-amd64.deb`
24+
25+
## Installing opsctl
26+
27+
The `opsctl` CLI tool can be installed in two ways:
28+
29+
1. **From the desktop app (recommended)** — One-click install from the Settings page. The embedded binary is extracted to `~/.local/bin/` (Linux/macOS) or `%LOCALAPPDATA%/opsctl` (Windows).
30+
2. **From source** — Run `make install-cli` to build and install to `$GOPATH/bin`.
2031

21-
Install the Wails CLI after Go is set up:
32+
Verify the installation:
2233

2334
```bash
24-
go install github.com/wailsapp/wails/v2/cmd/wails@latest
35+
opsctl --help
2536
```
2637

27-
## Download Pre-built Binaries
38+
## Building from Source
2839

29-
Pre-built binaries for macOS, Linux, and Windows will be available on the [GitHub Releases](https://github.com/nicoxiang/opskat/releases) page.
40+
If you prefer to build from source, you'll need:
3041

31-
## Building from Source
42+
| Dependency | Version | Purpose |
43+
|---|---|---|
44+
| [Go](https://go.dev/) | 1.25+ | Backend |
45+
| [Node.js](https://nodejs.org/) | 22+ | Frontend build |
46+
| [pnpm](https://pnpm.io/) | latest | Frontend package manager |
47+
| [Wails v2 CLI](https://wails.io/docs/gettingstarted/installation) | v2 | Desktop app framework |
3248

33-
Clone the repository and build:
49+
Install the Wails CLI:
3450

3551
```bash
36-
git clone https://github.com/nicoxiang/opskat.git
37-
cd opskat
38-
make install # Install frontend dependencies (pnpm install)
39-
make build # Production build (desktop app only)
52+
go install github.com/wailsapp/wails/v2/cmd/wails@latest
4053
```
4154

42-
To build with the embedded `opsctl` CLI (recommended for full functionality):
55+
Clone and build:
4356

4457
```bash
45-
make build-embed # Production build with embedded opsctl binary
58+
git clone https://github.com/opskat/opskat.git
59+
cd opskat
60+
make install # Install frontend dependencies
61+
make build-embed # Production build with embedded opsctl
4662
```
4763

4864
The built application will be in the `build/bin/` directory.
4965

50-
### Build Targets
66+
### Build Commands
5167

5268
| Command | Description |
5369
|---|---|
@@ -58,43 +74,20 @@ The built application will be in the `build/bin/` directory.
5874
| `make build-cli` | Build the opsctl CLI only |
5975
| `make install-cli` | Install opsctl to `$GOPATH/bin` |
6076

61-
### Development Mode
62-
63-
For development with hot reload on both frontend and backend:
64-
65-
```bash
66-
make dev
67-
```
68-
6977
## Platform Support
7078

71-
OpsKat supports all three major desktop platforms:
72-
73-
- **macOS** (Intel and Apple Silicon)
74-
- **Linux** (x86_64)
75-
- **Windows** (x86_64)
79+
- **macOS** — Intel and Apple Silicon
80+
- **Linux** — x86_64
81+
- **Windows** — x86_64
7682

7783
## App Data Directory
7884

79-
OpsKat stores its database (`opskat.db`), configuration, and logs in a platform-specific directory:
85+
OpsKat stores its database, configuration, and logs in:
8086

8187
| Platform | Path |
8288
|---|---|
8389
| macOS | `~/Library/Application Support/opskat` |
8490
| Windows | `%APPDATA%/opskat` |
8591
| Linux | `~/.config/opskat` |
8692

87-
The `opsctl` CLI uses the same data directory by default, but you can override it with the `--data-dir` flag.
88-
89-
## Installing opsctl
90-
91-
The `opsctl` CLI tool can be installed in two ways:
92-
93-
1. **From the desktop app** — One-click install from the Settings page. The embedded binary is extracted to `~/.local/bin/` (Linux/macOS) or `%LOCALAPPDATA%/opsctl` (Windows).
94-
2. **From source** — Run `make install-cli` to build and install to `$GOPATH/bin`.
95-
96-
Verify the installation:
97-
98-
```bash
99-
opsctl --help
100-
```
93+
The `opsctl` CLI uses the same directory by default. Override with `--data-dir`.

‎docs/getting-started/quick-start.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The main interface has a sidebar with:
3131
- **Password / Private Key** — Your credentials
3232
4. Click **Save**.
3333

34-
Credentials are encrypted using your OS keyring before being stored in the local database.
34+
Credentials are encrypted with AES-256-GCM before being stored in the local database. The encryption key is managed via your OS keyring.
3535

3636
### Database (MySQL / PostgreSQL)
3737

@@ -62,7 +62,7 @@ The AI Agent lets you manage infrastructure through natural language. Before usi
6262

6363
### Option 1: OpenAI-compatible API
6464

65-
1. Go to **Settings > AI Agent**.
65+
1. Open **Settings** and go to the **AI** tab.
6666
2. Select **OpenAI API** as the provider.
6767
3. Enter your API endpoint and API key.
6868
4. Choose a model (e.g., `gpt-4o`).
@@ -73,13 +73,13 @@ This works with any OpenAI-compatible API, including self-hosted models.
7373
### Option 2: Claude CLI
7474

7575
1. Install [Claude Code](https://docs.anthropic.com/en/docs/claude-code) on your machine.
76-
2. In **Settings > AI Agent**, select **Claude CLI**.
76+
2. In **Settings > AI**, select **Claude CLI**.
7777
3. OpsKat will use the Claude CLI binary directly.
7878

7979
### Option 3: Codex CLI
8080

8181
1. Install [Codex CLI](https://github.com/openai/codex) on your machine.
82-
2. In **Settings > AI Agent**, select **Codex CLI**.
82+
2. In **Settings > AI**, select **Codex CLI**.
8383

8484
## Your First AI Conversation
8585

‎docs/guide/ai-agent.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ OpsKat's AI Agent lets you manage infrastructure through natural-language conver
99

1010
## Provider Configuration
1111

12-
The AI Agent supports three provider backends. Configure your preferred provider in **Settings > AI Agent**.
12+
The AI Agent supports three provider backends. Configure your preferred provider in **Settings > AI**.
1313

1414
### OpenAI-compatible API
1515

@@ -92,7 +92,7 @@ OpsKat integrates with AI coding CLIs like **Claude Code** and **Codex**. One-cl
9292

9393
### Installing Skills
9494

95-
1. Go to **Settings > AI Coding Integration**.
95+
1. Open **Settings** and go to the **AI** tab.
9696
2. Click **Install** next to Claude Code or Codex.
9797
3. The skill file is symlinked to the appropriate location (e.g., `~/.claude/skills/opsctl` for Claude Code).
9898

‎docs/guide/asset-management.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SSH server assets for terminal access, command execution, and file transfer.
1818
- **Username** — Login user
1919
- **Auth Type** — `password` or `key`
2020
- **Jump Host** — Optional jump host chain for bastion access
21-
- **Proxy** — Optional SOCKS5/SOCKS4/HTTP proxy
21+
- **Proxy** — Optional SOCKS5/SOCKS4 proxy
2222

2323
### Database (MySQL / PostgreSQL)
2424

@@ -65,7 +65,7 @@ Right-click an asset and select **Delete**. Assets are soft-deleted (marked as d
6565

6666
## Credential Management
6767

68-
All credentials (passwords and SSH private keys) are encrypted before storage using AES encryption. The encryption key is derived from your OS keyring:
68+
All credentials (passwords and SSH private keys) are encrypted with AES-256-GCM before storage. The master encryption key is stored in your OS keyring:
6969

7070
- **macOS** — Keychain
7171
- **Windows** — Windows Credential Manager

‎docs/guide/audit.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Grants can be submitted from two places:
8787
Example from `opsctl`:
8888

8989
```bash
90-
opsctl grant submit --asset 1 --commands "cat /var/log/*" "systemctl * nginx"
90+
opsctl grant submit 1 "cat /var/log/*" "systemctl * nginx"
9191
```
9292

9393
### Grant Lifecycle

‎docs/guide/policy.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ OpsKat ships with built-in policy groups (these cannot be modified):
9595

9696
You can create custom policy groups:
9797

98-
1. Go to **Settings > Policy Groups**.
98+
1. Open the policy group management page.
9999
2. Click **Create** and select the policy type (command, query, or redis).
100100
3. Define your allow/deny rules.
101101
4. Save the group.

‎docs/guide/ssh-terminal.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ Port forwarding configurations are saved per-asset and can include multiple rule
7070

7171
## SOCKS Proxy
7272

73-
Configure a SOCKS5, SOCKS4, or HTTP proxy for the SSH connection. This is useful when the SSH server is only reachable through a proxy.
73+
Configure a SOCKS proxy for the SSH connection. This is useful when the SSH server is only reachable through a proxy.
7474

7575
Set the proxy in the asset's SSH configuration:
7676

77-
- **Type** — `socks5`, `socks4`, or `http`
77+
- **Type** — `socks5` or `socks4`
7878
- **Host / Port** — Proxy server address
7979
- **Username / Password** — Optional proxy authentication
8080

0 commit comments

Comments
 (0)