Skip to content

Commit 8a1da2b

Browse files
committed
Add commands
1 parent 6319c1d commit 8a1da2b

2 files changed

Lines changed: 219 additions & 0 deletions

File tree

‎assets/commands/index.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3791,6 +3791,7 @@ java.md
37913791
javac.md
37923792
javadoc.md
37933793
javap.md
3794+
jaynshare.md
37943795
jbang.md
37953796
jc.json.md
37963797
jc.md

‎assets/commands/jaynshare.md‎

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
# TAGLINE
2+
3+
Self-hosted pooled proxy for Claude Code
4+
5+
# TLDR
6+
7+
**Install the Linux server** as a systemd service
8+
9+
```curl -fsSL https://github.com/jaynlabs/jaynshare/releases/latest/download/install.sh | sudo sh```
10+
11+
**Invite a client** (prints a one-time `jaynshare join jsi1_…` token)
12+
13+
```jaynshare client invite [bob]```
14+
15+
**Join a pool** with that invite
16+
17+
```jaynshare join [jsi1_…]```
18+
19+
**Launch Claude Code** through the pool (picker when the pool cannot choose)
20+
21+
```jaynshare claude```
22+
23+
**Pin a session** to one pooled account
24+
25+
```jaynshare claude --account [name]```
26+
27+
**Let the pool pick**, then pass arguments to Claude Code
28+
29+
```jaynshare claude --auto -- -p "[prompt]"```
30+
31+
**Bypass the pool** and run Claude Code under the local login
32+
33+
```jaynshare claude --direct```
34+
35+
**Print a shell alias** so `claude` itself goes through the pool
36+
37+
```jaynshare alias```
38+
39+
**Show the pool table** with utilisation bars
40+
41+
```jaynshare status```
42+
43+
**Add a Claude account** (OAuth) as an enrolled client
44+
45+
```jaynshare account login --name [name]```
46+
47+
**Help for one verb**
48+
49+
```jaynshare help [claude]```
50+
51+
# SYNOPSIS
52+
53+
**jaynshare** [_global-options_] _verb_ [_options_] [_arguments_] [**--** _passthrough_]
54+
55+
# DESCRIPTION
56+
57+
**jaynshare** is a self-hosted proxy that pools Anthropic Claude subscriptions and API keys for **claude** (Claude Code). One Rust binary covers the Linux server, the operator CLI, and the enrolled client. After a server is installed, accounts are added, and a client joins with a single-use invite, engineers run **jaynshare claude** instead of **claude** and draw from an account that still has quota.
58+
59+
The server listens on a private-network address (Tailscale, or the host's only private address). TLS is pinned to the server's own identity. Clients present a per-machine secret. The pool routes each request by model glob, account eligibility, priority (lower wins), and optional per-route preference. On launch, **claude** can open a keyboard or numbered picker, take **--account**, take **--auto**, or skip the pool with **--direct**. Arguments after **--**, and remaining words after the launcher's own options, go to Claude Code unchanged.
60+
61+
The same executable is used as a remote operator with **--server** and **--operator-secret-file**. **--json** prints one JSON document on standard output for verbs that accept it; **jaynshare schema** prints the matching JSON Schema. **jaynshare help** and **jaynshare help** _verb_ never contact a server.
62+
63+
The project is MIT-licensed, written by Jayn Labs, and is not made by, endorsed by, or affiliated with Anthropic.
64+
65+
# PARAMETERS
66+
67+
**--json**
68+
> One JSON document on standard output (global).
69+
70+
**-q**, **--quiet**
71+
> Suppress progress and hints on standard error; errors still print.
72+
73+
**--no-color**
74+
> Never emit colour. **NO_COLOR** in the environment has the same effect.
75+
76+
**--config** _path_
77+
> Configuration file. Same meaning as **JAYNSHARE_CONFIG**, and wins over it.
78+
79+
**--server** _origin_
80+
> Address a running instance by its base-URL origin as a remote operator.
81+
82+
**--operator-secret-file** _path_
83+
> Protected file holding the remote-operator secret for **--server**.
84+
85+
**--tls-ca** _path_
86+
> Extra trust anchor (PEM) for an https **--server** origin.
87+
88+
**--timeout** _seconds_
89+
> Deadline for one control request (default 10).
90+
91+
**--yes**
92+
> Answer every skippable confirmation.
93+
94+
**-V**, **--version**
95+
> Version and build identity.
96+
97+
**help** [_verb_…]
98+
> Help for the executable or one verb (one or two words, e.g. **account add**).
99+
100+
**version**
101+
> Version and build identity.
102+
103+
**schema** [_verb_…]
104+
> JSON Schema of a verb's **--json** document, or of every verb.
105+
106+
**claude** [**--account** _reference_ | **--auto** | **--direct**] [**--picker** keyboard|numbered] [_claude-arguments_…]
107+
> Launch Claude Code through the pool. After a successful launch the exit code is Claude Code's. **--picker** wins over **JAYNSHARE_PICKER**.
108+
109+
**env** [**--account** _reference_ | **--auto** | **--direct**] [**--shell** sh|fish|powershell|cmd] [**--show**]
110+
> Print the launch environment, quoted for the shell to evaluate (**eval "$(jaynshare env)"**).
111+
112+
**alias** [**--shell** sh|fish|powershell|cmd]
113+
> Print the one shell line that makes **claude** run **jaynshare claude**.
114+
115+
**join** _invite_
116+
> Join a pool with the operator's invite (`jsi1_…`), install that server's client, and optionally add a Claude account.
117+
118+
**update** [**--from** _zip_] [**--version** _semver_] [**--release-origin** _https-origin_]
119+
> Apply a client kit to this installation.
120+
121+
**uninstall**
122+
> Remove this client installation.
123+
124+
**trust-ca add** | **trust-ca remove**
125+
> Add or remove the pool's MITM CA from the OS trust store (always confirmed).
126+
127+
**secret set** [**--stdin** | **--file** _path_]
128+
> Install a rotated client secret.
129+
130+
**status** [**--verbose**] [**--check**] [**--operator** | **--client**] [**--accounts**] [**--routes**] [**--clients**] [**--config-section**] [**--line**] [**--session** _id_]
131+
> Operator: the pool table with utilisation bars. Engineer: this client's view of the pool. **--check** prints nothing and answers with the exit code.
132+
133+
**account list** | **show** | **add** | **login** | **replace** | **remove** | **rename** | **enable** | **disable** | **operation** …
134+
> Pool accounts (operator) or the accounts this client added (engineer **list** / **login**). **add** takes **--api-key**, **--portable**, **--server-file**, or **--claude-managed**.
135+
136+
**switch** [_reference_] [**--route** _name_] [**--clear**]
137+
> Move the default account, steer one route, or list accounts with the default marked.
138+
139+
**route list** | **add** | **rm**
140+
> Model-glob routes. **add** requires **--pattern** _glob_ (repeatable) and optional **--account**, **--bucket**, **--before**, **--after**.
141+
142+
**priority list** | **set** | **clear**
143+
> Per-account priority; lower wins. Negative values are allowed.
144+
145+
**block list** | **add** | **rm**
146+
> Blocked model patterns.
147+
148+
**probe** [**--wait**]
149+
> Start a usage probe sweep.
150+
151+
**client list** | **show** | **invite** | **reissue** | **rotate** | **revoke** | **rename**
152+
> Client registry. **invite** prints a single-use token that expires after a day by default (**--expires** accepts seconds, or a number with **s**, **m**, **h**, or **d**).
153+
154+
**operator secret set** | **remove**
155+
> Create or delete the remote-operator secret (the pool's master key; disclosed once, never stored by the CLI).
156+
157+
**ca show** | **export** | **rotate**
158+
> MITM CA fingerprint, PEM export, and rotation (**--now** replaces at once).
159+
160+
**config paths** | **new** | **show** | **validate** | **reload** | **set** | **unset** | **edit**
161+
> Configuration file. **new --out** writes a scaffold and never overwrites. **edit** uses **$VISUAL** or **$EDITOR**. **SIGHUP** on **serve** also reloads.
162+
163+
**log tail** | **audit tail**
164+
> Operational NDJSON log, or the audit log (never a body or a credential). **-n** / **--lines**, **--follow**, **--since**.
165+
166+
**api** _METHOD_ _/path_ [**--body-file** _path_ | **--body-stdin**] [**--header** _name:value_] [**--account** _reference_ | **--prefer** _reference_] [**--client** | **--operator**]
167+
> Send one request through the proxy. Status and headers on standard error, body on standard output.
168+
169+
**release latest** | **verify** | **fetch**
170+
> Discover, verify, or download a signed release from the release host.
171+
172+
**server preflight** | **install** | **update** | **uninstall** | **prune** | **auto-update**
173+
> Native systemd install. **install** writes a configuration when none exists and ends with an invite. **auto-update** **on**|**off** updates every night; clients follow on their next launch.
174+
175+
**service install** | **remove** | **start** | **stop** | **restart** | **status**
176+
> Register or control the platform service.
177+
178+
**serve**
179+
> Run the server in the foreground until stopped; **SIGHUP** reloads.
180+
181+
**statusline** | **title-hook**
182+
> Hooks Claude Code runs, not meant to be invoked by hand.
183+
184+
# CAVEATS
185+
186+
Pooling Claude subscriptions conflicts with Anthropic's published terms and can lead to suspension or termination of every account involved, without a refund. The project does not claim that a deployment is legal or authorized.
187+
188+
The server is a trusted intermediary, not an end-to-end encrypted relay. It receives request and response bodies in plaintext so it can route and retry them. Anyone who operates or compromises the server can read or alter that traffic.
189+
190+
Self-hosting expects a Linux host with systemd and a private network between engineers and the server. The published one-line join installer targets macOS and Windows; a Linux client installer is listed as future work. The same binary still builds with **cargo build --release**.
191+
192+
Invites work once and expire (default one day). Send them through a private channel. The audit log never stores a body or a credential.
193+
194+
Exit **0** is success, **1** unexpected failure, **2** usage error. **jaynshare help** _verb_ lists that verb's other rows (for example **claude** can exit 4, 6, 7, 11, 13, 14, 15, or 16 before it replaces itself).
195+
196+
# CONFIGURATION
197+
198+
The server configuration is a TOML file selected by **--config** or **JAYNSHARE_CONFIG**. **jaynshare config paths** prints every owned path in force, how it was selected, whether it exists, and its mode. **jaynshare config new --out** _path_ writes a minimal valid scaffold.
199+
200+
An enrolled client stores **client.toml** under the platform client directory. Without that file, engineer verbs exit **11** (`cli_not_enrolled`) and name the missing file.
201+
202+
**JAYNSHARE_PICKER** selects the account picker (`keyboard` or `numbered`) unless **claude --picker** is set. **NO_COLOR** disables colour.
203+
204+
# HISTORY
205+
206+
Jayn Labs started jaynshare so a small group could share leftover Claude Code quota. Version 1 drew on Team Claude's approach. Version 2 is a from-scratch Rust rewrite (crate **2.1.0**, rustc **1.95**) with a less invasive Claude Code config change. MIT license.
207+
208+
# SEE ALSO
209+
210+
[claude](/man/claude)(1), [codex](/man/codex)(1), [systemctl](/man/systemctl)(1), [cargo](/man/cargo)(1)
211+
212+
# RESOURCES
213+
214+
```[Source code](https://github.com/jaynlabs/jaynshare)```
215+
216+
```[Homepage](https://jayn.app/jaynshare)```
217+
218+
<!-- verified: 2026-10-05 -->

0 commit comments

Comments
 (0)