# Install Ntfyx for your agent

Ntfyx sends end-to-end encrypted notifications and questions from a CLI or agent to your iPhone. An optional Web Inbox can receive new messages after your phone authorizes it. No Ntfyx account or browser connection is required for CLI use.

## 1. Install on macOS or Linux

Run only when the user has authorized installation on this computer:

```sh
curl -fsSL https://ntfyx.me/install.sh | bash
```

The official installer detects the supported platform and verifies the release signature and exact binary checksum before installation. It uses bash, curl and OpenSSL, installs to `~/.local/bin` by default, and preserves an existing binary if verification fails. You may download and inspect `https://ntfyx.me/install.sh` before running it. Do not disable verification.

Supported targets: macOS Apple silicon / Intel and Linux glibc x64 / arm64. Windows and musl Linux are not supported. There is currently no official Homebrew tap and no npm registry release. Do not substitute `brew install ntfy`: that is a different product.

For this shell session, make the installed command available and check it:

```sh
export PATH="$HOME/.local/bin:$PATH"
ntfyx version --json
```

The verified version is the one reported by the binary; this guide follows the current official installer. Versioned artifacts and signatures are linked at https://ntfyx.me/download.

## 2. Connect with the person's iPhone

```sh
ntfyx connect
```

Present the one-time QR code privately. Ask the person to scan it in Ntfyx on their iPhone and confirm the Topic and Source. Wait for the CLI to report a completed connection. Do not approve, bypass, or simulate phone authorization; do not paste the QR/link into logs, tickets, public pages or messages to others. If the user already has a connection, inspect `ntfyx topics` and use it unless they explicitly want another Source.

The iPhone app is awaiting App Store review; no public App Store or TestFlight download is currently advertised. End-to-end use needs a compatible iPhone build. If the person cannot authorize a connection, stop at the installed state and report that prerequisite rather than claiming setup succeeded.

Production is the default. Only when the person explicitly intends to use the separate staging app/environment:

```sh
ntfyx connect --server https://api.staging.ntfyx.me
```

## 3. Attach an agent

For Claude Code, preview the managed changes and then apply within the person's authorized setup:

```sh
ntfyx setup claude-code --dry-run
ntfyx setup claude-code
```

This registers Ntfyx MCP tools and hooks while preserving unrelated configuration. Native permission-hook handling depends on the supported host/version/platform; it is not a universal remote-approval bypass. Compatibility details: https://ntfyx.me/docs/agents.

For another MCP client, configure a local stdio server with executable `ntfyx` and argument `mcp` (or use the absolute installed executable path):

```json
{"mcpServers":{"ntfyx":{"command":"ntfyx","args":["mcp"]}}}
```

The client launches `ntfyx mcp`. Merge this entry into existing configuration; do not replace unrelated servers or permission rules. The client's own tool authorization still applies.

## 4. Verify the connection without external side effects

After phone authorization:

```sh
ntfyx send "Ntfyx connection ready"
```

For an explicitly requested reply test:

```sh
ntfyx ask "Reply test only: allow this test?" --allow-deny
```

This question does not authorize any deployment, purchase, file change, or other external action. Report the actual returned result. An encrypted event accepted by the relay is not proof of phone delivery; an Allow is not proof of execution. Respect Deny, timeout, cancellation, unsupported-host fallback, and the user's local policy. Do not broaden the requested action.

## Optional Web Inbox and updates

Open https://app.ntfyx.me for an optional browser receiver. The phone scans its code, chooses access, and can revoke it. Browsers receive independent keys and only new messages; CLI/agent setup does not require this browser step.

For a standalone installation, `ntfyx upgrade` verifies the signed update before atomic replacement. Package-managed installations remain owned by their package manager. Security boundaries: https://ntfyx.me/security. Help: https://ntfyx.me/docs/troubleshooting.
