Skip to content

Commit 2b8e7e9

Browse files
committed
docs: add README for vikacli, bump to 0.1.2
1 parent 8fc85fb commit 2b8e7e9

4 files changed

Lines changed: 94 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/vika-sdk", "crates/vika-cli"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.1.1"
6+
version = "0.1.2"
77
edition = "2021"
88
authors = ["Vika Rust Contributors"]
99
license = "MIT"

crates/vika-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "vikacli"
33
description = "CLI for Vika (vikadata) API — designed for AI agents"
44
keywords = ["vika", "vikadata", "cli", "ai-agent"]
55
categories = ["command-line-utilities"]
6-
default-run = "vika"
6+
readme = "README.md"
77
version.workspace = true
88
edition.workspace = true
99
authors.workspace = true

crates/vika-cli/README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# vikacli
2+
3+
CLI for the [Vika](https://vika.cn) (vikadata) API — designed for AI agents.
4+
5+
All commands output JSON. Binary name is `vika`.
6+
7+
## Install
8+
9+
**Download pre-built binary (recommended)**
10+
11+
Go to the [Releases page](https://github.com/vikadata/vika-cli/releases) and download for your platform:
12+
13+
| Platform | File |
14+
|----------|------|
15+
| Linux x86_64 | `vika-linux-x86_64` |
16+
| Linux ARM64 | `vika-linux-aarch64` |
17+
| macOS x86_64 | `vika-macos-x86_64` |
18+
| macOS Apple Silicon | `vika-macos-aarch64` |
19+
| Windows x86_64 | `vika-windows-x86_64.exe` |
20+
21+
```bash
22+
# Linux / macOS
23+
chmod +x vika-linux-x86_64
24+
sudo mv vika-linux-x86_64 /usr/local/bin/vika
25+
```
26+
27+
**Or build from source**
28+
29+
```bash
30+
cargo install vikacli
31+
```
32+
33+
## Setup
34+
35+
```bash
36+
export VIKA_TOKEN=uskYourTokenHere
37+
```
38+
39+
## Usage
40+
41+
```bash
42+
# Discover
43+
vika spaces list
44+
vika nodes list <space_id>
45+
vika nodes search <space_id> --node-type Datasheet --query "my sheet"
46+
47+
# Read
48+
vika records list <datasheet_id>
49+
vika records list <datasheet_id> --view-id <view_id> --page-size 50
50+
vika records list <datasheet_id> --filter '{Status}="Done"'
51+
vika fields list <datasheet_id>
52+
vika views list <datasheet_id>
53+
54+
# Write
55+
vika records create <datasheet_id> --data '[{"fields":{"Title":"Hello"}}]'
56+
vika records update <datasheet_id> --data '[{"recordId":"recXxx","fields":{"Title":"Updated"}}]'
57+
vika records delete <datasheet_id> --ids recXxx,recYyy
58+
59+
# Compact JSON (for piping)
60+
vika records list <datasheet_id> --compact | jq '.records[0]'
61+
```
62+
63+
## For AI Agents
64+
65+
Paste into your agent's system prompt:
66+
67+
```
68+
You have access to the `vika` CLI for reading and writing Vika spreadsheets.
69+
All commands output JSON. VIKA_TOKEN is already set.
70+
71+
Key concepts: Space (spcXxx), Datasheet (dstXxx), Record (recXxx), Field, View (viwXxx)
72+
73+
Workflow:
74+
1. vika spaces list
75+
2. vika nodes search <spc_id> --node-type Datasheet --query "<name>"
76+
3. vika fields list <dst_id>
77+
4. vika records list <dst_id> --view-id <viw_id>
78+
5. vika records create <dst_id> --data '[{"fields":{"Title":"value"}}]'
79+
80+
Tips:
81+
- Always run `vika fields list` before writing to know exact field names
82+
- Field names are case-sensitive
83+
- recordId is required for updates — get it from `records list`
84+
- Max 10 records per create/update/delete call
85+
- Use --compact for programmatic output
86+
```
87+
88+
## Rust SDK
89+
90+
See [`vika-sdk`](https://crates.io/crates/vika-sdk) for the underlying Rust library.

0 commit comments

Comments
 (0)