Skip to main content

nazar-bridge

nazar-bridge is a small, open-source daemon that lets you drive Claude Code on your own machine from the Nazar phone dashboard.

It holds a single long-lived outbound WebSocket connection to the Nazar API, registers your local Claude-Code project directories, and — when you send a prompt from your phone — spawns claude -p in the matching project and streams the output back. Nothing listens for inbound connections on your machine; the daemon dials out, so there are no ports to open.

The source is intentionally small and auditable — read it before you install it. That's the whole trust model (see Trust & supply chain).


Prerequisites

  • Python 3.12+ on your machine.
  • Claude Code installed and authenticated. The daemon shells out to the claude CLI using your logged-in session, so claude must be on your PATH and already signed in.
  • A Nazar account on a Pro or Unlimited plan. The bridge is a paid-tier feature — the Free plan has no bridge and cannot mint daemon tokens.

Install

Recommended (isolated tool install via uv):

uv tool install nazar-bridge

Alternative (via pipx):

pipx install nazar-bridge

Upgrade later:

uv tool upgrade nazar-bridge      # or: pipx upgrade nazar-bridge

Both put a nazar-bridge command on your PATH.


Connect

  1. Get a daemon token. In the Nazar dashboard, open /code → Bridge tokens and create one. It looks like nazar_bridge_xxxxxxxxxxxxxxxx. Copy it now — it's shown only once.

  2. Configure the daemon with the token (and, if your API host differs from the default, the WebSocket URL):

    nazar-bridge configure --token nazar_bridge_xxxxxxxxxxxxxxxx
    # to point at a self-hosted / dev API instead of the default:
    nazar-bridge configure --token nazar_bridge_xxxx --api-url wss://your-host/api/bridge/ws
    
  3. Register the project directories you want reachable from your phone:

    nazar-bridge add /path/to/your/project
    nazar-bridge add /path/to/another/project
    nazar-bridge list
    
  4. Run it. Either start it once in a terminal:

    nazar-bridge run            # add --debug for verbose logs
    

    …or install it as a login autostart service (recommended — see below) so it reconnects automatically after a reboot.

run --once exits right after the first successful register — handy for smoke-testing a freshly-configured daemon.


Tasks from Nazar and your task tracker

From inside a registered project directory (or with --project <slug>):

nazar-bridge tasks                      # open Nazar todos/bugs + connected tracker tasks
nazar-bridge task trello:64f1ab         # full detail; images saved locally, paths printed
nazar-bridge done trello:64f1ab --to "Review" --comment "Fixed in abc123"
nazar-bridge done todo:12               # or the older: nazar-bridge done 12 [--kind todo]
nazar-bridge comment trello:64f1ab "On it"

Add --json to any of them for machine-readable output. Tracker tasks (Trello today) come from the boards linked to the project's Nazar project; the Nazar server makes every tracker call, so tracker credentials never reach this machine — the daemon token is the only credential used. Claude Code runs started through the bridge are told about these commands, so you can simply ask it to "get my Trello tickets".


Instead of leaving a terminal open, register the daemon to start at login and restart on failure. One cross-platform command detects your OS and writes the right unit:

nazar-bridge service install      # Windows / macOS / Linux
nazar-bridge service status       # is it installed / running?
nazar-bridge service uninstall    # remove it
OS What service install creates
Windows A Task Scheduler task "Nazar Bridge" that runs at logon (windowless).
macOS A launchd LaunchAgent app.nazar.bridge in ~/Library/LaunchAgents.
Linux A systemd --user unit nazar-bridge.service (enabled + started).

The service always runs as your own user (never root/SYSTEM) because the daemon spawns claude with your personal Claude Code login — service install refuses to run as root. On Linux, run loginctl enable-linger $USER if you want the daemon up even when you're not logged in interactively.

Logs go to the daemon's rotating log file (see below) regardless of how it's started. For live debugging, run nazar-bridge run in a terminal to watch output directly.

Windows note: earlier releases shipped scripts/install-windows-startup.ps1. That script still works and adds a richer restart policy, but nazar-bridge service install is now the recommended, cross-platform path.


Where config & logs live

