---
title: "tractorbeam table"
description: "The Tractorbeam API's table operations."
sidebar:
  label: "table"
  order: 29
---

```sh
tractorbeam table <subcommand> [flags]
```

## Shared flags

Every subcommand takes these flags.

| Flag | Description |
| --- | --- |
| `--config <string>` | The Project's `tractorbeam.config.ts`. Defaults to the one in the current directory or its nearest ancestor. |
| `--workspace <string>` | Workspace name. Environment variable: `TRACTORBEAM_WORKSPACE`. |
| `--origin <string>` | The Tractorbeam origin to call instead of the default, such as a proxy's. Environment variable: `TRACTORBEAM_ORIGIN`. |
| `--token <string>` | Access token. Defaults to the saved interactive session. Environment variable: `TRACTORBEAM_TOKEN`. |

## `table list`

Returns each Table selected by the Branch's HEAD or by a retained Commit on it, with the Table's fields and indexes. Needs Workspace authority; an App token can't list Tables.

```sh
tractorbeam table list [flags]
```

| Flag | Description |
| --- | --- |
| `--at-commit-id <string>` | The ID of a retained Commit on the Branch to read at. Defaults to the Branch's HEAD. |
| `--branch <string>` | Branch name. Defaults to the Branch you last switched to, or main. Environment variable: `TRACTORBEAM_BRANCH`. |

## `table get`

Returns the Table with this name selected by the Branch's HEAD or by a retained Commit on it, with the Table's fields and indexes. Returns 404 when none is selected. Needs Workspace authority; an App token can't retrieve Tables.

```sh
tractorbeam table get [flags] <table>
```

| Argument | Description |
| --- | --- |
| `<table>` | The name of the Table to retrieve. |

| Flag | Description |
| --- | --- |
| `--at-commit-id <string>` | The ID of a retained Commit on the Branch to read at. Defaults to the Branch's HEAD. |
| `--branch <string>` | Branch name. Defaults to the Branch you last switched to, or main. Environment variable: `TRACTORBEAM_BRANCH`. |
