# Ovok CLI

Canonical page: https://docs.ovok.com/cli

Use `create-ovok` to start a workspace with Ovok web and mobile apps. Use `ovok` to forward FHIR and
Signals events to your machine while you develop, and to manage Signals webhooks.

```bash
npm create ovok@latest my-app
npm install --global @ovok/cli
```

## Start building [#start-building]

<Cards>
  <Card title="Create an app with create-ovok" href="/cli/create-ovok">
    Start a Turborepo with an Ovok web app and mobile app in one command.
  </Card>
  <Card title="Sign in" href="/cli/reference/login">
    Save a client application as the profile the other commands use.
  </Card>
  <Card title="Forward events to your machine" href="/cli/forward-events">
    Receive FHIR and Signals events on localhost while you develop.
  </Card>
  <Card title="Listen for events" href="/cli/reference/listen">
    Forward FHIR and Signals events to your machine while you develop.
  </Card>
  <Card title="Manage Signals webhooks" href="/cli/reference/webhooks">
    List, create, test and rotate the webhooks Signals posts to.
  </Card>
</Cards>

## Install the ovok command [#install-the-ovok-command]

```bash
npm install --global @ovok/cli
ovok --version
```

`ovok` needs Node.js 22.12 or later. In a terminal, each command tells you when a newer version is
on npm.

## Sign in [#sign-in]

`ovok` acts as a client application of your project. Create one in the Ovok Console and keep its
ID and secret at hand. Then pipe the secret in, so it stays out of your shell history:

```bash
printf %s "$OVOK_CLIENT_SECRET" | ovok login --client-id {{CLIENT_ID}} --client-secret-stdin
```

- `ovok login` signs in to `https://api.sandbox.ovok.com` unless you pass `--base-url`.
- It saves a profile in `~/.config/ovok/profiles.json`, readable by you only.
- Keep more than one with `--profile <name>`. Every command takes `--profile`.
- In CI, set `OVOK_BASE_URL`, `OVOK_CLIENT_ID` and `OVOK_CLIENT_SECRET` instead. All three together
  take the place of a saved profile.

Signals routes, used by `ovok webhooks` and `ovok listen --signals-url`, need a manager app. FHIR
Subscriptions need an app whose access policy can create one. See
[Signals access policies](/access-policies/signals).

## Get help in the terminal [#get-help-in-the-terminal]

Run `ovok --help` for the list of commands. Run `ovok <command> --help` for a command's options and
examples.

## Reference [#reference]

- [create-ovok](/cli/reference/create-ovok)
- [ovok login](/cli/reference/login)
- [ovok logout](/cli/reference/logout)
- [ovok listen](/cli/reference/listen)
- [ovok webhooks](/cli/reference/webhooks)
