Skip to content

Commit e2e17b8

Browse files
mr-kellyCopilot
andcommitted
docs: improve AI agent context in README
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2b8e7e9 commit e2e17b8

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

crates/vika-cli/README.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,39 @@ vika records list <datasheet_id> --compact | jq '.records[0]'
6262

6363
## For AI Agents
6464

65-
Paste into your agent's system prompt:
65+
Add `vika` as a shell tool in your agent framework, then give the agent this context:
6666

6767
```
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
68+
Tool: vika
69+
Description: Read and write data in Vika (vikadata) spreadsheets. All output is JSON.
70+
Usage: vika <command> [options]
71+
72+
Key concepts:
73+
- Space (spcXxx): workspace containing nodes
74+
- Datasheet (dstXxx): spreadsheet with records, fields, and views
75+
- Record (recXxx): a row
76+
- Field: a column (Title, Status, Date, etc.)
77+
- View (viwXxx): filtered/sorted perspective on a datasheet
78+
79+
Available commands:
80+
vika spaces list
81+
vika nodes list <space_id>
82+
vika nodes search <space_id> --node-type Datasheet --query "<name>"
83+
vika nodes get <space_id> <node_id>
84+
vika records list <datasheet_id> [--view-id <id>] [--filter '<formula>'] [--page-size <n>]
85+
vika records create <datasheet_id> --data '[{"fields":{"Title":"value"}}]'
86+
vika records update <datasheet_id> --data '[{"recordId":"recXxx","fields":{"Title":"new"}}]'
87+
vika records delete <datasheet_id> --ids recXxx,recYyy
88+
vika fields list <datasheet_id>
89+
vika views list <datasheet_id>
90+
91+
Rules:
92+
- Always run `vika fields list <dst_id>` before creating/updating records
8293
- Field names are case-sensitive
8394
- recordId is required for updates — get it from `records list`
8495
- Max 10 records per create/update/delete call
8596
- Use --compact for programmatic output
97+
- Filter syntax: --filter '{FieldName}="value"'
8698
```
8799

88100
## Rust SDK

0 commit comments

Comments
 (0)