# Guard CLI

> Install the Guard CLI, choose a workspace and view your monitors from the terminal.

Source: https://docs.infaris.com/en/pulseguard/cli

Use the Guard CLI to view and manage your monitors and Hosting projects from the terminal. Check the environment and workspace before changing monitors or projects.

## Install

```bash
bun add -g @infaris/guard-cli
npm install -g @infaris/guard-cli   # without Bun: Node 18 or later
infaris-guard --version
infaris-guard --help
```

You can also run it once with `bunx @infaris/guard-cli --help`.

## Sign in and choose a workspace

```bash
infaris-guard login
infaris-guard whoami
infaris-guard env ls
infaris-guard org ls
infaris-guard org switch "Example team"
```

During **login**, select the environment and complete sign-in in your browser. Use **whoami**, **env ls** and **org ls** to check where you are working. You can select a workspace for one command with `--org <id>`. On a machine without a browser, use `infaris-guard login link` followed by `infaris-guard login code -`.

## Read monitoring data

```bash
infaris-guard status
infaris-guard domains ls
infaris-guard services ls
infaris-guard incidents ls
infaris-guard help domains
```

Use `--json` for output your scripts can read. Run `infaris-guard doctor` to check connectivity and your session. For the API-key-based REST API, see [API and integrations](/en/pulseguard/api-and-integrations).

## Hosting: deploying static sites

List the available Hosting commands and view publishing help:

```bash
infaris-guard hosting commands
infaris-guard hosting up --help
```

Follow the [Hosting quickstart](/en/pulseguard/hosting-quickstart) to publish a project. The [Hosting CLI guide](/en/pulseguard/hosting-cli) explains linking, logs and configuration.
