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

> ## Agent Instructions
> Maximem Synap is a managed memory layer for AI agents: it ingests conversations and documents, extracts structured memory, and returns scoped context to the agent at retrieval time.
> The Python and JavaScript/TypeScript SDKs are the supported way to use Synap. Write integration code with SDK calls, not raw HTTP requests.
> Start with the Quickstart: https://docs.maximem.ai/getting-started/quickstart.md. Every SDK method is documented in the SDK reference: https://docs.maximem.ai/sdk-reference/overview.md.
> For requests about adding Vity memory to OpenClaw, Hermes, an MCP client, or a browser, start with the Vity Quickstart: https://docs.maximem.ai/vity/quickstart.md.

# Synap CLI

> Provision and operate Synap from your terminal with maximem-synap, the command-line counterpart to the Dashboard.

The **`maximem-synap` CLI** lets you provision and operate Synap from your terminal: log in, create and manage instances, mint API keys, manage your team, and inspect requests and memories: the same operations as the [Dashboard](https://docs.maximem.ai/dashboard/overview.md), scriptable.

> [!NOTE]
>
> **CLI vs SDK.** The [SDK](https://docs.maximem.ai/setup/installation.md) is the *runtime* surface: your agents import it to read and write memory (`recall`, `save`, `context`). The CLI is the *control plane*: you use it to set Synap up and operate it. They are separate tools for separate jobs.

## Install and log in

The CLI ships on npm as a small bootstrapper that installs the tool onto your `PATH`. The fastest start is a single command:

```bash theme={null}
npx @maximem/synap-cli@latest auth login
```

This installs the CLI (if it isn't already) and starts the browser login. After the first run, the `maximem-synap` command is on your `PATH`:

```bash theme={null}
maximem-synap auth login
maximem-synap whoami
```

> [!NOTE]
>
> Requires **Node.js 16+** and **Python 3.10+** on the host. The SDK has separate requirements: see [Installation](https://docs.maximem.ai/setup/installation.md). The CLI is dependency-light and stores its config under `~/.config/synap/config.json` (mode `0600`).

## Logging in

Authentication is a browser device-pairing flow, like `gcloud auth login`. You never paste a key; your identity stays in the browser.

**1. Run the login command**

```bash theme={null}
maximem-synap auth login
```

The CLI prints a short pairing code and opens your browser:

```
  Your pairing code is:  XYZA-BCDE
  Approve this login at: https://synap.maximem.ai/cli/pair?code=XYZA-BCDE

  Waiting for approval…
```

**2. Approve in the browser**

On the [Synap dashboard](https://synap.maximem.ai) pair page, confirm the code matches your terminal, pick the client to connect to, and click **Approve**. If you aren't signed in, you'll be prompted first.

**3. You're in**

The terminal confirms the login and stores the session under your active profile:

```
Logged in to client "Acme" · profile "default"
```

The browser-login key is bound to one client and expires after 90 days. Before it expires, renew it without repeating browser pairing:

```bash theme={null}
maximem-synap auth refresh
```

> [!NOTE]
>
> A dashboard coding-agent prompt uses a different, restricted setup key. It lasts 7 days, cannot be renewed, and should be revoked with `auth logout` after setup. See [Set up with your AI coding agent](https://docs.maximem.ai/integrations/ai-coding-agents.md).

### Which account am I?

```bash theme={null}
maximem-synap whoami        # client, scopes, key expiry, profile
maximem-synap auth list     # all logged-in accounts (active one starred)
```

### Multiple accounts

Each profile holds one session bound to one client. Log into different clients under different profiles and switch between them:

```bash theme={null}
maximem-synap auth login --profile acme        # log into Acme
maximem-synap auth login --profile internal    # log into another client
maximem-synap auth use acme                     # switch the active profile
```

## A quick tour

```bash theme={null}
maximem-synap instances list                              # your memory instances
maximem-synap instances create --name "Support" --relationship b2c --from-file ./use-case.md
maximem-synap api-keys create --instance <id> --label prod   # an SDK key, shown once
maximem-synap requests list --since 1h                    # what happened in the last hour
maximem-synap memories list --instance <id>               # inspect stored memories
maximem-synap client members list                         # your team
```

Add `--json` (or `--output json`) to any command for scripting, and `--help` to any command for its options. Global flags (`--output`, `--json`, `--profile`, `--env`, `--api-base`, `--verbose`, `--non-interactive`) work before or after the command.

> [!WARNING]
>
> An API key minted with `api-keys create` is shown **once** and never again. Copy it immediately. This is the key your agents put in the SDK (`SYNAP_API_KEY`).

## Logging out

```bash theme={null}
maximem-synap auth logout      # revokes the key server-side and removes it locally
```

## Next steps

> [card] [Command reference](https://docs.maximem.ai/cli/commands.md)
>
> Every command and flag: auth, instances, api-keys, client, requests, memories, config.

> [card] [Dashboard](https://docs.maximem.ai/dashboard/overview.md)
>
> The same operations in the web UI.


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