# Commands for services, calls, email and stored data

These commands show what your app sent outside while you develop it, the
provider calls and the email, and check a deploy before it happens.

| Command | Does |
|---|---|
| `jadpo calls` | The development call log |
| `jadpo email` | The dev inbox and the sending domain's records |
| `jadpo runs unfinished --build <build id>` | Lists the multi-step runs a deploy would stop |

## `jadpo calls`

Shows the provider calls `jadpo dev` made, faked or real. It takes
`--json`. `--connection`, `--operation` and `--request` filter it.

- `jadpo calls` is a table of the last 500 calls, oldest first, each with
  its id, operation, source (`generated`, `scripted`, `sandbox`,
  `recording`), how it ended, its time and its request, then a footer and
  one hint.
- `calls show <id>` prints one call in full, laid out: what was sent,
  never its headers, and what came back.
- `calls script <operation> <answer>` sets the next answer for an
  operation: one of its failures' codes, or `unavailable`, `lost`,
  `in_use` or `misconfigured`. It checks the operation and the answer
  against the project first. `calls script ai.<prompt> <condition>` sets
  the next answer of a prompt asked through a package that fills `ai`, as
  one of `ai.generate`'s five conditions ([AI](ai.md)).

An unknown action, call, operation or answer is `cli.calls_arguments`,
with the nearest ([Debugging and review](debugging-and-review.md)).

## `jadpo email`

`jadpo dev` catches every email your app sends in a dev inbox, so nothing
reaches a real address ([Email](email.md)). It takes
`--json`.

- `jadpo email` is a table of the mail caught, oldest first, each with its
  id, email, address, subject and health. `--to` narrows it.
- `email show <id>` prints one with its text (`--html` for its HTML), its
  links numbered, its attachments, and each health problem with its fix.
- `email links <id>` numbers its links, and `email open <id> <link>` opens
  one in `$BROWSER` or the system's browser.
- `email clear` empties the inbox.
- `email check-domain [<domain>]` reads SPF, DKIM (`--selector`) and DMARC
  for the domain given, or for `email: { from: }`'s.

An unknown action, mail or link is `cli.email_arguments`, with the
nearest.

## `jadpo runs unfinished`

Run it against production before a deploy. It lists the unfinished
multi-step runs and batches whose recorded path the new build changes, so
an operator knows what will stop as `diverged`
([Deploys](several-changing-calls-in-one-action.md#deploys)). It takes `--json`.

The build must be the one the checkout makes; `cli.runs_arguments` names
it otherwise. It shows a table of each record whose build differs and
whose action's step shape the build changes, so the record stops as
diverged, or no longer keeps, so its steps are sent again. It also lists
each running batch run whose call the build changes, which fails. A footer
and one hint follow. `--url` and `--store` work as for `jadpo deliveries`
(`runs.unavailable`).

Not built yet:

- `jadpo services`, with `start`, `stop`, `restart <name>`,
  `logs <name>` (`--follow`, `--since`) and `shell <name>`. It shows each
  container a package runs: its package, image, state, health, CPU and
  memory, restarts and uptime, and manages one. `shell`, a shell inside
  one, is for development only. In production they talk to the running
  app, never to the container engine ([External
  services](11-integrations.md)).
- `jadpo dev grants add <connection> --owner <id>`, which makes a fake
  OAuth grant for local development ([Acting for each user: OAuth
  grants](11-integrations.md#acting-for-each-user-oauth-grants)).
- `jadpo files copy`, which copies files between two stores (S3, R2,
  disk) ([Files](files.md)).
- `jadpo batches list`, `show <id>` and `cancel <id>`, which list batch
  runs (file reads and writes, `batches.each`) with their state and
  progress, show one run's progress and problems, and stop one, as
  `batches.cancel` does ([Jobs and events](jobs-and-events.md)).
- `jadpo search reindex`, which rebuilds a search index from the
  database ([Search](search.md)).
