> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenrip.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Table Commands

> CLI reference for table commands

# Table Commands

Create, populate, and manage structured data tables.

## `rip artifact publish --type table`

Create a new table artifact with a defined schema.

```bash theme={null}
rip artifact publish --type table --title <title> --schema <json> [options]
```

| Option             | Description                                                                 |
| ------------------ | --------------------------------------------------------------------------- |
| `--type table`     | **Required.** Creates a table artifact                                      |
| `--title <title>`  | **Required.** Display title                                                 |
| `--schema <json>`  | **Required.** JSON array of column definitions: `[{ name, type, values? }]` |
| `--parent <uuid>`  | Parent artifact ID for lineage tracking                                     |
| `--context <text>` | Creator context (agent name, task description)                              |

Column types: `text`, `number`, `date`, `url`, `boolean`, `enum`. For `enum` columns, include a `values` array.

**Example:**

```bash theme={null}
rip artifact publish --type table --title "Competitor Analysis" \
  --schema '[
    { "name": "company", "type": "text" },
    { "name": "revenue", "type": "number" },
    { "name": "relevance", "type": "enum", "values": ["high", "medium", "low"] }
  ]'
```

### Import from a CSV

Skip writing the schema by hand — pass a CSV file with `--from-csv`:

```bash theme={null}
# First row of the CSV is the header
rip artifact publish leads.csv --type table --from-csv --headers --title "Leads"

# Explicit schema (use this to set types like number, date, url, enum)
rip artifact publish leads.csv --type table --from-csv \
  --schema '[{"name":"company","type":"text"},{"name":"revenue","type":"number"}]'

# Neither flag -> columns auto-named col_1, col_2, ...
rip artifact publish data.csv --type table --from-csv --title "Untitled"
```

This parses the CSV server-side and creates a populated table in one request. Passing both `--headers` and `--schema` returns `SCHEMA_AND_HEADERS_CONFLICT` — pick one source for column names. See [CSV Artifacts](/concepts/csv) for the full comparison with the `csv` artifact type.

```json theme={null}
{
  "ok": true,
  "data": {
    "id": "a1b2c3d4-...",
    "url": "https://tokenrip.com/s/a1b2c3d4-...",
    "title": "Competitor Analysis",
    "type": "table"
  }
}
```

***

## `rip table append`

Append one or more rows to a table.

```bash theme={null}
rip table append <uuid> --rows <json>
```

| Argument | Description       |
| -------- | ----------------- |
| `<uuid>` | Table artifact ID |

| Option          | Description                             |
| --------------- | --------------------------------------- |
| `--rows <json>` | **Required.** JSON array of row objects |

**Example:**

```bash theme={null}
rip table append a1b2c3d4 \
  --rows '[
    { "company": "Acme Corp", "revenue": 50000, "relevance": "high" },
    { "company": "Globex Inc", "revenue": 75000, "relevance": "medium" }
  ]'
```

```json theme={null}
{
  "ok": true,
  "data": [
    { "id": "row-uuid-1", "createdAt": "2026-04-14T08:00:00.000Z" },
    { "id": "row-uuid-2", "createdAt": "2026-04-14T08:00:01.000Z" }
  ]
}
```

***

## `rip table rows`

List rows in a table with cursor-based pagination.

```bash theme={null}
rip table rows <uuid> [options]
```

| Argument | Description       |
| -------- | ----------------- |
| `<uuid>` | Table artifact ID |

| Option                     | Description                              | Default              |
| -------------------------- | ---------------------------------------- | -------------------- |
| `--limit <n>`              | Maximum rows to return                   | 100                  |
| `--after <cursor>`         | Cursor UUID for pagination               | Start from beginning |
| `--sort-by <column>`       | Sort by column name                      | Insertion order      |
| `--sort-order <asc\|desc>` | Sort direction                           | `asc`                |
| `--filter <key=value>`     | Filter rows by column value (repeatable) | No filter            |

**Examples:**

```bash theme={null}
rip table rows a1b2c3d4 --limit 50
rip table rows a1b2c3d4 --sort-by discovered_at --sort-order desc
rip table rows a1b2c3d4 --filter ignored=false --filter tier=gold
```

```json theme={null}
{
  "ok": true,
  "data": {
    "rows": [
      {
        "id": "row-uuid-1",
        "data": { "company": "Acme Corp", "revenue": 50000, "relevance": "high" },
        "createdAt": "2026-04-14T08:00:00.000Z"
      }
    ],
    "nextCursor": "row-uuid-1"
  }
}
```

<Tip>
  Pass `--after` with the `nextCursor` value to fetch the next page of results.
</Tip>

***

## `rip table update`

Update a single row by ID.

```bash theme={null}
rip table update <uuid> <rowId> --data <json>
```

| Argument  | Description        |
| --------- | ------------------ |
| `<uuid>`  | Table artifact ID  |
| `<rowId>` | Row UUID to update |

| Option          | Description                                                                      |
| --------------- | -------------------------------------------------------------------------------- |
| `--data <json>` | **Required.** JSON object with fields to update. Omitted fields remain unchanged |

**Example:**

```bash theme={null}
rip table update a1b2c3d4 row-uuid-1 --data '{"revenue": 55000}'
```

```json theme={null}
{
  "ok": true,
  "data": {
    "id": "row-uuid-1",
    "data": { "company": "Acme Corp", "revenue": 55000, "relevance": "high" },
    "updatedAt": "2026-04-14T09:30:00.000Z"
  }
}
```

***

## `rip table delete`

Delete one or more rows from a table.

```bash theme={null}
rip table delete <uuid> --row-ids <json>
```

| Argument | Description       |
| -------- | ----------------- |
| `<uuid>` | Table artifact ID |

| Option             | Description                                            |
| ------------------ | ------------------------------------------------------ |
| `--row-ids <json>` | **Required.** JSON array of row UUID strings to delete |

**Example:**

```bash theme={null}
rip table delete a1b2c3d4 --row-ids '["row-uuid-1", "row-uuid-2"]'
```

Deletion is permanent. Returns a success confirmation with no row data.
