Skip to content

Commit

Permalink
Add comprehensive reference for CLI, including examples for new comma…
Browse files Browse the repository at this point in the history
…nds: models, datasets, status (#123)

* add comprehensive reference for CLI, including examples for new commands: models, datasets, status

* no help subpage

* fix subpage link title

* fix dot pointing
  • Loading branch information
Jeadie authored Mar 25, 2024
1 parent 43b2215 commit b6bf211
Show file tree
Hide file tree
Showing 14 changed files with 329 additions and 13 deletions.
30 changes: 17 additions & 13 deletions spiceaidocs/content/en/cli/reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ spice [command] [--help]

## Full Command Reference

| Command | Description |
| ----------- | --------------------------------------------------------------------|
| add | Add Pod - adds a pod to the project |
| completion | Generate the autocompletion script for the specified shell |
| dataset | Dataset operations |
| help | Help about any command |
| init | Initialize Pod - initializes a new pod in the project |
| login | Login to Spice.ai |
| run | Run Spice.ai - starts the Spice.ai runtime, installing if necessary |
| sql | Start an interactive SQL query session against the Spice.ai runtime |
| upgrade | Upgrades the Spice CLI to the latest release |
| version | Spice CLI version |
| Command | Description |
| -------------------------------------------------- | --------------------------------------------------------------------|
| [add]({{<ref "cli/reference/add">}}) | Add Pod - adds a pod to the project |
| [completion]({{<ref "cli/reference/completion">}}) | Generate the autocompletion script for the specified shell |
| [dataset]({{<ref "cli/reference/dataset">}}) | Dataset operations |
| [datasets]({{<ref "cli/reference/datasets">}}) | Lists datasets loaded by the Spice runtime |
| help | Help about any command |
| [init]({{<ref "cli/reference/init">}}) | Initialize Pod - initializes a new pod in the project |
| [login]({{<ref "cli/reference/login">}}) | Login to Spice.ai |
| [models]({{<ref "cli/reference/models">}}) | Lists models loaded by the Spice runtime |
| [pods]({{<ref "cli/reference/pods">}}) | Lists Spicepods loaded by the Spice runtime |
| [run]({{<ref "cli/reference/run">}}) | Run Spice.ai - starts the Spice.ai runtime, installing if necessary |
| [sql]({{<ref "cli/reference/sql">}}) | Start an interactive SQL query session against the Spice.ai runtime |
| [status]({{<ref "cli/reference/status">}}) | Spice runtime status |
| [upgrade]({{<ref "cli/reference/upgrade">}}) | Upgrades the Spice CLI to the latest release |
| [version]({{<ref "cli/reference/version">}}) | Spice CLI version |

## Command Flags

All commands have a help flag **--help** or **-h** to print its usage documentation:

- **--help** | **-h** : Print the help message
- **--help** | **-h** : Print the help message
23 changes: 23 additions & 0 deletions spiceaidocs/content/en/cli/reference/add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
type: docs
title: "Add"
linkTitle: "add"
weight: 90
---

Add Spicepod - adds a Spicepod to the project

### Usage:
```shell
spice add [flags]
```

#### Flags:
- `-h`, `--help` Print this help message

### Examples:
```shell
spice add spiceai/quickstart
```


23 changes: 23 additions & 0 deletions spiceaidocs/content/en/cli/reference/completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
type: docs
title: "Completion"
linkTitle: "completion"
weight: 90
---

Generate the autocompletion script for spice for the specified shell.
See each sub-command's help for details on how to use the generated script.

### Usage:
```shell
spice completion [command]
```
Available `command`s
- bash
- fish
- powershell
- zsh

#### Flags:
- `-h`, `--help` Print this help message

19 changes: 19 additions & 0 deletions spiceaidocs/content/en/cli/reference/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
type: docs
title: "dataset"
linkTitle: "dataset"
weight: 90
---

Dataset operations

### Usage:
```shell
spice dataset [command]
```

Available `command`s:
- `configure`: Configure a dataset

#### Flags:
- `-h`, `--help` Print this help message
25 changes: 25 additions & 0 deletions spiceaidocs/content/en/cli/reference/datasets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
type: docs
title: "datasets"
linkTitle: "datasets"
weight: 90
---

Lists datasets loaded by the Spice runtime

### Usage:
```shell
spice datasets [flags]
```

#### Flags:
- `-h`, `--help` help for datasets

### Examples:
```shell
>>> spice datasets

FROM NAME REPLICATION ACCELERATION DEPENDSON STATUS
spice.ai/eth.beacon.recent_slots eth_beacon_recent_slotsss false false Ready
spice.ai/eth.recent_blocks eth_rec_blocks false false Initializing
```
23 changes: 23 additions & 0 deletions spiceaidocs/content/en/cli/reference/init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
type: docs
title: "init"
linkTitle: "init"
weight: 90
---
Initialize Spice app - initializes a new Spice app

### Usage:
```shell
spice init [flags]
```

#### Flags:
- `-h`, `--help` Print this help message

### Examples:
```shell
spice init
spice init <spice app name>
spice init my_app
```

27 changes: 27 additions & 0 deletions spiceaidocs/content/en/cli/reference/login.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
type: docs
title: "login"
linkTitle: "login"
weight: 90
---

Login to Spice.ai

### Usage:
```shell
spice login [command] [flags]
```

### Flags:
- `-h`, `--help` Print this help message
- `-k`, `--key` string API key (for spice.ai)

#### Available Commands:
- `databricks` Login to a Databricks instance
- `dremio` Login to a Dremio instance
- `s3` Login to a s3 storage

#### Examples:
```shell
spice login
```
24 changes: 24 additions & 0 deletions spiceaidocs/content/en/cli/reference/models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
type: docs
title: "models"
linkTitle: "models"
weight: 90
---

Lists models loaded by the Spice runtime

### Usage:
```shell
spice models [flags]
```

#### Flags:
- `-h`, `--help` help for models

### Examples:
```shell
>>> spice models

NAME FROM DATASETS STATUS
modlz file:/Users/jeadie/Downloads/model.onnx [] Ready
```
25 changes: 25 additions & 0 deletions spiceaidocs/content/en/cli/reference/pods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
type: docs
title: "pods"
linkTitle: "pods"
weight: 90
---
Lists Spicepods loaded by the Spice runtime

### Usage:
```shell
spice pods [flags]
```

#### Flags:
- `-h`, `--help` help for pods

### Examples:
```shell
>>> spice pods

VERSION NAME DATASETSCOUNT MODELSCOUNT DEPENDENCIESCOUNT
v1beta1 demo 2 1 0
v1beta1 another_pod 3 0 1
```

21 changes: 21 additions & 0 deletions spiceaidocs/content/en/cli/reference/run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
type: docs
title: "run"
linkTitle: "run"
weight: 90
---
Run Spice.ai - starts the Spice.ai runtime, installing if necessary

### Usage:
```shell
spice run [flags]
```

#### Flags:
- `-h`, `--help` Print this help message

### Examples:
```shell
spice run
```

35 changes: 35 additions & 0 deletions spiceaidocs/content/en/cli/reference/sql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
type: docs
title: "sql"
linkTitle: "sql"
weight: 90
---

Start an interactive SQL query session against the Spice.ai runtime

### Usage:
```shell
spice sql [flags]
```

#### Flags:
- `-h`, `--help` Print this help message


### Examples
```shell
$ spice sql
Welcome to the interactive Spice.ai SQL Query Utility! Type 'help' for help.

show tables; -- list available tables
sql> show tables
+---------------+--------------------+---------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+---------------+------------+
| datafusion | public | tmp_view_test | VIEW |
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | views | VIEW |
| datafusion | information_schema | columns | VIEW |
| datafusion | information_schema | df_settings | VIEW |
+---------------+--------------------+---------------+------------+
```
26 changes: 26 additions & 0 deletions spiceaidocs/content/en/cli/reference/status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
type: docs
title: "status"
linkTitle: "status"
weight: 90
---
Spice runtime status

### Usage
```shell
spice status [flags]
```

#### Flags:
- `-h`, `--help` help for status

### Examples:
```shell
>>> spice status

NAME ENDPOINT STATUS
http 127.0.0.1:3000 Ready
flight 127.0.0.1:50051 Ready
metrics N/A Disabled
opentelemetry 127.0.0.1:50052 Ready
```
21 changes: 21 additions & 0 deletions spiceaidocs/content/en/cli/reference/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
type: docs
title: "upgrade"
linkTitle: "upgrade"
weight: 90
---
Upgrades the Spice CLI to the latest release

### Usage:
```shell
spice upgrade [flags]
```

#### Flags:
- `-h`, `--help` help for upgrade

### Examples:
```shell
spice upgrade
```

20 changes: 20 additions & 0 deletions spiceaidocs/content/en/cli/reference/version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
type: docs
title: "version"
linkTitle: "version"
weight: 90
---
Spice CLI version

### Usage:
```shell
spice version [flags]
```

#### Flags:
- `-h`, `--help` help for version

### Examples:
```shell
spice version
```

0 comments on commit b6bf211

Please sign in to comment.