# Security and privacy

> GUIJam runs only in development, listens on localhost with a per-session token, never reads your AI credentials and never gives your CLI write tools.

GUIJam turns your browser into a way to change source files, so it's built to keep that power on your machine and in your hands.

## Development only

GUIJam runs only under your dev server. The Vite plugin applies only to `dev`, and a test checks that production builds are byte-for-byte identical with and without it. Nothing from GUIJam ships to your users.

## Localhost only

- The `gjd` daemon listens on `127.0.0.1` only, and refuses requests whose `Host` isn't `127.0.0.1` or `localhost`, which blocks DNS rebinding.
- It refuses any request that carries an `Origin` header, because that means a browser is calling it directly.
- Every connection needs a per-session token, compared in constant time.
- The token lives in `.guijam/run/daemon.json`. On macOS and Linux, only you can read it.
- Only the dev server plugin connects to the daemon. The page talks to the plugin over Vite's hot-reload channel, so there's no endpoint a web page can reach and no token in page JavaScript.
- In Next.js, the relay accepts only `localhost`, `127.0.0.1` and `[::1]` origins, plus a per-session token.

## Your credentials stay yours

GUIJam never copies, stores or transmits your AI tool's credentials. It runs your CLI's own login command, and learns whether you're logged in from the CLI's own status command or from how a request turns out.

With OpenCode, GUIJam reads the provider settings in your global OpenCode config, so custom providers and base URLs work in GUIJam too. It leaves out any key, token, password or `Authorization` header written into that file, and passes on only `{env:…}` and `{file:…}` references, for OpenCode to resolve. See [OpenCode](https://guijam.francistinao.com/docs/ai-tools/opencode#your-opencode-providers-carry-over).

## Your CLI can't write

Every run is headless, with no tools that can change files:

| AI tool     | How it's kept read-only                                                                                   |
| ----------- | --------------------------------------------------------------------------------------------------------- |
| Claude Code | No tools, or only `Read`, `Grep` and `Glob`, in safe mode with none of your MCP servers, plugins or hooks |
| Codex       | A read-only sandbox                                                                                       |
| OpenCode    | A `guijam` agent with every permission denied                                                             |
| Qwen Code   | Safe mode and plan mode                                                                                   |
| Gemini CLI  | A deny-all policy or plan mode, and no MCP servers                                                        |

Your CLI answers with edits as data. The `gjd` daemon validates them and is the only process that writes.

## Protected paths

The daemon refuses to write outside your project, and never writes to `.git`, `node_modules`, `dist`, `build`, `.guijam`, any `.env` file, or `.pem` and `.key` files.

## Untrusted content

Pages you link in a prompt are treated as data, not instructions: their text is escaped and marked as untrusted before your CLI sees it, and redirects to private network addresses are blocked.

## No telemetry

GUIJam sends no telemetry.
