# soon.sh > OCI / Docker container registry. Sign in with GitHub; every user owns the namespace soon.sh//*. Everything is plain HTTP + JSON, built for agents. No browser UI. ## CLI (optional; JSON on stdout, progress on stderr) curl -fsSL https://soon.sh/install | sh # soon + docker-credential-soon in ~/.local/bin soon login --gh # or: soon login (device code), soon login --token-stdin soon whoami | soon repos | soon audit soon token create --name ci-reader --scope /app:pull --days 1 # prints a narrower token soon push soon.sh//app:latest # chunked push, layers of any size soon login stores the token in ~/.config/soon (0600) and points Docker at docker-credential-soon. SOON_TOKEN in the environment overrides the stored token; `soon auth token` prints it. ## Sign in over HTTP (get a personal access token, soon_pat_...) Exchange a GitHub token you already have (no browser): curl -s -X POST https://soon.sh/api/auth/github -H 'content-type: application/json' \ -d "{\"github_token\": \"$(gh auth token)\", \"name\": \"my-agent\"}" The GitHub token is only used to read your identity (GET api.github.com/user); it is not stored. This endpoint requires a token tied to a GitHub user. GitHub App installation tokens (`ghs_...`), including CI bot or agent tokens, are not tied to a user and are rejected. For automation, have a human approve device login (`POST /login/device` or `soon login`), then mint narrowed tokens for agents with `POST /api/tokens`. Or device login (a human approves on github.com): curl -s -X POST https://soon.sh/login/device # -> {device_code, user_code, verification_uri, interval}. Show user_code + verification_uri to the human, then poll: curl -s -X POST https://soon.sh/login/device/token -H 'content-type: application/json' -d '{"device_code": "..."}' # 400 {"error":"authorization_pending"} until approved (back off on "slow_down"), then 201 with the token. Both accept optional "scopes": [{"pattern": "/*" | "/", "actions": ["pull","push","delete"]}] and "expires_in_days" (default 90, max 366). Default scopes: pull + push on your namespaces. The response is {token, token_id, expires_at, scopes, user, namespaces, docker_login}. Store the token as SOON_TOKEN; it is shown once. ## Docker / OCI clients echo "$SOON_TOKEN" | docker login soon.sh -u --password-stdin docker push soon.sh//app:latest docker pull soon.sh//app:latest Clients exchange the PAT at GET/POST https://soon.sh/token (Docker token auth) for a 5-minute JWT scoped to one repository. Raw HTTP clients may also send "Authorization: Bearer $SOON_TOKEN" directly to /v2/*. Plain `docker push` fails for layers over 100 MB because Workers cap request bodies at 100 MB; use `soon push` (see https://soon.sh/), which chunks uploads. ## Long-lived pull credentials For a third-party puller such as Daytona, Kubernetes `imagePullSecrets`, or CI, mint a pull-only token scoped to one repository: curl -sS -X POST https://soon.sh/api/tokens -H "authorization: Bearer $SOON_TOKEN" -H 'content-type: application/json' \ -d '{"name":"daytona-pull","scopes":[{"pattern":"/","actions":["pull"]}],"expires_in_days":366}' Tokens expire (90 days by default, 366 maximum), and a token cannot mint one that outlives itself. Rotate from a fresh login token: mint a replacement, update the consumer's stored password, then revoke the old token with `DELETE /api/tokens/:id`. Daytona example: POST https://app.daytona.io/api/docker-registry {"name":"soon","url":"https://","username":"","password":"$SOON_TOKEN"} Then snapshot with `imageName: //:`. ## Self-service API (Authorization: Bearer $SOON_TOKEN) - GET /api/me user, namespaces, and this token's scopes/expiry - GET /api/repos repositories you can pull - GET /api/tokens your tokens (a narrowed token sees only itself and tokens minted from it) - POST /api/tokens {name, scopes?, expires_in_days?} -> a new token no wider and no longer-lived than the caller. Use this to hand a subagent read-only access to one repo: {"name": "ci-reader", "scopes": [{"pattern": "/app", "actions": ["pull"]}], "expires_in_days": 1} - DELETE /api/tokens/:id revoke a token and every token minted from it - GET /api/audit who logged in, minted, pushed or deleted what (?limit=, ?before=) Registry API (OCI distribution spec): GET /v2/_catalog, GET /v2//tags/list, GET|HEAD|PUT|DELETE /v2//manifests/, GET|HEAD /v2//blobs/. Errors are JSON: {"error": "..."} on /api and /login, {"errors": [{code, message}]} on /v2.