ccmorph stores credentials on disk. This document says exactly where, what protects them, and what does not — so you can decide whether to trust it with an API key before you do.
Open an issue for anything already public. For anything that would expose a credential if described publicly, contact the maintainer directly rather than filing a public issue, and allow time for a fix before disclosure.
Include the ccmorph version (ccmorph --version), your OS and zsh version, and
the smallest reproduction you have. Never paste a real key, token, or .conf file
into a report — describe the shape instead.
The latest released version. There are no backported security fixes for older tags; update rather than patch in place.
| Path | Holds | Mode |
|---|---|---|
~/.config/ccmorph/<name>.conf |
one profile: API key, OAuth token, or an email for a subscription login. On macOS the key and token move to the login keychain on first use and the conf keeps only keychain:<name>.<key>; with no login keychain (Linux, CI, a throwaway $HOME) they stay in this file in plain text |
600 |
login keychain, service ccmorph |
that profile's API key or OAuth token (macOS) | keychain ACL |
~/.config/ccmorph/profiles/<name>/models.json |
context limits ccmorph probe discovered for the profile's route; no credential |
600 |
~/.config/ccmorph/ |
the state root (honours CCMORPH_STATE_DIR, then XDG_CONFIG_HOME) |
700 |
~/.config/ccmorph/profiles/<name>/ |
that profile's Claude Code config, including its own auth state | 700 |
${TMPDIR}/ccmorph-<uid>.log |
launch and adapter diagnostics | ephemeral; created 600, and an existing log of ours is tightened to 600 |
${XDG_STATE_HOME:-~/.local/state}/ccmorph/usage/ |
one metadata receipt per response: profile, model, token counts, cost; no prompt, header or credential | 600 |
${XDG_STATE_HOME:-~/.local/state}/ccmorph/usage-cursors/ |
one session transcript's read position for the usage hook; a path digest and an offset, no credential | 600 |
<profile>/adapter/ |
a rendered translator config, created per session | 700, removed on exit |
Every *.conf is gitignored, including the manual context_window.<model>
overrides it holds. No
credential has ever been tracked in this repository.
-
The usage hook holds no credential. A
sub,tokenorproviderlaunch adds oneStophook that reads the session's own transcript after a stored offset. It reads only each assistant entry's id, model, timestamp and token counts: no prompt, header, cookie or credential is copied into a receipt, and the launch changes no network path, proxy or certificate. The hook command is a path and a profile name; the credential never appears on it. -
Atomic writes. A profile is written to a
mktempfile and renamed into place, so an interrupted write cannot leave a half-file that still parses. -
Modes set before content. Files are created
600and directories700before anything is written to them, not fixed up afterwards. -
Symlink refusal. ccmorph removes a profile-local
settings.jsononly when it is a symlink, and refuses to generate settings through a symlinkedsettings.jsonorsettings.profile.json. Writers refuse to follow a symlink into a location they did not choose. -
No credential in generated settings. A profile's
settings.jsonis generated, but every variable a launch sets — endpoint and API key included — is left out of itsenvblock; credentials reach Claude Code only through the process environment. -
No credential in a log or an error. No log line or error message interpolates a key, a token, or a raw
auth statuspayload. -
No credential on a command line. Credentials reach Claude Code and the translator through the environment or a
600file, never as an argument, so they do not appear inpsoutput. -
Secret prompts do not echo.
ccmorph addreads keys and tokens withread -rs, so they do not reach your terminal or your shell history. -
Per-credential isolation. A profile holding a credential gets its own translator instance. A shared instance would let one profile spend another's credential, because the translator's inbound key list is instance-wide.
-
A non-subscription profile does not inherit your subscription. When seeding a new profile, OAuth caches and subscription markers are stripped.
-
The one-time profile-directory move renames, never copies. Relocating profile state from
~/.claude-profilesinto the state root is anos.renameunder an exclusive lock, so no credential is duplicated on disk and no mode is re-derived. It refuses to merge or overwrite when both locations hold real directories, refuses a cross-device move rather than falling back to a copy, and rolls back if it cannot leave the legacy path behind as a compatibility symlink. Native~/.claudeis not touched.
Know these before trusting the tool with a key.
- With no login keychain the credential sits in the conf unencrypted
(Linux, CI, a throwaway
$HOME): mode600, file permissions alone, and a copy of the file is the credential itself. On macOS the same is true only until first use moves the key to the keychain. - The login keychain is not a boundary inside your own session. ccmorph
reads the item back on every launch, with no passphrase, through the
securitycommand — and anything running as your user can run that same command and read the key too. What it does buy: the conf then holds only thekeychain:<name>.<key>reference, so a copied, synced or stolen conf never holds the credential itself, and the item is encrypted at rest instead of lying in a readable file. ccmorph cred <profile>prints a stored credential to stdout by design, for piping into another command. Redirect them deliberately; a shell that logs command output will capture the value.local.shis trusted executable zsh, sourced into ccmorph's process on launch. Anyone who can write it can already writelib/ccmorph.shbeside it, so it grants no new privilege — but it is code, not configuration. Read anything you copy into it.--uninstalldeliberately leaves your profiles in place, credentials and per-profile runtime state included. Removing the state root (~/.config/ccmorph, which now holdsprofiles/) is a separate, manual step.- A gateway you point a profile at receives your prompts. ccmorph does not inspect, filter, or retain them, and adds no telemetry of its own — but pointing a profile at an endpoint is a decision to send your conversations there.
- Discovered context limits (
profiles/<name>/models.json) are machine-local and route-bound. Never copy another host's.confwholesale: its ceilings were probed against that host's route, and a wrong ceiling means a session that dies mid-conversation instead of compacting. A route change invalidates the stored discovery automatically; a manualcontext_window.<model>override is not route-bound and travels with the profile on purpose.
ccmorph itself makes only metadata requests — model listings and reachability probes — never inference, except where it says so:
ccmorph probeis metadata-only by default. Context-limit inference requires--allow-inferenceand a selected profile/model. Accepted requests may be billed.- Automatic compatibility uses cache and per-model protocol metadata first. If those cannot answer, it may send up to four requests for the selected model, capped at 8 output tokens for Messages/Chat or 16 for Responses within a 30-second classification deadline. Charges are disclosed before the check; successful verdicts are cached. No selected model means no paid inventory sweep.
--check skips persistence; inference remains a separate explicit opt-in.
Command, installation, and host-integration boundaries are defined in Scope and ownership.