# The app command

> Sign in once for every Sypnia command line, and see your projects, sessions and credits.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://app.docs.sypnia.com/tools/cli/

For agents: npx @sypnia/app <command> (or app after npm i -g @sypnia/app): login [--server <url>] (device flow; DPoP-bound session in ~/.config/sypnia, shared by every Sypnia CLI: git, data, agent, mail…), logout [--all], whoami, orgs [switch <org>], projects [create <name>], board <project>, sessions [<project>], open <project> [--session <id>] (opens the desktop app through sypnia-app://, or the web), credits, ledger [--project --group product|project|case --from --to --csv], top-up [amount] (USD, at least 5; opens PayPal in the browser; owner/billing), limits [set …]. Flags --json, --org. Exit codes 0 ok, 1 error, 2 usage, 3 not signed in, 4 forbidden.

```bash
npx @sypnia/app login
```

Your browser opens to approve the sign-in. The session is saved in `~/.config/sypnia/`, readable only by you, and **every Sypnia command line uses it**: after `app login`, `npx @sypnia/git`, `npx @sypnia/data` and the rest are signed in too.

## Commands

| Command                                                                           | Does                                                                                   |
| --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `app login [--server <url>]`                                                      | sign in; `--server` for your own App server                                            |
| `app logout [--all]`                                                              | sign out here, or on every device                                                      |
| `app whoami`                                                                      | who you are, and the organization in use                                               |
| `app orgs`, `app orgs switch <org>`                                               | your organizations; choose one                                                         |
| `app projects`, `app projects create <name>`                                      | your projects; create one                                                              |
| `app board <project>`                                                             | the project's board in the terminal                                                    |
| `app sessions [<project>]`                                                        | the sessions of a project                                                              |
| `app open <project> [--session <id>]`                                             | open the project, or a session, in the desktop app (or the web)                        |
| `app credits`                                                                     | balance and held credits                                                               |
| `app ledger [--project] [--group product\|project\|case] [--from] [--to] [--csv]` | the ledger                                                                             |
| `app top-up [amount]`                                                             | open PayPal in your browser to top up, in USD, at least 5 (owners and billing members) |
| `app limits`, `app limits set <scope> <amount>`                                   | see and set spending limits                                                            |

Every command takes `--json` and `--org <org>`.

```text
$ npx @sypnia/app board laespiga
La Espiga · healthy
  Map       1 live · 0 proposals · 0 scope errors this week
  Code      main · 3 commits today · 0 open pull requests
  Domain    laespiga.co · certificate ok · renews 2027-11-18
  Health    0 open problems · uptime 100 % (24 h)
```

## Exit codes

`0` done · `1` error · `2` wrong usage · `3` not signed in · `4` your role does not allow it.
