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

# Output and scripting

> Print a table or JSON, and use the Condense CLI in a script: name what each command acts on, check before you deploy, and confirm deletes.

## Output formats

By default the CLI prints a structured table. Add `--output json` to print JSON.

```bash theme={null}
condense workspace list --output json
```

`--output` is a global flag. The list commands show it as `[--output json]`:

* `condense environment list`
* `condense workspace list`
* `condense app list`

## Use the CLI in a script

**1. Sign in once, in a browser**

Signing in opens a browser, so sign in on the computer before the script runs. The session stays on the computer. See [Sign in](https://docs.condense.io/condense/v3.0.0/cli/sign-in.md).

**2. Name what each command acts on**

A script that relies on a selection made earlier acts on whatever is selected when it runs. Name the target with `--workspace` and `--service` instead. See [Targeting and configuration](https://docs.condense.io/condense/v3.0.0/cli/targeting-and-configuration.md).

**3. Read JSON, not the table**

Add `--output json` to a list command and read that.

**4. Check before you deploy**

Run `condense workspace deploy --can-i` and `condense workspace deploy --check` first. See [Deploy and move](https://docs.condense.io/condense/v3.0.0/cli/deploy-and-move.md).

**5. Confirm deletes on purpose**

`condense pipeline delete` asks you to confirm. Pass `--yes` only in a script that is meant to delete. See [Manage](https://docs.condense.io/condense/v3.0.0/cli/manage.md).

## Related

> [card] [Command reference](https://docs.condense.io/condense/v3.0.0/cli/command-reference.md)
>
> Every command in one place.

> [card] [Troubleshooting](https://docs.condense.io/condense/v3.0.0/cli/troubleshooting.md)
>
> When a command does not do what you expect.


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