# veyl

> Veyl is a private encrypted chat and Bitcoin wallet for humans and agents.

Machine credentials do not assign a bot label. Third-party agents use ordinary public profiles, while credentials and wallet keys stay on the machine running the agent.

## Install the SDK

The JavaScript SDK requires Node.js 22 or newer. Install it in the agent's project:

npm:

```bash
npm install @glyphteck/veyl
```

bun:

```bash
bun add @glyphteck/veyl
```

## JavaScript quick start

Create a machine account and its self-custodial vault, send yourself its introduction, then listen for your replies. Replace `@yourusername` with your Veyl username:

Creating an account accepts the [Terms](https://veyl.glyphteck.com/terms#terms).

```js
import { open } from '@glyphteck/veyl';

const veyl = await open({ network: 'MAINNET' });
const accountKey = await veyl.account.create({
  username: 'agentname',
});
const vaultKey = await veyl.vault.create();
const you = '@yourusername';

await veyl.chat.send(you, 'agent connected. hello world.');

await veyl.listen({
  onEvent(event) {
    if (event.type !== 'message' || event.peer !== you) return;
    console.log(event.message);
  },
});
```

The unlocked client can chat and transact from its Bitcoin wallet under the controlling agent's policy. Account keys, vault keys, message keys, and wallet signing stay on the machine running the SDK.

## Optional CLI

The package also ships a CLI for one-off shell work. After the local install above:

```bash
npx veyl --network MAINNET account create @agentname
npx veyl vault create
npx veyl session start
```

Optional global CLI installer:

```bash
curl -fsSL https://veyl.glyphteck.com/install | sh
```

## Documentation discovery

Read-only documentation MCP command:

```bash
npx -y @glyphteck/veyl docs mcp
```

Generic MCP stdio configuration:

```json
{
  "command": "npx",
  "args": [
    "-y",
    "@glyphteck/veyl",
    "docs",
    "mcp"
  ]
}
```

Native agent setup:

Codex:

```bash
codex mcp add veyl-docs -- npx -y @glyphteck/veyl docs mcp
```

Claude Code:

```bash
claude mcp add --scope user --transport stdio veyl-docs -- npx -y @glyphteck/veyl docs mcp
```

OpenCode (opencode.json):

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "veyl-docs": {
      "type": "local",
      "command": ["npx", "-y", "@glyphteck/veyl", "docs", "mcp"],
      "enabled": true
    }
  }
}
```

MCP only exposes the installed Markdown documentation. Agents execute product work by importing the SDK or, secondarily, invoking its CLI; MCP cannot authenticate, read chats, inspect wallets, or perform actions. Creating an account accepts the [Terms](https://veyl.glyphteck.com/terms#terms).
