Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs Enhancements To CLI Section #689

Open
wants to merge 11 commits into
base: trunk
Choose a base branch
from
29 changes: 22 additions & 7 deletions spiceaidocs/docs/cli/reference/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,41 @@ pagination_prev: null
pagination_next: null
---

Add Spicepod - adds a Spicepod to the project
Adds a Spicepod to the project from a given source.

### Usage

```shell
spice add [flags]
spice add [source] [flags]
```

- `source`: Location of the Spicepod.

#### Flags

- `-h`, `--help` Print this help message
- `-h`, `--help` Print this help message

### Examples

Adding a Spicepod from a source currently using Spice (like `spiceai/quickstart`):

```shell
spice add spiceai/quickstart
```

### Additional Example

```shell
spice add spiceai/samplepod
This adds the following Spicepod under `./spicepods`:

```yaml
version: v1beta1
kind: Spicepod
name: quickstart

datasets:
- from: s3://spiceai-demo-datasets/taxi_trips/2024/
name: taxi_trips
description: taxi trips in s3
params:
file_format: parquet
acceleration:
enabled: true
```
14 changes: 9 additions & 5 deletions spiceaidocs/docs/cli/reference/catalogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ pagination_prev: null
pagination_next: null
---

Lists [catalogs](/components/catalogs) loaded by the Spice runtime
Lists [catalogs](/components/catalogs) currnently loaded by the Spice runtime.

### Requirements

- Spice runtime must be running

### Usage

Expand All @@ -15,13 +19,13 @@ spice catalogs [flags]

#### Flags

- `--tls-root-certificate-file` The path to the root certificate file used to verify the Spice.ai runtime server certificate
- `--tls-root-certificate-file` The path to the root certificate file used to verify the Spice.ai runtime server certificate

### Example

```shell
```shell
>>> spice catalogs

FROM NAME
spiceai spiceai
FROM NAME
spiceai spiceai
```
12 changes: 9 additions & 3 deletions spiceaidocs/docs/cli/reference/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ pagination_prev: null
pagination_next: null
---

Connect to Spice.ai Cloud Platform App
Connect to an app on Spice's Cloud Platform.

### Requirements

- Authentication to Spice's Cloud Platform via [`login`](/cli/reference/login)

### Usage

```shell
spice connect [flags]
spice connect [path] [flags]
```

- `path`: Path to project.

#### Flags

- `-h`, `--help` Print this help message
- `-h`, `--help` Print this help message

### Examples

Expand Down
20 changes: 18 additions & 2 deletions spiceaidocs/docs/cli/reference/dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,24 @@ spice dataset [command]

Available `command`s:

- `configure`: Configure a dataset
- `configure`: Create/configure a dataset directly from the command-line, including customizing components such as remote source (`from` in a Spicepod) and acceleration along with metadata such as name and description.

#### Flags

- `-h`, `--help` Print this help message
- `-h`, `--help` Print this help message

### Sample Output

#### Output from Configure

```bash
2024/12/18 01:06:32 INFO dataset name: sample-project
remote-source # Input 1: Name of dataset
2024/12/18 01:06:59 WARN Dataset names with hyphens should be quoted in queries:
i.e. SELECT * FROM "remote-source"
description: description of remote-source # Input 2: Description
from: remote-source-location # Input 3: Source
2024/12/18 01:07:25 INFO locally accelerate (y/n)? (y)
n # Input 4: Acceleration
2024/12/18 01:07:32 INFO Saved datasets/remote-source/dataset.yaml
```
51 changes: 28 additions & 23 deletions spiceaidocs/docs/cli/reference/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ pagination_prev: null
pagination_next: null
---

Lists datasets loaded by the Spice runtime
Lists datasets loaded or to be loaded by the Spice runtime.

### Requirements

- Spice runtime must be running

### Usage

Expand All @@ -15,39 +19,40 @@ spice datasets [flags]

#### Flags

- `--tls-root-certificate-file` The path to the root certificate file used to verify the Spice.ai runtime server certificate
- `-h`, `--help` help for datasets
- `--tls-root-certificate-file` The path to the root certificate file used to verify the Spice.ai runtime server certificate
- `--api-key` The API key required for authentication.
- `-h`, `--help` Help for datasets

### Examples:

```shell
>>> spice datasets

FROM NAME REPLICATION ACCELERATION STATUS PROPERTIES
spice.ai/spiceai/quickstart/datasets/taxi_trips taxi_trips false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.customer tpch.customer false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.lineitem tpch.lineitem false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.nation tpch.nation false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.orders tpch.orders false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.part tpch.part false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.partsupp tpch.partsupp false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.region tpch.region false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.supplier tpch.supplier false false Ready map[]
FROM NAME REPLICATION ACCELERATION STATUS PROPERTIES
spice.ai/spiceai/quickstart/datasets/taxi_trips taxi_trips false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.customer tpch.customer false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.lineitem tpch.lineitem false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.nation tpch.nation false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.orders tpch.orders false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.part tpch.part false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.partsupp tpch.partsupp false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.region tpch.region false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.supplier tpch.supplier false false Ready map[]
```

