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

# Overview

> The hoist command line: install it, global flags, scripts and completion.

`hoist` is Hoista's command line. Everything the desktop app does, it does too, on this computer's Hoista or on a [remote](https://docs.hoista.dev/guides/remote.md). Run a command without its arguments in a terminal and it asks for what's missing; in a script, pass everything and add `--json`.

```bash theme={null}
hoist accounts add railway       # connect a provider account
hoist import                     # bring in what already runs there
hoist deploy                     # deploy the folder you're in
hoist logs my-app -f             # follow its logs
```

## Install the CLI

The installer puts `hoist` and `hoistd` side by side. See [Install](https://docs.hoista.dev/getting-started/install.md), then check it:

```bash theme={null}
hoist --version
hoist doctor
```

## Global flags

These work with every command, before or after it.

| Flag | What it does |
| - | - |
| `--json` | Print JSON instead of tables and messages. A list prints as a JSON array. |
| `-y`, `--yes` | Answer yes to every confirmation. Deleting still needs `--confirm NAME`. |
| `--no-input` | Never ask; stop with the flag to pass instead. On by itself when `CI` is set or there's no terminal. |
| `--remote NAME` | Use this remote for one command. Also `HOISTA_REMOTE`. `this-computer` means this computer. |
| `-e`, `--environment NAME` | Use this environment for one command. Also `HOISTA_ENVIRONMENT`. |
| `--state-dir PATH` | Use another state folder instead of `~/.hoista`. Each has its own projects, accounts and agents. |

## In scripts and CI

* Pass every argument. A missing one is an error that names the flag, never a prompt.
* Add `--json` and read stdout. Progress and confirmations go to stderr.
* Pipe secrets: `--token-stdin`, `--value-stdin`, `--passphrase-stdin` or `--file .env`. Never put a token or value in an argument.
* Exit codes: `0` worked, `1` failed, `2` the command was called wrong or needs input it didn't get.
* `NO_COLOR=1` turns colour off; it's off already when output isn't a terminal.

```bash theme={null}
export HOISTA_REMOTE=office HOISTA_ENVIRONMENT=production
op read op://Work/stripe/key | hoist env set my-app STRIPE_KEY --value-stdin
hoist deploy ./web -p my-web --json | jq -r .id
```

## Shell completion

```bash theme={null}
hoist completion zsh > "${fpath[1]}/_hoist"                              # zsh
hoist completion bash > ~/.local/share/bash-completion/completions/hoist  # bash
hoist completion fish > ~/.config/fish/completions/hoist.fish             # fish
```

## Commands

> [card] [Projects](https://docs.hoista.dev/cli/projects.md)
>
> List, import, link, rename and delete projects.

> [card] [Resources and databases](https://docs.hoista.dev/cli/resources.md)
>
> Restart, pause, move and delete services and databases.

> [card] [Deploying](https://docs.hoista.dev/cli/deploying.md)
>
> Plan a deploy, follow it, roll back or cancel.

> [card] [Variables and domains](https://docs.hoista.dev/cli/variables.md)
>
> Environment variables and custom domains.

> [card] [Watching](https://docs.hoista.dev/cli/watching.md)
>
> Logs, metrics, activity, billing and usage.

> [card] [Accounts and providers](https://docs.hoista.dev/cli/accounts.md)
>
> Connect provider accounts, check and rotate tokens.

> [card] [Environments](https://docs.hoista.dev/cli/environments.md)
>
> Production, staging and the one in use.

> [card] [Remotes](https://docs.hoista.dev/cli/remotes.md)
>
> Run Hoista on a server and switch between them.

> [card] [Agents](https://docs.hoista.dev/cli/agents.md)
>
> Let coding agents in and choose what they may do.

> [card] [Safety and upkeep](https://docs.hoista.dev/cli/upkeep.md)
>
> Backups, operations, webhooks and settings.

> [card] [This computer](https://docs.hoista.dev/cli/this-computer.md)
>
> Start the engine, run checks, install the service.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.