# tractorbeam ontology (/docs/cli/ontology)

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

## Shared 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 API origin to call instead of https://tractorbeam.ai, such as a proxy's. Environment variable: `TRACTORBEAM_ORIGIN`. |
| `--token <string>` | Access token. Defaults to the saved interactive session. Environment variable: `TRACTORBEAM_TOKEN`. |

## `ontology get-map` [#ontology-get-map]

Returns a map of the Ontology at the Branch's HEAD, or a retained Commit on it. Each Object lies near Objects with similar values and near its linked Objects. Territories group similar Objects of one Object type. The map places at most 2,000 Objects of each Object type, the first in ID order, and at most 20,000 in all; `objectTypes` says where it stops. Object types requiring Markings are left out. The same Commit returns the same map. Needs Workspace authority with `queries:invoke`; an App token can't read the map.

```sh
tractorbeam ontology get-map [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`. |