### Additional Example

```shell
>>> spice datasets --tls-root-certificate-file /path/to/cert.pem

FROM NAME REPLICATION ACCELERATION STATUS PROPERTIES
spice.ai/spiceai/quickstart/datasets/taxi_trips taxi_trips false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.customer tpch.customer false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.lineitem tpch.lineitem false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.nation tpch.nation false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.orders tpch.orders false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.part tpch.part false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.partsupp tpch.partsupp false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.region tpch.region false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.supplier tpch.supplier false false Ready map[]
FROM NAME REPLICATION ACCELERATION STATUS PROPERTIES
spice.ai/spiceai/quickstart/datasets/taxi_trips taxi_trips false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.customer tpch.customer false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.lineitem tpch.lineitem false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.nation tpch.nation false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.orders tpch.orders false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.part tpch.part false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.partsupp tpch.partsupp false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.region tpch.region false false Ready map[]
spice.ai/spiceai/tpch/datasets/tpch.supplier tpch.supplier false false Ready map[]
```
35 changes: 28 additions & 7 deletions spiceaidocs/docs/cli/reference/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,49 @@ sidebar_label: "init"
pagination_prev: null
pagination_next: null
---
Initialize Spice app - initializes a new Spice app

Initialize a Spicepod in the current working directory.

### Usage

```shell
spice init [flags]
spice init [app_name] [flags]
```

#### Arguments

- `app_name` An optional argument specifying the name of app

#### Flags

- `-h`, `--help` Print this help message
- `-h`, `--help` Print this help message

### Examples:

```shell
```shell
spice init
spice init <spice app name>
spice init my_app
```

If called without `app_name`, Spice will prompt you for a name and create the appropriate Spicepod in the current working directory.

### Additional Example

**Command**:

```shell
spice init another_app
spice init <app_name>
```

**Output**:

```
2024/12/18 16:06:21 INFO Initialized <app_name>/spicepod.yaml
```

The new Spicepod is populated, by default, with the following configuration:

```yaml
version: v1beta1
kind: Spicepod
name: <app_name>
```
20 changes: 13 additions & 7 deletions spiceaidocs/docs/cli/reference/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ sidebar_label: "install"
pagination_prev: null
pagination_next: null
---
Download and install the latest version of the Spice runtime.

Download and install the latest version of the Spice runtime

### Usage

Expand All @@ -14,16 +15,21 @@ spice install [flags]

#### Flags

- `-h`, `--help` Print this help message
- `-h`, `--help` Print this help message

### Example

### Examples:
**Command**:

```shell
```shell
spice install
```

### Additional Example
**Output**:

```shell
spice install --version latest
```
2024/12/18 16:13:04 INFO Checking for latest Spice runtime release...
2024/12/18 16:13:05 INFO Downloading and installing Spice.ai Runtime v1.0.0-rc.2 ...
2024/12/18 16:13:05 INFO Downloading the Spice runtime..., spiced_darwin_aarch64.tar.gz
2024/12/18 16:13:11 INFO Spice runtime installed into [spice_installation_location] successfully.
```
36 changes: 31 additions & 5 deletions spiceaidocs/docs/cli/reference/login.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'login'
sidebar_label: 'login'
title: "login"
sidebar_label: "login"
pagination_prev: null
pagination_next: null
---
Expand All @@ -18,7 +18,7 @@ spice login [command] [flags]
- `-h`, `--help` Print this help message
- `-k`, `--key` string API key (for spice.ai)

#### Available Commands
#### Available Commands To Connect to Other Services

- `abfs` Login to a Azure Storage Account
- `databricks` Login to a Databricks instance
Expand All @@ -30,14 +30,40 @@ spice login [command] [flags]
- `snowflake` Login to a Snowflake warehouse
- `spark` Login to a Spark Connect remote

#### Examples
### Examples

```shell
spice login
```

### Additional Example
#### Additional Example

```shell
spice login --key <API_KEY>
```

### Examples for Other Services

### Postgres

**Example 1**:

```shell
spice login postgres --password <password>
```

**Example 2**:

```shell
spice login postgres -p <password>
```

**Required Flags**:

- `-p`, `--password` Password to your postgres user

**Sample Output**:

```
2024/12/18 13:59:10 INFO Successfully logged in to Pg
```
Loading