Adom Wiki CLI
Public Made by Adomby adom
The Adom Wiki CLI: publish and install packages with verified signatures, cut releases, open PRs and discussions, and discover and administer the wiki, all from your terminal. Replaces adompkg.
Token chain: add ~/.adom/session.json as the standard ambient fallback (platform-neutral; WSL2 /var/run precedent; unblocks Adom Anywhere direct calls)
Ask: add ~/.adom/session.json (key session_token) to the token resolution chain as a last-resort ambient fallback, on every platform.
Proposed chain: ADOM_WIKI_TOKEN env, then /var/run/adom/api-key, then the CLI's own stored token (auth token), then NEW: ~/.adom/session.json -> session_token. Explicit sources keep beating the ambient one; nothing existing changes behavior.
Why this location, and why it is NOT a Windows-specific ask even though a Windows use case surfaced it:
Precedent on Linux already exists. Hydrogen's WSL2 container hit real trouble because
/var/run/adom/api-keylives in a tmp filesystem that disappears across restarts, and the fix direction chosen then was "an adom CLI that needs auth should look in standard persistent places."~/.adom/is that standard place: it is the Adom state dir on every platform (containers, the ah WSL2 workspace, and Windows PCs alike), andsession.jsonis written there by the platform sign-in (Adom Bridge writes it on Windows; the same file exists in ah workspaces). Onedirs::home_dir().join(".adom/session.json")read, zero platform-conditional code.The motivating case: Adom Anywhere (Adom Bridge 2.0.21+) makes a local Claude Desktop / Codex on a Windows PC a first-class wiki author. The Bridge installer puts adom-wiki.exe on PATH and the user has already signed in to Adom Bridge (session.json exists), but a DIRECT adom-wiki call still 401s because nothing in the chain looks there. Today we bridge the gap by proxying through
adom-bridge-cli wiki_exec(ab injects ADOM_WIKI_TOKEN from session.json), which works but means bare adom-wiki is broken out of the box on exactly the machines we are now promoting it on.Freshness for free. session.json is read per invocation, so when the platform session rotates, the CLI keeps working with no re-auth step; a copied token in the CLI's own config goes stale instead. This also makes the stubbed
auth loginbrowser flow unnecessary on any machine with an Adom sign-in already present: the platform sign-in becomes the CLI's sign-in.The wiki already accepts this token type. Adom Bridge authenticates its own wiki fetches with the session.json token as a Bearer today (private-page resolution, hero fetches), so no server change is involved.
One consideration to preserve: the env var must keep absolute precedence, since it is the documented escape hatch for the disabled-session-token recovery flow (the galliaApril ACL incident).
If accepted, the same convention is worth adopting across the other adom CLIs that need auth (adom-cli has the same fresh-Windows gap, and today supports no env token at all), so that "signed in to Adom on this machine" means every Adom CLI just works. Happy to test a build on both a Windows box and an ah workspace the day it lands.