---
title: "ERPC CLI commands"
description: "Every ERPC CLI command group, the global options --json and --lang, the error format and exit codes, and the erpc storage and erpc backup commands."
canonical: "https://erpc.global/en/doc/erpc-cli/commands/"
locale: "en"
---

# ERPC CLI commands

Every ERPC CLI command group in one table, the options that work on every command, and the exit codes a script can rely on.

This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release.

## Command groups

Run any command group without a verb, such as `erpc validator` or `erpc worker`, to list its verbs.

| Command | What it does |
| --- | --- |
| `validator` (`v`), `rpc` (`r`), `node` (`n`) | [Validators and RPC nodes](https://erpc.global/en/doc/erpc-cli/nodes/) |
| `rpc call` | Sends one JSON-RPC request to a shared, custom or x402 endpoint ([RPC calls and webhooks](https://erpc.global/en/doc/erpc-cli/rpc-call-and-webhooks/)) |
| `webhook` | Manages local RPC subscriptions and delivers events to an HTTP callback |
| `ai`, `resume`, `memory`, `skills` | [ERPC AI](https://erpc.global/en/doc/erpc-cli/ai/), its saved conversations, memory and skills |
| `worker` (`w`) | [Your own apps](https://erpc.global/en/doc/erpc-cli/worker-quickstart/) on a server |
| `storage` (`st`), `backup` | ERPC Global Storage and machine backups ([below](https://erpc.global/en/doc/erpc-cli/commands/#storage-and-backups)) |
| `wallet` | The Base wallet that buys ERPC Credit with EURC ([Pay from a wallet](https://erpc.global/en/doc/erpc-cli/ai/#pay-from-a-wallet)) |
| `signup`, `login`, `logout`, `whoami` | Your ERPC account ([Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/)) |
| `doctor` | Reports how this machine stores your session |
| `config` | Reads and changes `~/.erpc/config.toml` (public settings only). `erpc config init` writes a commented starting file, unless there is one |
| `version` | Version, build and component information |
| `completions` | Generates shell completions: `erpc completions zsh`, and also bash, fish, powershell and elvish |

## Global options

- **`--json`** gives machine-readable output: `erpc --json <command>`. `ERPC_JSON=true` has the same effect. On node commands, `--json` has to go before the command.
- **`--lang`** sets the language erpc speaks: `en`, `ja`, `zh` or `ru`. Without it, erpc uses the `locale` setting, else the system's language.

## Errors and exit codes

A failure reads the same everywhere: an `error:` line saying what went wrong, and a `hint:` line saying what to do next when there is one. With `--json`, a failure is one object on standard output, `{"error": {"code", "exit", "message", "hint"}}`. Two cases print clap's own message and exit 2 instead: a command line clap cannot parse at a terminal, and an argument the verb of a node tree (`erpc validator`, `rpc`, `node`) does not take, even under `--json`. A `details` field appears only when a command has more to say to a script about what it did before it failed, and never at a terminal.

| Exit | Code | Meaning |
| --- | --- | --- |
| 0 | | It worked |
| 1 | `failed` | It could not do what was asked |
| 2 | `usage` | The command line was not usable |
| 3 | `needs_terminal` | A person must answer: pass `--yes` or run it in a terminal |
| 4 | `not_signed_in` | Run `erpc login` |
| 5 | `problems_found` | A check (`status`, `doctor`) found problems, and its report says which |
| 6 | `declined` | You said no, and nothing was changed |
| 7 | `network` | ERPC or another service could not be reached |

Stopped by Ctrl-C (or SIGTERM, SIGHUP), erpc ends by the signal itself, so a loop in a script stops too. A published code keeps its name and its exit status, and a code is never reused.

## Storage and backups

```bash
erpc storage buy 5        # an ERPC Global Storage plan
erpc backup init          # back this machine up with restic, on a schedule if you like
```

`erpc storage buy` buys an ERPC Global Storage plan, paid from ERPC Credit. Plans and prices are on [Pricing](https://erpc.global/en/price/).

### erpc storage

- `erpc storage put` encrypts a file on this machine before any of it is sent, unless `--no-encrypt` is given. ERPC stores only the encrypted bytes and never holds the key. `erpc storage get` notices an encrypted file and decrypts it.
- There is one storage key per account, kept in the store `erpc login` chose. erpc does not keep it in the Linux kernel keyring, which is lost on reboot: sign in with `--store 1password` or `--store file`, or use `--no-encrypt`. With the `file` store the key sits in `~/.erpc/storage-key` (mode 0600), not encrypted. `--no-encrypt` uploads the file you are sending as it is, unencrypted.
- **Losing the storage key loses every file encrypted with it**, and ERPC cannot recover it. `erpc storage key export --show` prints the key so a copy can be kept away from the machine, and `erpc storage key import` takes it back on another machine.
- The path a file is stored under, and its size, are visible to ERPC.
- `erpc storage keys list` shows the storage access keys, and `erpc storage keys revoke <n>` revokes one.

### erpc backup

`erpc backup` backs a machine up to ERPC Global Storage with restic. Files are encrypted on your machine before they leave it, and ERPC never holds a password that opens the backups.

| Command | What it does |
| --- | --- |
| `erpc backup init` | Installs restic, makes the access keys and the repository, and gives this machine its own restic key |
| `erpc backup run [paths]` | Backs up. On Linux, with no paths, `/` less pseudo-filesystems, mounts and volatile paths. Elsewhere, name the paths |
| `erpc backup snapshots` | This machine's snapshots; `--all-hosts` for every machine's |
| `erpc backup restore <id\|latest>` | Restores into a new directory unless `--target` names another. `--in-place` writes over this machine, after asking |
| `erpc backup check` | Checks the repository and reads back 5% of the data |
| `erpc backup prune` | Keeps 7 daily, 4 weekly and 6 monthly snapshots of one machine, after asking |
| `erpc backup schedule daily\|weekly\|off [paths]` | Runs `run` on a timer, at `--at` (default 03:00) |
| `erpc backup status` | The schedule, and how the last run ended |
| `erpc backup password --show` | Prints the repository's master password, to keep a copy elsewhere |

- **Each machine gets an append-only key** that cannot delete its own backups. The machine where you ran `erpc backup init` also holds the keys that can, so the protection holds only on a machine that keeps neither the erpc session nor the account's backup secrets.
- **Keep a copy of `erpc backup password --show` away from the machines.** Losing the master password and every machine's `backup.env` loses the backups.
- **A backup leaves out known key files and system secrets**, such as `.ssh/id_*`, `.config/solana/id.json`, erpc's session and the SSH host keys. Key material under another name or at another place is backed up like any other file: leave it out with `--exclude`.
- erpc installs restic 0.19.1 and checks both the archive and the program against SHA-256 digests compiled into erpc.
- **Scheduling:** on Linux, `sudo erpc backup init`, then `sudo erpc backup schedule daily`. On macOS, `erpc backup schedule daily ~/Documents`; the job runs as you, while you are signed in.
- Backups go to the account's default region. `erpc backup` runs on the machine it backs up; a worker's server is set up with `erpc worker backup on` instead ([Back up the app's state](https://erpc.global/en/doc/erpc-cli/worker-status-and-billing/#back-up-the-apps-state)).
