Skip to content

Commit cb0d073

Browse files
committed
docs(readme): document workspace context commands and API-first model
1 parent bcd8045 commit cb0d073

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ API key priority (lowest to highest): config file → `HOTDATA_API_KEY` env var
6565
| `connections` | `list`, `create`, `refresh`, `new` | Manage connections |
6666
| `tables` | `list` | List tables and columns |
6767
| `datasets` | `list`, `create` | Manage uploaded datasets |
68+
| `context` | `list`, `show`, `pull`, `push` | Workspace Markdown context (e.g. data model `DATAMODEL`) via the context API |
6869
| `query` | | Execute a SQL query |
6970
| `queries` | `list` | Inspect query run history |
7071
| `search` | | Full-text search across a table column |
@@ -147,6 +148,22 @@ hotdata datasets create --url "https://example.com/data.parquet" --label "My Dat
147148
- Format is auto-detected from file extension or content.
148149
- Piped stdin is supported: `cat data.csv | hotdata datasets create --label "My Dataset"`
149150

151+
## Workspace context
152+
153+
Named Markdown documents for a workspace (data model, glossary, etc.) are stored in the **context API**. The CLI treats the server as the **source of truth**; local files are only used where the tool requires a path on disk.
154+
155+
```sh
156+
hotdata context list [-w <id>] [--prefix <stem>] [-o table|json|yaml]
157+
hotdata context show <name> [-w <id>]
158+
hotdata context pull <name> [-w <id>] [--force] [--dry-run]
159+
hotdata context push <name> [-w <id>] [--dry-run]
160+
```
161+
162+
- **`show`** prints Markdown to stdout (no local file needed). Use this to read the workspace data model in scripts or agents.
163+
- **`pull`** writes `./<name>.md` in the **current directory** from the API. Refuses to overwrite an existing file unless `--force`.
164+
- **`push`** reads `./<name>.md` and upserts that name in the workspace. Use after editing the file in your project directory.
165+
- Names follow SQL identifier rules (ASCII letters, digits, underscore; max 128 characters; SQL reserved words are not allowed). The usual stem for the semantic data model is **`DATAMODEL`** (file **`DATAMODEL.md`** for push/pull only).
166+
150167
## Query
151168

152169
```sh

0 commit comments

Comments
 (0)