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

# CLI reference

> Use the npx signup CLI to sign up for Gate services, log into dashboards, and list the registry. Full reference for commands, flags, and JSON output.

The `signup` CLI is published on npm and runs via `npx`. No installation required.

## Commands

### Sign up for a service

```bash theme={"dark"}
npx signup <service>
```

Opens a browser consent window. After approval, credentials are written to `.env`.

### Log into the dashboard

```bash theme={"dark"}
npx signup <service> login
```

Authenticates with your agent token from `.env` and opens the service's dashboard.

### List available services

```bash theme={"dark"}
npx signup list
```

Shows all services registered in the Gate registry.

## Flags

| Flag              | Description                                               |
| ----------------- | --------------------------------------------------------- |
| `-h`, `--help`    | Show help                                                 |
| `-v`, `--version` | Show version                                              |
| `-q`, `--quiet`   | Suppress non-essential output (ASCII art, next steps)     |
| `--json`          | Output results as JSON to stdout (for scripts and agents) |
| `--registry-url`  | Override the registry URL (for development)               |

## JSON output

With `--json`, the CLI outputs a single JSON object to stdout on success:

```json theme={"dark"}
{
  "status": "approved",
  "outputs": {
    "FOIL_GATE_AGENT_TOKEN": "agt_...",
    "FOIL_PUBLISHABLE_KEY": "pk_live_...",
    "FOIL_SECRET_KEY": "sk_live_..."
  },
  "env_path": "/path/to/.env",
  "docs_url": "https://usefoil.com/docs"
}
```

On failure:

```json theme={"dark"}
{
  "status": "error",
  "message": "The signup was cancelled."
}
```

All human-readable output (steps, spinner, boxes) goes to stderr, so `--json` output is safe to pipe.

## Environment variables

| Variable              | Description                       |
| --------------------- | --------------------------------- |
| `SIGNUP_REGISTRY_URL` | Override the default registry URL |
| `NO_COLOR`            | Disable color output              |

## What's next

* [What is Gate?](/gate/what-is-gate) — overview of the Gate product
* [Dashboard login](/gate/dashboard-login) — reuse the Gate-managed login token for `npx signup <service> login`
