Connect Claude Code
Connect Claude Code to the hosted Customertimes gateway with one command: get a one-shot code from your profile page, run the installer, and every session is routed, governed, and audited — no repo, no build.
On this page
This is the user path, and it covers everyone who works through the gateway — including developers building things with it. You never need this repository, a Rust toolchain, or a server of your own. Only maintainers changing the gateway's own code do, and their page is Develop Against a Local Gateway.
One command takes a machine with nothing installed to a working claude wired
to the hosted Customertimes instance. You do not clone anything, build anything, or
run a server: the installer downloads from the gateway, installs Claude Code
itself if it is missing, signs you in, and syncs your organization's skills,
plugins, and MCP servers. From then on every session routes through the gateway
and lands in the audit trail.
Prefer a desktop app? The bridge also powers Claude Cowork on Windows and macOS: Install the Desktop Bridge.
1. Get an account
Accounts live on the hosted instance — there is nothing to install for this step. At ct.systemprompt.io/admin/login, either:
- Sign in with your passkey. There is no password. If you have not
enrolled yet, register at
/admin/register— either because an admin has already created your account with that email, or because your instance has open registration switched on. See Authentication.
If your domain is not allow-listed, an administrator creates the account and hands you a connect code in one step:
systemprompt admin users create --name <name> --email <email> --if-not-exists
systemprompt --json admin bridge issue-code --user-id <email> \
| jq -r '.sections[] | select(.heading == "code") | .content'
2. Get a connect code
Sign in and open your Profile page. It mints a one-shot connect code and prints the install command with the code filled in — copy that command and skip to the next step.
The code is 32 random bytes, stored only as a SHA-256 hash, valid for ten
minutes, single use. The installer redeems it for a durable personal access
token that stays on your machine and never passes through the browser. A
leaked code is dead within minutes; if yours expires, reload the profile page
for a fresh one. Headless or scripted? The admin issue-code command in the
previous step mints the same code without a browser.
3. Run the installer
On Linux or WSL:
curl -fsSL https://ct.systemprompt.io/files/downloads/install.sh | sh -s -- --code <code>
For Windows and macOS, use the platform installers on Install the Desktop Bridge instead. The Linux tarball is published for x86_64; the installer also supports aarch64 where that artifact is staged.
Run without --code and the installer falls back to interactive single
sign-on: it opens a browser against the gateway (or prints the URL when there
is no display) and you approve the machine from your signed-in session.
The installer, in order: downloads the bridge binary and verifies its SHA-256
checksum, installs Claude Code (npm i -g @anthropic-ai/claude-code, falling
back to the native installer), redeems the code, writes the environment,
starts the loopback inference proxy, syncs your organization's plugins, and
finishes with a self-test (customertimes-bridge doctor).
What it writes:
| Path | Contents |
|---|---|
~/.local/bin/customertimes-bridge |
The bridge binary (/usr/local/bin as root) |
~/.config/customertimes/ |
Client config, PAT (0600), loopback key, env.sh |
~/.profile |
Managed block sourcing env.sh, for other Anthropic-API clients. Claude Code does not depend on it |
~/.claude/settings.json |
Base URL, apiKeyHelper, model discovery (merged into your existing settings; /etc/claude-code/managed-settings.json instead when run as root) |
~/.local/share/Claude/org-plugins/ |
Organization plugins, skills, MCP servers |
| systemd user units | 30-minute sync timer, loopback inference proxy |
To undo all of it: customertimes-bridge uninstall, then remove the binary.
4. Use it
Run:
claude
Nothing to source and no new shell needed: the installer writes
~/.claude/settings.json, which Claude Code reads on every run, in any
terminal. It points Claude Code at the loopback proxy, which authenticates to
the gateway for you.
To confirm you are routed, check the header Claude Code prints on start. If it
says API Usage Billing, it is talking to Anthropic directly rather than
through the gateway, and nothing will appear in your usage. Your
organization's skills and plugins are already registered:
claude plugin list
The bridge re-syncs every 30 minutes, so plugins and skills published to the instance show up on your machine without reinstalling.
Verify
customertimes-bridge doctor
One line per check: credential, loopback secret, proxy, org marketplace, filesystem layout. Exit 11 means at least one hard failure. A hook-token warning is expected on a fresh install — OAuth client provisioning is lazy, on the first plugin hook request rather than during sync.
Troubleshooting
| Symptom | Cause |
|---|---|
| Code rejected | 10-minute TTL, single use. Reload the profile page for a fresh one. |
claude works, audit trail empty |
Not routed through the gateway. Check ANTHROPIC_BASE_URL points at the loopback proxy and customertimes-bridge doctor reports it running. |
| The proxy is not listening | Start it with customertimes-bridge proxy and check ${TMPDIR:-/tmp}/customertimes-bridge-proxy.log; on systemd hosts, systemctl --user status customertimes-bridge-proxy.service. |
claude plugin list is empty |
Claude Code was not installed when sync ran — the marketplace step skips silently without the CLI. Install Claude Code, then customertimes-bridge sync. |
| No browser for sign-in (SSH box) | customertimes-bridge login --no-browser --gateway https://ct.systemprompt.io, or use a --code from your profile page. |