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

# Zend CLI

> Log in with your phone, create and deploy ZApps, manage API keys and webhooks.

The `zend` CLI uses your own Zend account. There's no separate developer account: apps you create belong to you, and anything that settles goes to the same account you use in the Zend app.

## Install

```bash npm theme={null}
npm install -g pay-with-zend-cli
```

```bash npx theme={null}
npx pay-with-zend-cli login
```

Requires Node.js 18 or later. The installed command is `zend`.

```bash theme={null}
zend --version
zend --help
```

## Log in

```bash theme={null}
zend login
```

Approve the login on your phone. See [Log in](https://developers.usezend.app/cli/login.md).

## Commands

| Command | What it does |
| - | - |
| [`zend login`](https://developers.usezend.app/cli/login) | Pair the CLI with your Zend account |
| [`zend apps`](https://developers.usezend.app/cli/apps) | Create, check, deploy and manage ZApps |
| [`zend keys`](https://developers.usezend.app/cli/keys) | Create, list and revoke API keys |
| [`zend config`](https://developers.usezend.app/cli/config) | Set your account's webhook URL |
| [`zend payments test`](https://developers.usezend.app/cli/payments) | Check a payment request without creating it |
| [`zend logs tail`](https://developers.usezend.app/cli/logs) | Show recent webhook deliveries |

## Configuration file

Every command except `login` reads `~/.zend/config.json`:

```json ~/.zend/config.json theme={null}
{
  "apiKey": "zdev_live_...",
  "webhookUrl": "https://yourapp.com/webhooks/zend",
  "baseUrl": "https://api.usezend.app"
}
```

| Key | Notes |
| - | - |
| `apiKey` | Saved by `zend login` |
| `webhookUrl` | Saved by `zend config set webhookUrl` |
| `baseUrl` | Optional. Only for pointing the CLI at a non-production environment |

The file is written with `0600` permissions (owner read and write only). If it's missing or has no `apiKey`, commands stop with "Not logged in. Run `zend login` first."

## In CI

`zend apps deploy` also accepts an app key from the environment, so CI doesn't need your personal login:

```bash theme={null}
ZEND_APP_KEY=zapp_sk_... zend apps deploy zapp.json
```

An app key can only deploy its own app's manifest.

## Security

* `zend login` never asks for a typed key or secret. If a prompt or flag asks for one during login, it isn't the real CLI.
* Your key is stored in plain text, protected only by file permissions. Don't commit `~/.zend/config.json` or sync it to shared machines.
* A key can only create keys with scopes it already has. See [`zend keys`](https://developers.usezend.app/cli/keys).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.