OS Config file Daemon log
Windows %APPDATA%\nazar-bridge\config.toml %APPDATA%\nazar-bridge\daemon.log
macOS ~/.config/nazar-bridge/config.toml ~/.config/nazar-bridge/daemon.log
Linux $XDG_CONFIG_HOME/nazar-bridge/config.toml or …/nazar-bridge/daemon.log
~/.config/nazar-bridge/config.toml

The token is stored plaintext in config.toml — it's the daemon's only credential. Protect it with filesystem permissions:

  • Windows: icacls "%APPDATA%\nazar-bridge\config.toml" /inheritance:r /grant:r "%USERNAME%:F"
  • macOS / Linux: chmod 600 ~/.config/nazar-bridge/config.toml

Rotating the token is two commands: nazar-bridge configure --force --token <new> (your project list is preserved).


Trust & supply chain

The bridge runs on your machine and runs Claude Code with full permissions, so its trustworthiness matters. The design keeps that auditable:

  • Open source. Every line is on GitHub: arm-yan/nazar under apps/bridge. Read it before installing.
  • Published from PyPI, not a private host. uv tool install nazar-bridge pulls the package and its only two runtime dependencies (websockets, pydantic) from PyPI. Nothing is downloaded from a private or vendor server.
  • Signed provenance. Releases are published to PyPI via GitHub Actions Trusted Publishing (OIDC) with attestations — no long-lived upload token exists, and each artifact carries signed build provenance you can verify back to the tagged commit.

Security model

Be deliberate about what this daemon does:

  • When a prompt arrives from your authenticated Nazar dashboard, the daemon spawns Claude Code with --dangerously-skip-permissions — Claude can read, write, and run commands in the registered project directory without per-action prompts. This is intentional: it's your machine, your Claude login, and your token, and the point of the bridge is hands-off remote execution.
  • The trust boundary is your daemon token plus your single-user host. Anyone who holds the token can drive Claude on your machine through the Nazar API. Treat the token like an SSH key: keep config.toml locked down, and rotate/revoke the token (from the dashboard) if it leaks.
  • The daemon only ever makes an outbound WebSocket connection — it opens no listening port on your machine.

If that posture isn't acceptable for a given machine, don't install the bridge there.


Wire protocol

The daemon and API speak JSON text frames over the WebSocket. The source of truth for the schemas is apps/api/nazar_api/schemas/bridge.py; the daemon's nazar_bridge/wire.py mirrors the relevant subset so the daemon stays installable independently of the API package.


Develop / test

cd apps/bridge
python -m pip install -e ".[dev]"
pytest
ruff check nazar_bridge tests
mypy nazar_bridge

Build the distributables locally:

python -m build          # produces dist/*.whl and dist/*.tar.gz
twine check dist/*

Metadata

Release files for nazar-bridge 0.7.40

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nazar-bridge 0.7.40
File Size Uploaded Provenance Actions
nazar_bridge-0.7.40.tar.gz 328.0 kB Without provenance Details for nazar_bridge-0.7.40.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nazar-bridge 0.7.40
File Interpreter ABI Platform Actions
nazar_bridge-0.7.40-py3-none-any.whl Python 3 none any Details for nazar_bridge-0.7.40-py3-none-any.whl

Total release size: 538.9 kB

Release files / nazar_bridge-0.7.40.tar.gz

Download URL nazar_bridge-0.7.40.tar.gz
Size 328.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f1d42d13047520d77ac4ef0b908201eb7db5ea16ad91aeb12875571d9ef49018
BLAKE2b-256 checksum
How to use checksums
76d1fbe6a7547a0969e1fd60cb39ba6019f7b2c3675c6388b2533a89ca1d63c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / nazar_bridge-0.7.40-py3-none-any.whl

Download URL nazar_bridge-0.7.40-py3-none-any.whl
Size 210.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d40be2639c0ac6875e1c5d6d51ca39fedea6f1d20eeee9c2b37dfdb8ff78ce5d
BLAKE2b-256 checksum
How to use checksums
924ed554c733c3e730c344efe7e426f5c301cd6b357e2041e48aee5446bfe209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for nazar-bridge 0.7.40

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.40 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page