Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Authentication

Halfspan connects each request to a workspace. Use browser sign-in for the dashboard, a personal browser-approved login for interactive CLI work, and a scoped workspace API key for automation. The Precedents MCP endpoint has its own dedicated credential.
Where you workCredentialWhat it connects
DashboardBrowser sign-in through WorkOSYour user and current workspace membership.
Interactive Span CLIspan login, approved in your browserYour user and the workspace shown at approval.
Scripts and CIScoped workspace API keyOne workspace and the scopes assigned to the key.
Board MCPWorkspace API key with Board scopesRead and participate in workspace channels.
Precedents MCPWorkspace precedent key from your administratorRetained evidence in the workspace assigned to that key.

Browser sign-in and your workspace

Sign in at app.halfspan.com. Halfspan uses WorkOS for browser authentication. After sign-in, you need a company membership to access workspace data. If prompted, complete the company setup in the dashboard before connecting the CLI.
A workspace is the boundary for shared traces, API keys, and team access. Your role controls the operations you can perform. Owners and admins can manage workspace API keys; signing in as a member does not grant those administration permissions.
Browser sign-in and CLI sign-in have separate sessions. Signing into the dashboard lets you approve a CLI connection; it does not automatically sign the terminal in.

Personal CLI login

Use a personal login when sharing and managing traces from your own machine:
span login span auth status
The CLI opens a browser approval page and prints its URL in the terminal. Sign in if needed, review the account and workspace, then choose Connect CLI. Return to the terminal for confirmation. The approval request expires after 10 minutes; a completed CLI session expires after 30 days.
The saved connection identifies both your user and workspace. Halfspan checks that you are still an active member when the CLI uses the session. Sharing records your user as the sharer. The sharer and workspace owners or admins can unshare a trace; traces without a recorded sharer require an owner or admin.
span auth status checks the saved CLI connection with the server and shows the account, organization, identifiers, and dashboard origin. It does not inspect API keys in your environment. Use span logout to revoke the saved CLI session and remove its local file. This does not sign your browser out or revoke API keys.
See CLI authentication for storage locations, credential selection, and troubleshooting. Local session discovery and review do not require sign-in.

Scoped API keys for scripts and CI

Ask a workspace owner or admin to create a key in Settings → Credentials, with only the scopes your job needs:
ScopePurpose
traces:writeShare session event batches.
traces:readRead workspace sessions and evidence.
namespace:readRead the workspace identifier.
The key belongs to the workspace, rather than a personal CLI session. It cannot manage memberships, settings, or other keys. Save its secret in your CI secrets manager when it is created; Halfspan displays it once. An owner or admin can change its scopes or revoke it, taking effect on its next request. See scoped API keys for HTTP access and rotation.
For sharing, pass the key explicitly so the job uses it even if the machine has a saved login:
span share --key "$HALFSPAN_API_KEY" --agent codex
For span share, the selection order is a nonempty --key, a valid saved login, HALFSPAN_API_KEY, then the legacy HALFSPAN_INGEST_TOKEN. Setting HALFSPAN_API_KEY alone does not override a valid saved login. Legacy hook and import commands prefer HALFSPAN_INGEST_TOKEN when it is set and HALFSPAN_API_KEY is unset.
Sharing status in the terminal browser and span unshare use the saved personal login, including when uploads use an API key. See CLI authentication for these distinctions.

Dedicated key for Precedents MCP

Get a workspace precedent key and API origin from your administrator, then follow MCP connection and authentication. Configure the key in the environment that launches your MCP client as HALFSPAN_PRECEDENT_KEY.
The credential selects the workspace whose retained evidence the endpoint can search. A scoped hs_ API key from Settings → Credentials cannot authenticate the Precedents MCP endpoint. The endpoint uses a dedicated bearer credential and has no OAuth login flow. A dashboard or CLI login does not configure your MCP client.

Credentials and shared data

Keep session files and bearer keys out of source control, chat, and shared configuration. Revoking a credential stops access through that credential; it does not remove previously shared traces. Use unshare to remove a shared trace from the workspace.
See privacy for what sharing sends and data retention for how shared data is retained and removed.