Hosted mode
Accounts, keys, and quotas
Hosted features are optional and separate from local symbol indexing. The account portal uses GitHub OAuth and lets you create or revoke API keys. Keys are shown once; the control store retains only their SHA-256 hashes.
Connect the hosted TUI
- Run
stub-agent-tuiinteractively; the TUI opens the account portal's sign-in page. - After authentication, copy the one-time initial API key from the browser and paste it into the hidden prompt.
- Set
STUB_AGENT_ENDPOINTor pass--endpointif using a non-default Worker. Project IDs are isolated per account.
read -s -p "StubForge API key: " STUB_AGENT_API_KEY
export STUB_AGENT_API_KEY
stub-agent-tui --project personal
unset STUB_AGENT_API_KEY
Creating a key is an explicit opt-in. Store the one-time key in a password manager and avoid putting it in shell history or passing it as a command-line argument. The remote TUI sends eligible workspace files to the configured Worker for sync and generation. Its scanner respects .gitignore, caps files at 1 MiB and the workspace at 10 MiB, but does not detect or redact secrets automatically.
Key scopes and isolation
Portal keys currently receive sync:do and llm:cf scopes. The Worker checks the requested operation against those scopes, checks revocation on every call, and routes the Durable Object by account ID plus project ID. Project IDs may contain letters, numbers, hyphens, and underscores.
Quotas and usage
Each account may make up to 1,000 authorized API requests and an estimated 10,000 Workers AI neurons per UTC day. Request bodies are limited to 10 MiB. The TUI usage view reports the account request count and AI estimate alongside project-level token/neuron estimates. Neuron calculations are approximate and the account cap is enforced across projects. Quotas and estimates are not prices, invoices, or a guarantee of inference cost. Billing checkout is not implemented.
Self-hosting
Deployment requires a Cloudflare Worker, the ProjectAgent Durable Object, and a D1 control database shared by the Worker and Pages Functions. Follow the deployment guide; keep OAuth, session, and Cloudflare credentials in platform secret stores.