One subscription, many coders, no guesswork.
See how much of each shared Claude and ChatGPT plan is left — and who used it.
English | 繁體中文
Download · Getting started · Run the server
When a few people share Claude Max/Pro and ChatGPT Plus subscriptions, the provider tells you only one thing: how much of the whole account is gone. ShareCodex adds the rest — how much of each 5-hour and weekly window is left, how much each person is allotted, roughly how much each has used, and which models used it.
Each member runs a small menu bar (macOS) or system tray (Windows) app, and a command-line agent on Linux machines such as ones used over SSH. It reads the Claude Code and Codex logs already on the computer, asks the official CLIs which account is signed in, and syncs token counts to a server you host yourself.
Only coding-agent usage counts: Claude Code, and the Codex CLI, desktop app and IDE extension. ChatGPT web chat is not tracked.
The popup lists each shared account with its 5-hour and weekly windows, how much of each is used, and when it resets. The numbers come straight from Claude Code and Codex.
Each member has a bar for their estimated usage and a tick mark at their allotment. Anyone past their share is marked over allotment. Quota used with no matching record from anyone is shown as unattributed instead of being pinned on someone.
Each window also breaks usage down by model — requests, tokens, and an estimated share — so you can tell whether the week went to Opus or to a long run of Sonnet.
An admin creates a single-use join link in the web console; a member who has joined can create more for their other computers. The member pastes it into the app, signs in to the shared account in Claude Code or Codex as usual, and is added to that account automatically.
The app keeps working when the server is unreachable and uploads when it's back. It can start at login, refreshes when you open it, and never opens a terminal window.
Members, join links, account names, allotment weights and devices are all managed at /admin/ on
your server. No shell access to the container is needed.
- Only token counts, model names, timestamps and quota percentages leave the computer.
- Prompts, responses, working directories and project paths are never read into the ledger or uploaded.
- Accounts are identified by a one-way hash; the server keeps only a masked email such as
al***@example.comso admins can tell accounts apart. - No credential files are read. Account identity comes from
claude auth statusand Codex's own app server. - The server is yours. There is no third-party service, analytics or tracking.
- Get a join link from whoever runs your ShareCodex server.
- Install the app (see Get the app) and open it from the menu bar or system tray.
- Paste the join link. Each of your computers needs its own link, and all of them count as
you. Once one computer has joined, get a link for the next from Settings › Add device or
sharecodex invite. On Linux, see Linux and SSH machines. - Sign in to the shared account in Claude Code or Codex as usual. The account appears once the app sees it.
- Turn on statusLine capture in the app's settings to get Claude's quota. Your existing statusLine keeps working, and turning it off restores your original setting.
Usage from before you joined is not uploaded.
Requires Docker. The server does not terminate TLS; put it behind a reverse proxy such as Caddy, nginx or a Cloudflare Tunnel.
Download sharecodex-server-compose.zip from the
latest release. It runs the published image
ghcr.io/koukeneko/sharecodex-server (linux/amd64 and linux/arm64), pinned to that release.
unzip sharecodex-server-compose.zip && cd sharecodex-server-compose
cp .env.example .env # set POSTGRES_PASSWORD, PUBLIC_URL and ADMIN_PASSWORD
docker compose up -dPUBLIC_URL is the address members reach the server at; it appears in join links. To upgrade, set
SHARECODEX_VERSION in .env to the new release (or use a newer bundle) and run
docker compose up -d again.
Then open PUBLIC_URL/admin/ and sign in with ADMIN_PASSWORD:
| Page | What you do there |
|---|---|
| Overview | Every account's windows, each member's allotment and estimated usage, and usage by model |
| Members | Add members and create single-use join links |
| Accounts | Rename accounts and set each member's allotment weight |
| Devices | See each device's last sync and revoke devices |
Admin sessions are kept in memory, so restarting the server signs the admin out.
- Desktop: macOS (Apple silicon and Intel) and Windows (x64 and ARM64)
- Command line: Linux (x64 and ARM64), including machines used only over SSH
- Agents: Claude Code with a Claude Pro/Max subscription; Codex CLI, desktop app and IDE extension with a ChatGPT subscription
- Server: any Docker host, linux/amd64 or linux/arm64
- Interface: Traditional Chinese
Usage routed to other vendors' models — Claude Code through a gateway, or Codex with a third-party model provider — is ignored, because it doesn't draw on the shared subscription.
macOS, with Homebrew:
brew install --cask koukeneko/tap/sharecodexWindows, with Scoop:
scoop bucket add koukeneko https://github.com/KoukeNeko/scoop-bucket
scoop install koukeneko/sharecodexOr download ShareCodex-macos-universal.zip, ShareCodex-windows-amd64.zip or
ShareCodex-windows-arm64.zip from the
latest GitHub Release. The macOS app is
signed with a Developer ID and notarized by Apple. The app checks GitHub for new releases and tells
you when one is out; it never installs anything by itself.
macOS — refresh the tap first, or Homebrew may not see the new version yet:
brew update
brew upgrade --cask sharecodexWindows — quit ShareCodex from the tray icon first, since Windows won't replace a running app:
scoop update
scoop update sharecodexThe first command refreshes the bucket; the second installs the new version. Your settings, join and statusLine capture carry over.
Linux has no tray app. The sharecodex command runs the same agent in the background, so usage on a
machine you reach over SSH adds up with your other computers under your name.
brew install koukeneko/tap/sharecodex-cli # Homebrew on Linux
sharecodex join 'https://sharecodex.example.com/join/…' # from Settings › Add device on your Mac
sharecodex statusline-capture on # Claude's quota
sharecodex autostart on # systemd user service
loginctl enable-linger # keep it running after you log out
sharecodex statusWithout Homebrew, download sharecodex-linux-amd64.tar.gz or sharecodex-linux-arm64.tar.gz from the
latest GitHub Release and put sharecodex
on your PATH, for example in ~/.local/bin. SSH sessions usually have no keyring, so the device
token is kept in ~/.config/ShareCodex with owner-only permissions. autostart on copies your
current PATH into the service so it finds claude and codex; run it again if they move.
To update, run brew update && brew upgrade sharecodex-cli (or replace the binary), then
sharecodex autostart on to restart the service.
- Claude Code —
~/.claude/projects/**/*.jsonltranscripts. Each response is counted once by message ID and request ID, keeping the largest output count (earlier lines carry partial counts while streaming). Resumed sessions that copy earlier requests into a new file are counted once. - Codex —
~/.codex/sessionsandarchived_sessionsrollouts. Per-request records are used when present; older files fall back to the difference between cumulative totals. - Quota — Codex reports its windows in the rollouts and through
codex app-server; Claude's come from the statusLine input, which the app captures through a small shim. - Account — each event is matched to the account the device was signed into at that moment.
Each member's allotment is weight ÷ sum of all members' weights on that account. All weights
default to 1; a weight of 0 removes a member from the allotment but keeps their usage.
Providers report only the percentage used for the whole account. Each person's — and each model's —
part is estimated from their share of API-equivalent cost within the same window, so it is always
labelled as an estimate. The prices in internal/attribution/pricing.json set only the relative
weight between models; they are not a bill.
Requires Go 1.27, Node 24, pnpm, and the Wails CLI
(go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.25).
go test ./... # server integration tests also need TEST_DATABASE_URL
wails3 task dev # run the desktop app in development mode
wails3 task package VERSION=0.1.0 # package the app (bin/ShareCodex.app on macOS)
go run . scan # print local daily token totals without writing to the databaseSet SHARECODEX_HOME to use another data directory, for example to simulate several devices on one
computer. To build the server from a checkout, run
docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build in deploy/.
Dependencies point inward only:
domain ← provider adapters ← client / server ← Wails / HTTP / SQL / OS
internal/account, identity, usage, quota and attribution must not depend on storage,
networking, the desktop framework or provider code; internal/architecture_test.go enforces this.
Design notes and verification records are in docs/plan.md and
docs/spikes.md (Traditional Chinese).
Pushing a v* tag runs .github/workflows/release.yml. It builds a universal macOS .app,
Windows .exe files for x64 and ARM64, the Linux CLI and server binaries and the Docker Compose bundle, pushes the server image to
ghcr.io/koukeneko/sharecodex-server, and creates a GitHub Release with SHA256SUMS. It then runs
.github/workflows/packages.yml, which updates the cask and the Linux formula (sharecodex-cli) in
KoukeNeko/homebrew-tap and the manifest in
KoukeNeko/scoop-bucket; run it by hand to backfill a
release.
Code signing runs only when its repository secrets are set. Without them, the macOS app is only ad-hoc signed and users must allow it the first time in System Settings › Privacy & Security.
| Secret | Purpose |
|---|---|
MACOS_CERTIFICATE_P12_BASE64 (base64 of a .p12 containing a Developer ID Application certificate and its key), MACOS_CERT_PASSWORD |
Developer ID signing |
ASC_KEY_P8_BASE64 (base64 App Store Connect API key .p8), APPLE_API_KEY_ID, APPLE_API_ISSUER_ID |
Notarization |
WINDOWS_CERT_PFX (base64), WINDOWS_CERT_PASSWORD |
Windows code signing |
HOMEBREW_TAP_TOKEN, SCOOP_BUCKET_TOKEN (fine-grained tokens with Contents read/write on the tap and the bucket) |
Publishing packages; required |
If ShareCodex is useful to you, you can support development:



