npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ai-ecoverse/slicc-jerk

v1.11.0

Published

Get, list, create and drop OAuth tokens across operating systems and inside SLICC, by dispatching to each provider's own CLI

Readme

slicc-jerk

jerk gets, lists, creates and drops OAuth tokens on macOS, Linux and Windows, and inside SLICC. It asks each provider's own CLI (gh, npm, wrangler, aio, …) for its token, or runs the OAuth flow itself when there is no CLI. Adding a provider is configuration, not code.

The name is the ice-cream kind: a soda jerk serves you what you asked for.

Install

curl -fsSL https://get.sliccy.ai/jerk | sh

The installer puts jerk in ~/.local/bin (INSTALL_DIR or --dir to change it, VERSION or --version to pin one), checks it against the release's SHA256SUMS, and never uses sudo. Pass options with sh -s -- --help. The same script is a release asset if get.sliccy.ai is unreachable.

  • npm: npm install -g @ai-ecoverse/slicc-jerk. A small Node launcher picks the platform package @ai-ecoverse/slicc-jerk-<os>-<arch>.
  • slicc: the slicc CLI installs jerk with it, or with slicc install jerk.
  • Binaries: GitHub releases carry jerk-<os>-<arch> with SHA256SUMS and build provenance. Linux builds are static (musl). macOS builds are signed with a Developer ID (ai.sliccy.jerk) and notarized. Windows builds are unsigned, so SmartScreen may warn on first run.

Quick start

jerk list                       # every provider, and whether its CLI is installed
jerk github create              # sign in through gh
jerk github get                 # the token on a terminal, masked in a pipe
curl -H "Authorization: Bearer $(jerk github get --reveal)" https://api.github.com/user
jerk github get --scope repo    # exit 3 unless the token covers repo
jerk github drop                # sign gh out (asks first)

Commands

jerk list [--json]
jerk <provider> get    [--scope S] [--reveal] [--refresh] [--login] [--json] [-p k=v]
jerk <provider> list   [--json]
jerk <provider> create [--scope S] [--force] [--name N] [--expires D] [--cdp URL] [-p k=v]
jerk <provider> drop   [<id>] [--scope S] [--yes]
jerk <provider> lease
jerk <provider> drop --lease
jerk <provider> sync --fnox <SECRET> --provider <fnox provider> [--global]
jerk mcp:<server> create [--scope S] [--no-browser] | get | drop | import-pi
jerk mcp:url:<url> create [--scope S] [--no-browser] | get | drop | import-pi
jerk config path [--json] | check | show <provider> | fnox [--proxy] [<provider>...]
jerk intercept --authorize-url U --redirect R [--rewrite m=k=v]... [--pkce] [--exchange --token-url T --client-id C] [--cdp URL]
jerk intercept --from-file F.toml
jerk tab list [--cdp P] [--json]
jerk tab export (--tab ID | --url PATTERN) [--cdp P] > bundle
jerk tab import [--tab ID | --url PATTERN] [--cdp P] < bundle
jerk upgrade [--check] [--force]

--config <file> (or SLICC_JERK_CONFIG) adds a providers file on top of the others. -p k=v sets a provider parameter, for example -p host=github.example.com.

jerk upgrade, or jerk update, replaces a jerk from install.sh or the releases page with the latest release, in place. It fetches over https only, and the download must match the release's SHA256SUMS and answer --version with the release version before it's renamed over the old one. It finds the latest release without the GitHub API, whose 60 requests an hour per IP address without a token a shared network or CI runner uses up: it reads the tag from the redirect of https://github.com/ai-ecoverse/slicc-jerk/releases/latest (only the tag; the download URLs are built from it) and downloads SHA256SUMS and the binary from releases/download/<tag>/. When github.com names no release, it asks GET /repos/ai-ecoverse/slicc-jerk/releases/latest on the API, with GH_TOKEN (or else GITHUB_TOKEN) as a bearer token when set; the token goes to the API only, and a used-up rate limit is named in the error. SLICC_UPDATE_WEB_BASE and SLICC_UPDATE_API_BASE replace https://github.com and https://api.github.com, for mirrors and tests; jerk shows them, and where a redirect led, only as an origin (scheme, host and port). With only SLICC_UPDATE_API_BASE set, jerk asks that API only. --check only reports whether a newer release exists. A binary or directory jerk can't write is left alone, a development build needs --force, and a copy installed with npm, cargo or slicc install jerk is left to that tool, with the command to run. The kernel build can't replace itself, so jerk upgrade there exits 5 with how to update it, worked out from where /proc/self/exe says it runs: sudo env PATH=/usr/local/share/pnpm/bin:/usr/local/bin:/usr/bin:/bin pnpm add -g @ai-ecoverse/slicc-jerk@latest only for /usr/local/share/pnpm/global/v<n>/<group>/node_modules/@ai-ecoverse/slicc-jerk/bin/jerk.wasm, where <group> is a name pnpm creates (a 64-digit hex hash, or hex parts joined by -), pnpm add -g @ai-ecoverse/slicc-jerk@latest for the same layout under ~/.local/share/pnpm/global/, and otherwise only to update @ai-ecoverse/slicc-jerk the way it was installed. There --check makes one request, without a token, to GET /repos/ai-ecoverse/slicc-jerk/releases/latest on the API (or SLICC_UPDATE_API_BASE) through the kernel's fetch proxy, which must be an IP address. It refuses a redirect it sees; one the proxy follows is invisible, so only the final answer's url is checked, which must be a release of this repository under that API, and adds the update when a newer release exists. Sending the request and reading the answer share a 10-second budget (connecting is bounded only by the kernel's own connect timeout), the response head is capped at 64 KiB and the body at 4 MiB, and its failures are fixed messages. The override is shown only as its origin. An unknown provider's error names the update too, since a newer jerk may have the provider built in.

get prints the token to a terminal, or with --reveal. In a pipe it prints a masked form such as gho_…1234, so it doubles as a status check. --json prints provider, source, masked, expires_at and scopes, plus token only with --reveal; --refresh prints a status line, never the token. For an env token, --scope checks the JWT's scp or scope claim when it has one (the signature isn't verified), otherwise the provider's scopes command.

A token already in one of the provider's env variables (GH_TOKEN, GITHUB_TOKEN, …) wins over the CLI, the way gh itself behaves. jerk never signs in on its own: without a token, get exits 3 and names the create to run, and get --login on a terminal runs it first.

| exit | meaning | | --- | --- | | 0 | ok | | 1 | error | | 2 | usage, config or policy refusal | | 3 | needs an interactive sign-in, or the token doesn't cover --scope | | 4 | not available here: the CLI is missing or too old, no browser, no linked slicc CLI | | 5 | unsupported for this provider or runtime |

Finding a browser

jerk tab, jerk intercept and jerk <provider> create find a CDP browser the way playwright-cli and curlwright from slicc-cdp do, in the same order and with the same messages. The first step that yields an endpoint wins:

  1. --cdp <value>.
  2. SLICC_CDP_URL.
  3. slicc browsers --json, when slicc is on PATH: a browser with a seven tab on --seven-origin (create only), then sevenOpen, then a slicc profile, then the best tier; loopback ws:// only.
  4. A live DevToolsActivePort under slicc seven-profiles, legacy profiles, and SLICC six profile dirs: loopback /json/version check, the live websocket pathname must match the file, the newest live file wins.
  5. The loopback endpoint playwright-cli saved for the working directory under the user config dir (slicc/playwright-cli/sessions/). One that came from the port probe is reused only while it answers, and a non-loopback one is never dialled. jerk only reads this file.
  6. The first of 127.0.0.1:9222-9229 whose /json/version answers (SLICC_CDP_PORTS replaces the range in tests, which never dial 9222-9229).

The kernel build stops after step 2 and uses 127.0.0.1:9222, as the slicc-cdp wasm builds do; jerk tab there needs SLICC_CDP_URL. The order and the reply checks come from cdp_client::resolve in slicc-cdp-client.

--cdp and SLICC_CDP_URL take:

| Form | Example | Means | | --- | --- | --- | | port | 9333 | http://localhost:9333/json/version | | host, host:port | localhost, 127.0.0.1:9333, [::1]:9333 | that host's /json/version, port 9222 when left out | | http://, https:// | http://127.0.0.1:9333 | /json/version discovery | | path-less ws://, wss:// | ws://127.0.0.1:9333 | /json/version discovery | | ws://, wss:// with a path | ws://127.0.0.1:9333/devtools/browser/<id> | dialled as it is | | auto | --cdp auto | skip this step and SLICC_CDP_URL |

Anything else, 0 included, exits 2 with unsupported CDP URL "<value>" (expected a port, host:port, ws://, wss://, http://, or https://; use --cdp auto to search for a running browser). A misspelt option gets a hint, such as Did you mean --cdp?.

A webSocketDebuggerUrl that /json/version reports is dialled only when it is ws:// or wss:// on this machine (when jerk asked on this machine) or on the host jerk asked; anything else is refused before dialling with CDP discovery at <url> returned <socket>, a host other than this machine; refusing to dial it, and the port probe skips such a port. This machine means the literal name localhost, 127.x.x.x, ::1, 0.0.0.0 and ::, nothing that only looks like them (evil.localhost, 127.0.0.1., 0x7f.0.0.1, [email protected]). A saved endpoint that does not answer is named in the error instead of falling through to the port probe.

Before it connects, jerk prints the endpoint and the step that picked it on stderr, never on stdout, where a token may go:

* CDP http://127.0.0.1:9222/json/version (via slicc browsers)

When nothing is found, it exits 4 and lists every step and why it was passed over:

jerk tab: no CDP browser found. Tried, in order:
  --cdp               not given
  SLICC_CDP_URL       not set
  slicc browsers      slicc not on PATH, or it failed
  DevToolsActivePort  no live file under slicc seven-profiles, profiles, or six profiles
  saved endpoint      none for this directory
  port probe          nothing answered on 127.0.0.1:9222-9229
Pass --cdp <port|host:port|ws://...|http://...>, set SLICC_CDP_URL, or start a browser with --remote-debugging-port.

A loopback or auto sign-in opens its page in the CDP browser when --cdp or SLICC_CDP_URL is given, or when stdin is not a terminal and a browser is found; on a terminal without either, it uses the system browser. With a local browser, jerk says where it opened the page and how long it waits for the redirect; if the page can't be opened it prints the URL to open by hand. If the selected CDP endpoint is remote, or its local port belongs to a connected slicc … cdp relay in slicc tray --json, jerk captures the callback over CDP in that browser instead. This doesn't require a free callback port. A different tunnel that looks like a local browser isn't detectable this way; configure mode = "intercept" for that case. For a device, client-credentials or CLI provider, jerk says that --cdp is ignored, except for Fastly SSO in seven.

Providers

Built in: github, npm, claude, openai, huggingface, cloudflare, aws, gcloud, microsoft-graph, adobe-aio, firefly, aem, fastly, xai, linkedin, printful, gmail, google, garmin, rescuetime, slack, kagi, elevenlabs and openrouter. Every MCP server is one too. jerk config show <provider> prints the definition in effect.

| id | backed by | get | notes | | --- | --- | --- | --- | | github | gh | gh auth token | --scope understands GitHub's implied scopes (repo covers public_repo). Sign-out is gh auth logout. | | npm | npm | //registry.npmjs.org/:_authToken from $NPM_CONFIG_USERCONFIG or ~/.npmrc | npm config get won't print auth keys, so jerk reads the file. create mints a granular token (npm 11.6.3 or newer) and records only its id, so drop <id> can revoke it. | | claude | claude (Claude Code) | env ANTHROPIC_API_KEY, else the token jerk kept from create | create runs claude setup-token, which signs in through the browser and prints a one-year subscription token once; jerk picks it out of the screen output and keeps it. --force gets a new one. list is claude auth status --json (Claude Code 2.1.41 or newer). drop forgets the kept token and leaves the Claude Code sign-in alone; claude auth logout doesn't revoke a setup-token token. | | openai | codex (Codex CLI) | OPENAI_API_KEY from ${CODEX_HOME:-~/.codex}/auth.json | Env OPENAI_API_KEY wins, and get needs no codex to read the file. A ChatGPT sign-in's tokens.access_token is left out: it's for chatgpt.com's Codex backend, not api.openai.com, so a ChatGPT-only sign-in with no API key exits 3. create is codex login, whose ChatGPT sign-in stores an API key only when OpenAI's token exchange issues one, so if get still exits 3, run codex login --with-api-key yourself. drop is codex logout. There's no list, because codex login status writes only to stderr. Credentials Codex keeps in the OS keyring (cli_auth_credentials_store) aren't read. | | huggingface | hf | the token file at $HF_TOKEN_PATH, else $HF_HOME/token, else ${XDG_CACHE_HOME:-~/.cache}/huggingface/token | The same order as huggingface_hub. Env HF_TOKEN, then HUGGING_FACE_HUB_TOKEN, wins. create is hf auth login, drop [<name>] is hf auth logout [--token-name <name>], and user is user (or name, before huggingface_hub's CLI rewrite) from hf auth whoami --format json. | | cloudflare | cf, then wrangler, then browser OAuth | cf accounts tokens create (when -p policies=…), else wrangler auth token --json, else the stored OAuth grant | create / drop / list prefer cf (auth login / logout / whoami), then wrangler. get via cf mints an account-owned API token and needs CLOUDFLARE_ACCOUNT_ID plus -p policies=…, which jerk hands to cf in a private file unless the value is already @<path>. Wrangler needs 4.57.0+ for create/get and 4.65.0 for list. The browser fallback uses Cloudflare's cf OAuth app on localhost:8877. Session tokens are treated as expiring after 50 minutes. | | aws | aws (CLI v2) | aws configure export-credentials | Prints AccessKeyId; lease maps AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN (the last only when present). Env AWS_* wins when AWS_ACCESS_KEY_ID is set, even with no binary. -p profile= / -p region= are optional. create / drop are aws sso login / logout; list / user use sts get-caller-identity. | | gcloud | gcloud, then browser OAuth | gcloud auth print-access-token, else the stored OAuth grant | create is gcloud auth login, drop is gcloud auth revoke, list / user are gcloud auth list and gcloud config get-value account. Without the CLI, jerk uses the Cloud SDK public desktop client on loopback :8085 (cloud-platform scope). Access tokens are treated as expiring after 55 minutes. | | microsoft-graph | az, then Entra OAuth | az account get-access-token --resource-type ms-graph, else the stored OAuth grant | Without az, jerk uses Microsoft identity PKCE (Microsoft Graph Command Line Tools, 14d82eec-204b-4c2f-b7e8-296a70dab67e), so Outlook, SharePoint, Excel and Teams skills share one delegated grant. The default scope is offline_access openid profile User.Read Mail.ReadWrite Mail.Send Calendars.ReadWrite Files.ReadWrite.All Sites.ReadWrite.All. The Azure CLI's app only gets a fixed set of Graph scopes, so --scope (or -p scope=…) skips az on get, create and drop and uses the Entra grant instead. For Teams: jerk microsoft-graph create --scope "offline_access Chat.ReadWrite ChannelMessage.Read.All Team.ReadBasic.All Channel.ReadBasic.All", then jerk microsoft-graph get --scope Chat.ReadWrite, which exits 3 when the grant doesn't cover it; drop --scope Chat.ReadWrite forgets that grant. Env MICROSOFT_GRAPH_TOKEN, EXCEL_GRAPH_TOKEN or TEAMS_GRAPH_TOKEN wins. create / drop are az login / logout (or the OAuth grant). Expiry from the JWT. | | adobe-aio | aio, then IMS client_credentials | aio login --bare --no-open, else a stored or minted S2S grant | Interactive IMS via aio (default -p ctx=cli). For Adobe Developer Console OAuth Server-to-Server (e.g. aem.cdn / edge functions), pass -p client_id=… -p client_secret=… (optional -p scope=…; the default includes aem.cdn), which skips aio and POSTs to IMS token/v3. Env ADOBE_IMS_TOKEN, then AEM_EDGE_FUNCTIONS_TOKEN. | | firefly | jerk's own OAuth | IMS client_credentials | Server-to-server Firefly Services token. Needs -p client_id=… -p client_secret=… (optional -p org_id=… -p scope=…). | | aem | aem-ext, then browser OAuth | env AEM_TOKEN / AEM_API_KEY, else the stored OAuth grant | Needs -p org=… -p site=…. With aem-ext on PATH, create / list / drop wrap aem-ext auth key (create --register --json, list, delete): 365-day admin API keys sent as X-Auth-Token, printed once, with the jti recorded for drop. Without it, jerk uses the aem-cli loopback login (client_id=aem-cli, redirect /.aem/cli/login/ack) and keeps the ~20-minute admin JWT (authToken) for api.aem.live as AEM_TOKEN. The login host defaults to admin.hlx.page; -p login_host=… overrides it. | | fastly | fastly | fastly profile token | Env FASTLY_API_TOKEN wins. Native create runs fastly sso; in seven, use create --name work for browser SSO. list uses profile list --json; native drop <profile> uses profile delete. -p profile=… picks a named profile. | | xai | jerk's own OAuth | PKCE through a loopback redirect | The sign-in opens in your browser. The grant is kept in the OS keyring. | | linkedin | jerk's own OAuth | the stored OAuth grant | Authorization code caught in a browser over CDP. Needs your LinkedIn app's -p client_id=… -p client_secret=…. | | printful | printful (skill CLI) | printful auth token | Store-level private tokens for api.printful.com. PRINTFUL_API_TOKEN wins. create is printful auth login: -p token=… stores a Developer Portal token, otherwise it mints one through a signed-in www.printful.com dashboard tab. list / drop are auth status --json / auth logout. | | gmail | jerk's own OAuth | refresh of a Google grant (or $GWS_REFRESH_TOKEN) | Loopback PKCE with access_type=offline. Defaults to Mozilla Thunderbird's public Google client; override with GWS_CLIENT_ID / GWS_CLIENT_SECRET. drop revokes at Google, then clears the grant. | | google | jerk's own OAuth | refresh of one Google grant | One grant for Calendar, Drive, Sheets, Docs and other Google APIs, picked with --scope or -p scope=…: https://www.googleapis.com/auth/calendar, …/auth/drive, …/auth/spreadsheets, …/auth/documents. A bare create asks only for openid and the email scope. On an existing grant, create --scope asks Google for the old scopes plus the new ones (include_granted_scopes=true), so the grant keeps covering both; --force asks for only what you name. The token is GOOGLE_ACCESS_TOKEN; gmail keeps its own grant. Loopback PKCE with access_type=offline and the same default client as gmail (Mozilla Thunderbird's), which Google may refuse for Drive, Sheets and Docs: set GWS_CLIENT_ID / GWS_CLIENT_SECRET to your own desktop client then. drop revokes at Google, then clears the grant. | | garmin | jerk's own browser capture | the stored OAuth grant | Opens Garmin SSO over CDP, catches ticket from the connect.garmin.com/modern redirect and exchanges it at diauth.garmin.com (…/oauth/grant/service_ticket). The token is GARMIN_TOKEN for connectapi.garmin.com. | | rescuetime | jerk's own browser capture | the stored API key | create opens RescueTime's API key page over CDP; create a key there and jerk keeps it from the form post once RescueTime accepts it. Env RESCUETIME_API_KEY wins. Send it as Authorization: Bearer … to /anapi/*. drop forgets the key; delete it on the key page to revoke it. | | openrouter | jerk's own OAuth | the stored API key | Loopback PKCE (S256) through openrouter.ai/auth with a callback_url on localhost:56124; jerk posts the code as JSON to /api/v1/auth/keys and keeps the returned key as OPENROUTER_API_KEY for openrouter.ai. No app registration: client_id = "slicc-jerk" is only the prefilled key label. The key has no expiry and no refresh. Env OPENROUTER_API_KEY wins. drop forgets the key; revoke it on openrouter.ai's keys page. | | slack | jerk's own browser capture | SLACK_TOKEN and SLACK_D_COOKIE | create -p workspace=<T… or E… id> opens https://app.slack.com/client/<id> in a new tab of a browser that's already signed in, and keeps the session xoxc token plus the paired d cookie. There's no expiry and no refresh: the pair stops working when that browser session ends. drop forgets the local copy. Sign-ins that need a Slack app or admin approval are out of scope. For Slack's MCP server, use jerk mcp:url:https://mcp.slack.com/mcp. | | kagi | a pasted key | env KAGI_API_KEY, else the key jerk kept from create | create prints and opens https://kagi.com/api/keys, then reads the key you paste without echoing it, or from stdin when that isn't a terminal (printf %s "$KEY" \| jerk kagi create). --force replaces it. drop forgets the key; revoke it on the key page. | | elevenlabs | a pasted key | env ELEVENLABS_API_KEY, then XI_API_KEY, else the key jerk kept from create | create prints and opens https://elevenlabs.io/app/settings/api-keys and keeps the key you paste or pipe in, like kagi. Send it as xi-api-key: … to api.elevenlabs.io. drop forgets the key; revoke it on the API keys page. |

Configuring providers

Providers are TOML tables in layers, from lowest to highest priority. A provider in a later layer replaces the earlier one as a whole, except a system provider with locked = true. jerk config check validates every layer, and jerk config path shows where each one lives.

| layer | macOS | Linux | Windows | | --- | --- | --- | --- | | built-in | providers.toml, compiled into jerk | same | same | | system | /Library/Application Support/slicc-jerk/providers.d/*.toml | /etc/slicc-jerk/providers.d/*.toml | %ProgramData%\slicc-jerk\providers.d\*.toml | | user | $XDG_CONFIG_HOME/slicc-jerk/providers.toml, default ~/.config/slicc-jerk/providers.toml | same | %APPDATA%\slicc-jerk\providers.toml | | explicit | --config <file> or SLICC_JERK_CONFIG | same | same |

SLICC_JERK_SYSTEM_DIR overrides the system directory everywhere. jerk keeps its state (leases, minted token ids, file-stored grants) in ~/Library/Application Support/slicc-jerk on macOS, $XDG_STATE_HOME/slicc-jerk (default ~/.local/state/slicc-jerk) on Linux and %LOCALAPPDATA%\slicc-jerk on Windows; SLICC_JERK_STATE_DIR overrides it. On macOS, jerk config check warns while /etc/slicc-jerk/providers.d, the old system directory, still exists.

A CLI provider

[providers.github]
name = "GitHub (gh)"
env = ["GH_TOKEN", "GITHUB_TOKEN"]
domains = ["api.github.com", "github.com"]
requires = "gh"
params = { host = "github.com" }
get = { run = ["gh", "auth", "token", "--hostname", "{host}"], parse = "text" }
scopes = { run = ["gh", "auth", "status", "--hostname", "{host}", "--active", "--json", "hosts"], parse = "json:/hosts/{host}/0/scopes" }
create = { run = ["gh", "auth", "login", "--web", "--hostname", "{host}", "--scopes", "{scope}"], interactive = true }
drop = { run = ["gh", "auth", "logout", "--hostname", "{host}", "--user", "{id}"], interactive = true }

Commands are argument lists, never shell strings, and the CLI runs without the provider's token variables in its environment. {name} placeholders come from params, or from scope, id, name, expires and user. An argument whose placeholder is empty is dropped, together with the flag before it.

| provider field | meaning | | --- | --- | | name | display name | | env | variable names for the token; the first one is checked before the CLI | | domains | the hosts the token is for (used for fnox proxy rules) | | requires | the CLI that must be on PATH | | params | template defaults, overridable with -p | | kernel_login | in seven, run the local CLI and open its sign-in page (see below); native create is unchanged | | max_age | expiry to assume when the CLI doesn't report one, such as 50m | | store | keyring (default) or file, for grants jerk keeps itself; SLICC_JERK_STORE sets the default | | lease_via | get (default) or create, to mint a fresh token per fnox lease | | locked | system files only: later layers can't replace this provider | | get, list, scopes, user, create, drop | a command, or an array of commands tried in order (see Fallback chains) |

| command field | meaning | | --- | --- | | run | the argument list | | read | get only: read the token from a file instead. { ini = path, key = k } takes a key from an ini file, { file = path } the trimmed contents, and { json = path, pointer = "/…" } a string from a JSON file. A missing file, key or value, or an empty or null one, moves the chain on. Paths expand ${NAME:-default}, nested too, and a leading ~ | | parse | text, jwt, json:<pointer>, or scan:<prefix> for the last token starting with <prefix> in screen output, ignoring ANSI codes and joining a token wrapped over lines | | fields | get only: map extra env names to json:<pointer> values from the same CLI stdout (for multi-value credentials such as AWS) | | expiry | jwt to read the expiry from the token, or json:<pointer> for an RFC3339 / unix timestamp in the CLI JSON | | timeout | such as 10s | | min_version | the oldest CLI version that supports this command (exit 4 below it) | | interactive | the command keeps the terminal (sign-ins) | | echo | an interactive create with parse: also show the CLI's screen output while jerk reads it, when stdin is a terminal | | ask | a create with keep = true and no other field except needs / unless: the http(s) page where the user makes a key; jerk prints it, opens it when stdin is a terminal, reads the pasted key without echo (or the first line of stdin otherwise, exit 3 when empty) and keeps it | | keep | true on a create with parse keeps the token it prints in jerk's grant store, expiring after max_age; a get or drop step with keep = true and no other field except needs / unless returns or forgets it | | link | a create that may run from seven over the slicc link | | id, lookup | for a create that mints a token: where to find its id for revocation | | requires | this step's CLI, in place of the provider's | | oauth | true for a get, create or drop step that uses the provider's [oauth] block; such a step has no other field except needs / unless | | needs | param names that must be non-empty for this step to be available | | unless | param names that must be empty for this step to be available | | at_file | param names a run step passes as @<path> to a private file holding the value, removed when the step ends; an empty value, or one already starting with @, is passed as it is, except that a @ value is refused over the link. On macOS and Linux the step fails if the state directory is a symlink, isn't yours, or is group- or world-writable, and on Windows if a .cmd or .bat launcher can't take the file's path. jerk says so on stderr when a later step wins |

Let the provider CLI own the browser login in seven

Any CLI provider can define [providers.<id>.kernel_login] in the same TOML file as its get and native create commands. In seven this runs the program named by requires, opens the URL it prints, and returns its exit code. The CLI does the exchange and stores and refreshes its credentials. Use this instead of an [oauth] block, not alongside one.

For a CLI like Fastly that accepts the whole loopback redirect on stdin:

[providers.fastly.kernel_login]
mode = "redirect"
args = ["auth", "login", "--sso", "--token", "{name}"]
authorize_prefix = "https://accounts.fastly.com/"
redirect_uri = "http://localhost:8080/callback"
remove_env = ["FASTLY_DEBUG_MODE"]
requires_cli = "@ai-ecoverse/wasi-fastly 17.2.0-2 or later"

The complete Fastly definition sets params.name = "sso"; --name overrides it. args uses the usual provider placeholders. authorize_prefix must be a literal HTTPS URL with a slash after its host. The CLI must print the matching URL on its own stdout line (indentation is fine). In redirect mode, jerk intercepts a GET to the exact configured loopback scheme, host, port and path in the new tab. Only the CLI’s piped stdin gets the full redirect and newline. No sealing, printing or exchange by jerk.

For a CLI that prints a verification URL and waits for device approval, use mode = "device" and omit redirect_uri. Jerk opens the URL and waits for the CLI, without intercepting a callback or sending any input. In both modes it closes only the tab it created. url_timeout (default 30s) bounds the wait for the URL; timeout (default 2m) bounds each subsequent sign-in phase. Both accept durations from 1ms to 1h.

Only configure trusted CLIs whose login command does not print tokens or echo private stdin: other output is forwarded. remove_env optionally strips additional variables such as debug settings; provider token variables are always removed. requires_cli is an optional install/version hint if the command is missing or never prints the URL. The CLI must support its declared mode; a listener-only CLI cannot receive a redirect through stdin.

An OAuth provider

A provider can have an [oauth] block instead of CLI commands. jerk then runs the flow itself.

[providers.xai]
name = "xAI Grok"
env = ["XAI_API_KEY"]
domains = ["api.x.ai"]
[providers.xai.oauth]
mode = "auto"
flow = "pkce"
authorize_url = "https://auth.x.ai/oauth2/authorize?response_type=code&client_id={client_id}&redirect_uri={redirect_uri}&scope={scope}&code_challenge={code_challenge}&code_challenge_method=S256&state={state}"
token_url = "https://auth.x.ai/oauth2/token"
client_id = "b1a00492-073a-47ea-816f-4c329264a828"
redirect_uri = "http://127.0.0.1:56121/callback"
scope = "openid profile email offline_access grok-cli:access api:access"
capture = { at = "request", from = "query", param = "code" }

create signs in and keeps the grant in the OS keyring (service slicc-jerk), or with store = "file" in a 0600 file. On Linux that's the kernel keyring, which doesn't survive a reboot. get refreshes the token at token_url when it's close to expiring, and drop removes the grant.

| mode | how the sign-in comes back | | --- | --- | | loopback | jerk listens on the redirect_uri port and opens your browser | | device | RFC 8628: jerk prints a URL and a code on stderr and polls token_url | | intercept | jerk drives a browser over CDP and catches the redirect, for clients whose loopback port is taken or that only redirect somewhere jerk can't listen | | auto | loopback when the port is free, otherwise intercept | | client_credentials | machine grant: POST token_url with client_id / client_secret / scope (no browser). get re-mints when the cached access token is near expiry |

| flow | token grant shape | | --- | --- | | pkce | authorization code + PKCE (code_verifier on the token request) | | code | authorization code without PKCE (optional client_secret for public desktop clients) | | implicit | the capture value is the access token (no token endpoint) | | exchange | POST token_url with [oauth.exchange] (grant_type plus a body map) | | client_credentials | same machine grant as mode = "client_credentials" (no browser / capture) |

[oauth.exchange] shapes the token request. With flow = "exchange" it needs grant_type, and jerk sends grant_type and client_id ahead of body. With pkce or code it replaces the standard code exchange: grant_type is optional, and without it jerk sends exactly body. In body, {value} is the captured param, {code_verifier} the PKCE verifier, and {client_id}, {redirect_uri} and {scope} work too. format = "json" posts a JSON object instead of a form (the default, "form"). token_field names the response field that holds the token (default access_token); with it set, token_type may be missing. config check rejects [oauth.exchange] on implicit, client_credentials and mode = "device", which never use it.

Optional fields: client_secret (sent on code exchange and refresh), revoke_url (best-effort revoke on drop), and refresh_env (an env var holding a refresh token that get mints from before it looks at the stored grant). client_id and client_secret may use ${NAME:-default} expansion from the environment.

For intercept, the browser is found as in Finding a browser; with none, jerk exits 4. State is only checked when authorize_url contains {state}. For a state-bearing loopback GET, if Chrome commits an error page before jerk sees the callback pause, jerk can recover the reported unreachableUrl of its own sign-in tab. It requires a matching main-frame document GET, a connection or name-resolution failure, the registered callback and the expected state. POST bodies and browser policy refusals cannot be recovered this way. The registered URI stays unchanged: do not substitute <port>.kernel.localhost.

rescuetime uses capture = { at = "network", from = "body", url = "https://www.rescuetime.com/anapi/setup_submit", param = "candidate" }.

  • With from = "body", jerk waits for the response to a request matching url, and only when the status is below 400 takes param from its form or JSON body as the token. capture.stage = "request" reads that body on the way out instead, before a response exists.
  • capture.fields takes more values from the same paused request: cookie:<name>, header:<name>, body:<name> or query:<name>. A cookie comes from the Cookie header, or from the browser cookie jar when that header is missing. Each field name must be in env, but not first.
  • A provider with capture.fields stays multi-value when a secondary variable is unset, so lease and sync don't copy the token into that name. get --json masks credentials unless --reveal.
  • The provider's cors_origins is the CORS allow-list for a body capture.
  • The stored grant is keyed by user when that is set, otherwise by workspace, otherwise default.
  • {placeholders} in an intercept authorize_url or capture.url, other than the built-in OAuth ones, must be declared in params and come from -p. Built-in names in capture.url, such as {client_id}, get the same values as in the login URL. config check rejects a name that isn't a param, {code_challenge} unless the flow is pkce, and {client_secret} unless client_secret is set.

Fallback chains

Each command can be an array of steps, tried in order. The built-in cloudflare provider prefers cf, then wrangler, then jerk's own OAuth sign-in.

[[providers.flare.get]]
requires = "cf"
run = ["cf", "accounts", "tokens", "create", "--quiet", "--name", "{name}", "--policies", "{policies}"]
parse = "json:/value"
at_file = ["policies"]

[[providers.flare.get]]
requires = "wrangler"
run = ["wrangler", "auth", "token", "--json"]
parse = "json:/token"
min_version = "4.57.0"

[[providers.flare.get]]
oauth = true

jerk config show cloudflare prints the full chain, including create and the [oauth] block.

  • A step is unavailable when its CLI isn't on PATH, or its min_version probe fails or reports an older version. Unavailable steps are always skipped.
  • get, list, scopes and user also move on when a step fails: a non-zero exit, an empty or unparseable token, or a timeout.
  • create and drop run the first available step, and its result is final. jerk never starts a second sign-in.
  • When every get step fails, get exits 3 if some step ran, or 4 if none was available. The message lists each step and why it failed, but never a token or the CLI's output.
  • On Windows, jerk refuses unsafe characters in the path of, or an argument to, a .cmd or .bat launcher: it exits 1 without repeating the value, and no later step runs.
  • A token in any of the provider's env variables still wins over every step. get --login, lease, sync, --via-link and the "already signed in" check in create use the same chains.
  • An [oauth] block that no step names is used by get in place of any CLI steps, and by create and drop only when they have no command. Add { oauth = true } to put it in a chain.
  • jerk's own OAuth grant is separate from the CLIs' sign-ins, so a chain can hold two different accounts. jerk list shows each step's CLI, such as cf (missing), wrangler, oauth.

MCP servers

Every server with a url in pi's ~/.pi/agent/mcp.json (or PI_MCP_CONFIG) is a provider named mcp:<server>, with its token in MCP_<SERVER>_TOKEN. Any other server can be named by its URL, mcp:url:<url>. mcpcat uses these providers whenever jerk is installed.

jerk mcp:linear create            # discovers the authorization server, registers a client, signs in
jerk mcp:linear get --reveal --json
jerk mcp:linear import-pi         # copy an existing sign-in from pi's mcp-auth.json
jerk mcp:url:https://mcp.example.com/mcp create

create follows the MCP authorization spec: it finds the authorization server through RFC 9728 and RFC 8414 metadata, registers through mcpcat's client metadata document or dynamic registration (or uses the clientId from mcp.json), and signs in with PKCE, sending the server as resource (RFC 8707). --no-browser prints the URL and reads the redirected URL from stdin. pi's oauth fields in mcp.json are honoured.

In seven, sign-in happens in Settings › MCP servers instead; see In SLICC.

  • Canonical form. The URL must be https, or http on loopback (localhost, 127.0.0.1, ::1). Userinfo, a query or a fragment exit 2, and the error never repeats the URL. The scheme and host are lower-cased, the default port is dropped and an empty path becomes /; the rest of the path is kept, including a trailing slash. So mcp:url:HTTPS://MCP.Example.com:443/mcp is mcp:url:https://mcp.example.com/mcp.
  • Same URL as an mcp.json entry. mcp:url: is that entry: its oauth fields, its variable and its grant. If several entries share the URL, the first by name wins, and config show lists the others.
  • URL only. There are no oauth fields: the client is mcpcat's metadata document, else dynamic registration, with the default callback. There is no variable, so get never reads the environment and get --json reports "env": []. The grant goes in the OS keyring under slicc-jerk / mcp:url:<canonical url>/url. import-pi looks the URL up in mcp-auth.json and exits 5 when several pi servers use it. jerk list doesn't show URL-only ids.
  • Server names in mcp.json that start with url: are skipped.

Moving a tab's session

jerk tab copies one tab's signed-in state (its cookies, localStorage and sessionStorage) into another tab, in the same browser or a different one. It's like playwright teleport from slicc-cdp, but you pick the tab and the state goes through a file or a pipe. It works with Chromium browsers.

jerk tab list --cdp 9222                                        # tab ids, URLs and titles
jerk tab export --url mail.example.com --cdp 9222 > tab.bundle
jerk tab import --cdp 9333 < tab.bundle                         # a new tab in another browser
jerk tab export --tab 3F2A --cdp 9222 | jerk tab import --tab 9C1B --cdp 9222
  • Picking the tab: --tab takes a target id or a unique prefix of one. --url matches part of the URL, or the whole URL when the pattern contains *. If more than one tab matches, jerk lists them and exits 2.
  • The browser: found as in Finding a browser.
  • export writes one base64 line: the cookies Chrome sends to the page and its frames (HttpOnly included), plus the top frame's storage. Base64 isn't encryption, so treat the bundle like a password. jerk won't print it to a terminal.
  • import opens a new tab, or uses the one --tab or --url picks, sets the cookies (host-only and __Host- cookies stay host-only), opens /robots.txt on the exported origin, so that the app's own scripts can't redirect the tab first, and writes the storage there once it has checked that the page really is on that origin. If /robots.txt doesn't stay on the origin, for example because Chrome shows its error page for an empty 404, jerk tries the origin's root instead. It then opens the exported URL and prints the tab id. jerk registers no script that would stay in the tab. If both redirect to another origin, such as a sign-in page, the storage can't be written there and jerk exits 1; if only the exported URL redirects away, the storage is already written and jerk says where the tab ended up.
  • Not carried: IndexedDB, Cache Storage, service workers, other sites' cookies (an identity provider's, say), and anything tied to the device, such as client certificates or device-bound session credentials. Some sites also tie a session to its IP address or user agent.
  • jerk never opens, exports or reads cookies of a seven tab, and on import it leaves seven's cookies out of a bundle that has any.

fnox

jerk is a command lease backend for fnox. jerk config fnox prints the stanzas for ~/.config/fnox/config.toml, and --proxy adds [[proxy.rules]] for the provider's domains:

[leases.github]
type = "command"
create_command = "jerk github lease"
revoke_command = "jerk github drop --lease"
duration = "1h"
  • lease prints fnox's lease JSON: every env name mapped to the token, an expires_at that is the earlier of the token's own expiry and now + FNOX_LEASE_DURATION, and a lease_id. It refuses a terminal.
  • drop --lease reads FNOX_LEASE_ID and revokes upstream only a token jerk minted for that lease. A token jerk only read is left to expire.
  • sync --fnox <SECRET> --provider <p> pipes the token into fnox set on stdin, which is how jerk tokens reach fnox proxy. It only writes to fnox providers that encrypt or use an OS store (age, keychain, 1password, bitwarden, fido2, yubikey and the cloud KMSes), never plain. Run it again when the token is refreshed.
  • On Windows, fnox runs lease commands with sh -c, so it needs an sh on PATH (Git for Windows, MSYS2 or similar).

In SLICC

The npm package also carries bin/jerk.wasm, a wasm32-wasip1 build that seven runs as a slicc-kernel command (slicc.abi wasi). Tokens live in the vault's sealed store behind /dev/sealed. jerk may briefly hold a CLI or OAuth token to seal it, but never prints it, even with --reveal. Sealing failures fail closed, including EEXIST for a record only root can replace.

  • jerk list ships the native built-in catalog, shows which provider CLIs are on the kernel's PATH, and includes configured OAuth providers. Linked-machine availability is retained as separate host:<device> rows, even when the kernel catalog has the same provider name.
  • get prints only the placeholder, including with --reveal. CLI providers prefer the first nonempty environment value, then a live vault record, then an available kernel CLI; raw values are sealed before output. Existing vault-backed OAuth sign-ins remain usable without a local grant file. Environment placeholders keep priority; unconfirmed legacy placeholders remain usable without a vault, while known managed references still require authoritative status. Nonstandard placeholder formats are accepted only when the vault confirms the value for that name. Managed OAuth records are checked against the vault on every get: due tokens refresh within five minutes of expiry, and get --refresh forces a vault refresh without revealing either token. A selected unmanaged environment value cannot refresh a different record. Managed --json adds authoritative expires_at (Unix seconds or null), state: "ready" and refreshable. Lock, removal, invalid grant, transport failure and malformed managed replies never fall back to a cached token or provider CLI. Client-credentials get still seals before caching or reminting a token. drop removes the managed access record and its private linked grant; legacy drop requests unseal. Local references are removed only after confirmed success.
  • OAuth create runs configured loopback, auto, device and intercept flows inside the kernel. Loopback and auto capture the browser's redirect over CDP instead of listening on sandbox loopback: the browser's 127.0.0.1 is the user's machine. The registered redirect URI is unchanged, PKCE and state are checked, and only the new sign-in tab is closed. JSON callback POSTs (including AEM-style authToken) and their CORS preflights are intercepted; only the configured callback path and allowed origins are accepted, and invalid or oversized callbacks are blocked. Device flow uses HTTP and prints its verification URL and code; no browser is required. HTTP(S) goes through the kernel's outbound fetch proxy (https_proxy), with credential redirects refused. Kernel OAuth creation uses the OAuth flow even when a CLI minting step is configured, so CLI output cannot bypass sealing. CLI providers with kernel_login use their own CLI locally; other non-OAuth and MCP create commands use the linked machine/bios.
  • fastly create [--name N] [--cdp URL] needs @ai-ecoverse/wasi-fastly 17.2.0-2 or later (homescoop #2353). It runs fastly auth login --sso --token N locally (N defaults to sso). Sign in in the tab jerk opens. Jerk answers the http://localhost:8080/callback request with a signed-in page, closes the tab and writes the full redirect only to the waiting CLI’s stdin. There is nothing to copy or paste. Fastly checks the code with its own PKCE verifier, exchanges it, and stores and renews the token in its config. Jerk does not seal the redirect or register a vault grant. get retains the normal env/vault/CLI order; an existing vault placeholder is not rotated by Fastly. Seven’s drop --yes removes the vault record; use fastly profile delete N to forget the CLI profile.
  • OAuth storage atomically hands standard public-client code/PKCE/device access and refresh tokens, expiry and resolved OAuth metadata to the vault. The vault owns refresh, rotation and provider egress; the kernel stores only a provider/account/name/placeholder reference, never a refresh token, client secret or OAuth configuration. Missing refresh tokens create managed access-only records; unknown expiry is null, not a promise of perpetual validity. get --refresh fails when there is no usable refresh source. The vault preserves placeholders across rotation and same-identity reauthentication and enforces ownership and immutable endpoint/client binding. Old kernel sign-ins discarded their refresh tokens and need one reauthentication. Implicit and captured-field sign-ins retain their access-only path; captured fields cannot accompany managed refresh. Confidential interactive sign-ins remain access-only and warn before sign-in: v1 supports public authMethod = "none", not confidential refresh, Basic authentication, private-key JWT or custom refresh templates. Client-credentials reminting is unchanged. Kernel refresh_env cannot mint outside the vault; use create instead. store = "file" never opts into plaintext kernel grants.
  • mcp:<server> and mcp:url:<url> sign in from Settings › MCP servers, where the token is sealed, and every hint in seven says so. MCP grants remain Settings-managed rather than using local kernel OAuth: create asks the linked machine's jerk, and without a linked slicc CLI it exits 4 and names Settings. get prints the placeholder of the sealed record, and exits 3 when there is none. Like mcpcat, this jerk finds mcp.json through PI_MCP_CONFIG, then PI_CODING_AGENT_DIR or PI_AGENT_DIR; otherwise root reads /etc/slicc/agent/mcp.json, the file Settings writes, and any other user ~/.pi/agent/mcp.json.
  • tab drives the browser seven runs in, through the kernel's CDP endpoint in SLICC_CDP_URL (from the slicc extension or the slicc CLI); --cdp 9222 names the same endpoint. The kernel build has no CDP TLS, so wss:// and https:// CDP endpoints do not work. Kernel 1.176.2 supplies a plain ws://127.0.0.1:9222/devtools/browser/... endpoint inside the sandbox, verified with a stub browser; it is not the host machine's port 9222. OAuth HTTP(S) is separate and can use the kernel's outbound fetch proxy. A bundle exported in seven is plain text, so keep it out of shared folders.
  • <provider> list combines the provider CLI's redacted listing with /dev/sealed list records whose names match the provider's environment variables. Removed and unrelated records are excluded. CLI-only output is identical to native; combined/vault-only output is a pretty JSON array, or { "items": [...] } with --json. Vault rows carry source: "sealed"; no token is materialized. An available source still works if the other source is unavailable.
  • intercept captures in a new tab over SLICC_CDP_URL, including code exchange through the kernel HTTPS fetch proxy. The captured code or token is sealed as JERK_INTERCEPT_TOKEN before printing only its placeholder, including in a pipe. A sealing refusal is an error with no credential output. Unlike native intercept, kernel intercept does not require terminals because it never reveals a token.
  • lease, sync and popup OAuth still exit 5; they need a vault-aware lifecycle and injection policy. Missing/unsupported CDP transport is exit 4; bad intercept arguments are exit 2.

On the machine side, the slicc CLI runs jerk with --via-link. create --via-link prints progress and a final status as newline-delimited JSON and never prompts; it refuses --force, minted tokens and sign-ins that need a terminal. lease --via-link prints the lease, then a status. drop --lease --via-link prints a status with revoked: true when jerk revoked the token upstream, false when it exited 0 with nothing to revoke, and absent on failure; a CLI sign-out never runs over the link.

Over the link, an mcp: lease is confined by address whenever it has to refresh a token. If the server's URL is on loopback, every hop must be loopback too. Otherwise every hop must be a public address: the ranges slicc always refuses are refused (loopback, private, link-local, unique-local, unspecified, multicast, CGNAT, documentation, Teredo and other special-use space), and NAT64 and 6to4 addresses count as the IPv4 address they embed. jerk checks the address each connection really uses, redirects included, ignores proxy settings, and refuses with exit 2. A URL-only lease names its token MCP_TOKEN.

Kernel OAuth protocol v1

Managed sign-in requires end-to-end {"v":1,"op":"capabilities"} support returning {"v":1,"capabilities":{"kernelOAuth":1}}. Deploy supporting vault and bios versions and install kernel 1.178.0 or newer before enabling this jerk build. An old kernel, bios or vault does not silently downgrade public sign-in to access-only sealing. Legacy named records and status lookup remain compatible; oauthManaged: true in a legacy placeholder/list reply requires authoritative managed support even when local reference files are absent.

| Device operation | Request fields after v: 1 and op | Success | | --- | --- | --- | | oauthGrant | name, provider, account, accessToken, oauth: {tokenUrl, clientId, authMethod: "none", scope?}, optional refreshToken, tokenType, expiresAt | Metadata-only status | | oauthStatus | name, provider, account | Metadata-only status, no provider I/O | | oauthRefresh | Same identity only, no replacement URLs/configuration | Metadata-only status after one bounded refresh | | oauthRemove | Same identity only | {"v":1,"removed":true} |

Status is exactly v, placeholder, state, expiresAt and refreshable. Device expiry uses safe-integer epoch milliseconds or null; CLI JSON converts it to seconds. States are ready, refreshing, expired, reauth-required, removed and locked; only checked ready records produce successful get output. refreshing describes an expired refreshable record, not proof that a network request is running. Errors are validated fixed codes/causes; provider bodies and arbitrary error text are never printed. The kernel stamps the writer; bios supplies the trusted outer kernelOAuth: 1 compatibility assertion. Jerk supplies neither ownership/source claims nor private grant references.

Registration and refresh are not replayed automatically after interruption. A timeout can follow a committed vault mutation: an identity-only local reference is retained, and the next command reconciles using exact-identity status. Drop is local vault removal, not upstream provider revocation. Kernel OAuth calls have a 45-second transport deadline; vault processing has its own 40-second budget. Existing confidential, implicit and client-credentials paths do not gain managed refresh from this protocol. A managed create --scope signs in again rather than claiming scope coverage from stale local metadata; the status protocol does not export grant scopes.

Security

  • Printing tokens: jerk prints a token only to a terminal or with --reveal, and never logs one. Errors never repeat tokens, codes, verifiers, state, config values or response bodies.
  • Tokens at rest: CLI providers' tokens stay in the CLI's own store, except a token a create with keep = true prints once or a key pasted into an ask create. jerk's own OAuth grants live in the OS keyring, or a 0600 file only when the config says so.
  • URLs: OAuth and discovery URLs must be https, except http on loopback, with no userinfo. A captured redirect must match redirect_uri exactly.
  • The link: a lease seven asks for over the link can't be pointed at the machine's own network; see In SLICC.
  • Child processes: provider CLIs run from argument lists, never a shell, and without the provider's token variables, except that on Windows a .cmd or .bat launcher runs through cmd.exe (see the next bullet).
  • Windows launchers: before 1.3.5, values sent over the link could reach a .cmd or .bat launcher through cmd.exe, which could expand or run them. Fixed in 1.3.5 (2026-10-30): on Windows, before spawning a .cmd or .bat, jerk refuses % & | ^ < > ! " ( ) and control characters in arguments, and % " ! ^, control characters and :: in the launcher path. Not covered: a launcher that re-parses its own arguments, a native program that starts cmd.exe itself, and inherited environment values. Upgrade to 1.3.5 or later.

@ai-ecoverse/jerk-oauth

jerk's OAuth core, compiled to WebAssembly for the browser (ESM, wasm-bindgen web target). bios uses it for sign-ins in seven, and the vault for refreshes. It does no I/O: the caller does every fetch, opens every popup, and supplies the clock and the random bytes.

import init, { parseConfig, beginSignIn, completeSignIn, parseTokenResponse, parseRefreshResponse,
  refreshRequest, refreshTokenRequest, refreshTokenRequestBytes, scopesSatisfied, shouldBackoff } from '@ai-ecoverse/jerk-oauth';

| function | returns | | --- | --- | | parseConfig(tomlOrJson) | { ok, config?, errors? } for an [oauth] block | | beginSignIn(config, scope, nowSecs, random32, random16) | { authorizeUrl, state, expectedNonce?, pending }; keep pending in memory | | completeSignIn(config, pending, capturedUrl) | { kind: "exchange", url, body, contentType } to POST, or { kind: "token", … } for implicit flows | | parseTokenResponse(config, body, nowSecs) | { accessToken, refreshToken?, expiresAt?, scope? }, with the token read from exchange.token_field when set | | refreshTokenRequest(paramsJson) | { url, body } from { token_url, client_id, refresh_token, scope?, resource?, client_secret? }, no sign-in config needed | | refreshTokenRequestBytes(bytes) | the same, and it zeroes the caller's buffer | | parseRefreshResponse(body, nowSecs) | like parseTokenResponse, no config needed | | refreshRequest(config, refreshToken) | { url, body } from a full config | | scopesSatisfied(granted, requested) | boolean | | shouldBackoff(lastFailureSecs, nowSecs) | boolean, a 5-minute window after a failed refresh |

Errors are thrown as { kind: "error", code, message }. Provider errors (code: "idp_error") also carry error and description, cut to 128 printable ASCII characters; show code and error rather than the provider's free text. nowSecs must be whole, non-negative seconds (invalid_clock otherwise). The random bytes must come from crypto.getRandomValues; jerk only checks they aren't constant.

Related projects

  • slicc: the browser-native agent jerk was built for.
  • slicc-cli: links a running seven to this machine, installs jerk, and runs it over that link.
  • slicc-kernel: seven's wasm process kernel, which runs jerk.wasm.
  • slicc-vault: the sealed store for tokens in seven, refreshed with jerk-oauth.
  • slicc-bios: boots seven and runs its [oauth] sign-ins with jerk-oauth.
  • slicc-cdp and slicc-browsers: CDP, playwright teleport, and the browser discovery jerk uses.
  • mcpcat: a curl for MCP, which signs in through jerk.
  • fnox: secrets and leases, with jerk as a lease backend.

Development

  • npm run lint: slicc lint, shellcheck, rustfmt and clippy.
  • npm test: builds jerk and runs test/integration/.
  • npm run test:unit: the gitignored unit tests in test/unit/, with coverage through cargo-llvm-cov.
  • npm run build:wasm: the kernel build, bin/jerk.wasm.
  • npm run build:oauth-wasm: @ai-ecoverse/jerk-oauth, into dist/jerk-oauth/, with the prebuilt wasm-bindgen of the version in Cargo.lock.
  • npm run lint:wasm: two jerk-oauth builds that must be byte-identical.

CI is .github/workflows/ci.yml, one caller of slicc-shared-web's pipeline, on Linux: lint, the integration tests in shards, and a Claude and a Codex review on pull requests. Every merge to main goes through semantic-release, which tags a release and opens it as a draft. When there's a new tag, the jobs after released build the six native binaries and jerk.wasm, sign and notarize the macOS ones, write SHA256SUMS, attest them, upload them with install.sh, publish the eight npm packages with provenance and then publish the release. If one of those jobs fails, re-run it from the Actions run.

License

Apache-2.0