# CLI Reference

The CLI is for local terminals and scripts. It does not open the Web IDE. It creates and selects environments, attaches local tools to a cloud workspace, uploads files, manages repo env vars, and controls runtimes. Reach for it when you want to stay in your shell or automate something.

## Install and authenticate:

```
curl -fsSL https://tabtabtab.ai/install.sh | sh
tabtabtab auth login
ttt auth login
```

The CLI stores its session under `~/.config/gv/config.json`. Clear it with:

```
tabtabtab auth logout
```

## Auth

```
tabtabtab auth login
tabtabtab auth logout
```

## Environments

Environment names must be unique per account. These examples use `$(whoami)` for a personalized default.

```
tabtabtab env create --name $(whoami)
tabtabtab env create --name $(whoami) --telemetry
tabtabtab env create --name $(whoami) --no-telemetry
tabtabtab env list
tabtabtab env list --json
tabtabtab env use $(whoami)
tabtabtab env info
tabtabtab env info --reveal
tabtabtab env info --qr
tabtabtab env info --env $(whoami)
tabtabtab env destroy $(whoami)
tabtabtab env destroy --all --yes
```

`env destroy` is permanent and removes the cloud VM. Use `--yes` only in scripts where you've confirmed the right environment.

## Attach terminal and editor tools

Use SSH for a local shell, or use `vscode` / `cursor` to open the workspace in a local editor over a tunneled connection. Use the dashboard `Open` button for the first-class TabTabTab IDE experience.

```
tabtabtab open vscode
tabtabtab open cursor
tabtabtab ssh
tabtabtab ssh --env $(whoami)
tabtabtab ssh -- uptime
```

## Upload files to workspace

Useful for pushing local notes, datasets, or one-off scripts into the cloud workspace without committing them to git.

```
tabtabtab upload LOCAL_PATH... --to REMOTE_PATH [--env ENV_NAME] [--workspace WORKSPACE]
tabtabtab upload
tabtabtab upload ./notes.md --to ~/workspace/notes.md
tabtabtab upload ./docs --env $(whoami) --workspace glowing-planet --to docs/
tabtabtab upload ./docs --to ~/workspace/docs
```

Absolute and `~` destinations upload directly into the environment. Relative `--to` paths resolve inside the selected workspace. A single directory upload copies the directory contents into the destination.

## Repo onboarding

```
tabtabtab repo add .
tabtabtab repo add . --dry-run
tabtabtab repo add . --yes
tabtabtab repo add . --skip-env
tabtabtab repo add . --env $(whoami)
tabtabtab repo list
tabtabtab repo list --json
tabtabtab repo onboard
tabtabtab repo onboard --repo <repo-id-or-name>
```

## Repo environment variables

```
tabtabtab repo env list
tabtabtab repo env list --reveal
tabtabtab repo env list --json
tabtabtab repo env list --repo <repo-id-or-name>
tabtabtab repo env add DATABASE_URL=postgres://example --secret
tabtabtab repo env add LOG_LEVEL=debug --plain
tabtabtab repo env add API_BASE_URL=https://api.example.com --source .env.local --plain
tabtabtab repo env rm LOG_LEVEL --yes
tabtabtab repo env rm LOG_LEVEL --source .env.local --yes
```

`--reveal` prints secret values. Don't pipe it into shared logs.

## Runtime

Runtime commands run inside a TabTabTab environment workspace. They require an onboarded repo with a supported `.devcontainer/devcontainer.json`. If your repo doesn't have one yet, email support@tabtabtab.ai and we'll help you add one.

```
tabtabtab runtime up
tabtabtab runtime status
tabtabtab runtime ports
tabtabtab runtime ports --all
tabtabtab runtime preview 3000
tabtabtab runtime logs
tabtabtab runtime down
tabtabtab runtime rebuild
```

## Dev profile

The dev profile syncs shell config, dotfiles, and tools into new environments so a fresh VM feels like yours instead of a stock Linux box.

```
tabtabtab profile show
tabtabtab profile push
tabtabtab profile push --apply
tabtabtab profile apply
tabtabtab profile job <job-id> --watch
tabtabtab profile pull
```

## Provider access

```
tabtabtab github enable
tabtabtab github status
tabtabtab github disable
tabtabtab openai enable
tabtabtab openai status
```

`tabtabtab openai enable` can use local Codex auth from `~/.codex/auth.json` or an OpenAI API key flow when available.
