Optional CAO setup and reference
Where CAO runs and what it can access
Section titled “Where CAO runs and what it can access”- On your machine: The dashboard uses your existing GitHub CLI sign-in to read workflow evidence from the repositories you choose. It stores that evidence in a local database by default. Approved setup actions update your local checkout or monitoring list; they don’t change anything on GitHub.
- In the control repository: If you publish and enable CAO automation, GitHub Actions runs it in the control repository, where its workflows, policy, and credentials are managed. This is separate from dashboard monitoring.
- In monitored repositories: Adding a repository to monitoring doesn’t install anything or start a workflow there. A centrally run workflow may read an approved target, but only a declared, authorized output can write to it. Workflows already in that repository continue to run as before.
Optional - add a workflow
Section titled “Optional - add a workflow”Monitoring is enough to start. To add automation, open Marketplace and select Add on a workflow or campaign. After confirmation, it is installed and pinned in the local checkout only; it is not published, enabled, or run.
For the first run, follow Try your first automation. Marketplace Add does not publish or dispatch; the walkthrough links to the separate review and execution steps.
What each dashboard action does
Section titled “What each dashboard action does”| Dashboard action | Command (info icon) | Effect |
|---|---|---|
| Welcome, Set up local CAO | gh cao init |
Writes only .github/workflows/cao.json in the local checkout. No credentials or remote changes. |
| Add repositories | gh cao repos add OWNER/REPO |
Adds exact repositories to local CAO policy in review mode and to the monitoring list. A wildcard resolves once to current matches. |
| Overview | Local collection | Read-only, limited to approved repositories and your gh sign-in. |
| Marketplace, Add | gh cao add <source>@<full-sha> |
Installs and registers the pinned workflow or campaign locally. Does not publish, enable, or run it. |
These dashboard actions are local and reviewable. Commit and push the policy yourself when you are ready to share it.
Read and write are separate
Section titled “Read and write are separate”- Reads: Local monitoring uses your signed-in
ghidentity. In GitHub Actions, agents also get read-only GitHub tools, scoped to approved repositories and the workflow’s declared permissions. Public-only profiles can use the built-inGITHUB_TOKEN; private or internal remote targets may need separately configured credentials. - Writes: Agents cannot write directly through their GitHub tools. A
separate GitHub Actions step checks and delivers only the workflow’s declared
safe outputs, such as an issue, comment, or pull request. Review mode is the
default and routes those outputs to the configured review repository. Live
outputs to targets require explicit policy and write access. When you
configure cross-repository credentials, use separate read and write Apps or
tokens. The write App covers only the control repository unless you add exact
destinations with
--write-repository. - Credential preference: enterprise-owned Apps first, then
organization-owned Apps, then fine-grained token pairs. Setup never falls
back silently. Repository access does not imply rights to create or install
an enterprise or organization App. The dashboard does not collect secrets or
private keys; use the canonical interactive command
gh cao setup auth <method>when credential setup is needed. See Authentication.
When each boundary is decided
Section titled “When each boundary is decided”| Boundary | Decided when | Based on | Stored in |
|---|---|---|---|
| Dashboard reach | Each collection | Your local gh sign-in. It can never exceed what you can read. |
Nothing (it is your session) |
| Dashboard monitoring list | Each confirmed Add repositories when launched without --repo |
Exact repositories approved through gh cao repos add; wildcards expand once |
Private local cache (monitoring-scope.json) |
| CAO repository scope | gh cao repos add |
Exact repository identities and current policy bounds | control-plane.scope in cao.json |
| Monitoring collection | Each local collection pass | Approved monitoring list intersected with local gh access |
Local session; no new credential |
| Authentication profile | After target and workflow requirements are known | Visibility, declared permissions, and the operator’s App/token administration rights | Actions variables and secrets |
| Read credential reach | gh cao setup auth |
Control repository and exact policy allowlist | App installation or token pair |
| Per-run read token | Each run, before the agent starts | The workflow’s declared read_* permissions, narrowed to the resolved repository |
Short-lived and never stored |
| Write credential reach | setup auth |
Control repository plus each --write-repository |
Write App installation or token |
| Per-output write token | Each safe output | That handler’s permissions, at the admitted target only | Short-lived and never stored |
| Enablement and mode | Your reviewed commit | Policy. review is the default; live needs explicit policy. |
cao.json at the exact workflow SHA |
| Run admission | Each run | Policy at the exact workflow SHA, revalidated by every worker | Run evidence |
A credential never widens policy, and policy never grants a capability that the compiled workflow does not declare. Anything missing, whether policy, credential, access, or evidence, stops the step. CAO does not assume broader access to fill the gap.
Open a local dashboard (no deployment)
Section titled “Open a local dashboard (no deployment)”This section is reference for Step 1. Without
--repo, the dashboard collects only repositories you approve in the UI.
To monitor fixed repositories without UI onboarding, pass
--repo OWNER/REPOSITORY instead, as shown below.
Use an installed CAO release, your locally authenticated GitHub CLI, and a
running Docker or Podman engine. The command automatically pulls PostgreSQL,
starts or reuses its owned loopback-only container, provisions canonical and
operational storage, and configures a separate non-owner runtime login.
Docker is tried first, then Podman. Pass --container-engine docker|podman (or set
CAO_CONTAINER_ENGINE) to use only that engine.
Persistent data and private local credentials live under
.github/cao/dashboard/<repository-scope>/postgres/; on macOS and Linux the
PostgreSQL data directory is bind-mounted into the container. The cache is added to .gitignore.
Image layers remain in the container engine. --cache-dir overrides the cache.
The container and data are retained for subsequent dashboard sessions.
To use your own database instead, pass --postgres-url or set CAO_POSTGRES_URL.
That connection bypasses container management and automatic provisioning;
provision its exact printed namespace using the
PostgreSQL setup contract.
The query server never gains bootstrap credentials. No cloud, Azure, Redis,
Node.js or npm setup is needed. The release embeds the server and dashboard.
Streaming logs require gh-aw v1.4.4+ and GitHub CLI 2.68+. Dashboard collection
installs the exact gh-aw-version pinned in .github/workflows/cao.json (or
v1.4.4 without a policy) when gh-aw is missing or does not match; an older pin
is raised to v1.4.4. External databases must run PostgreSQL 16 or newer.
Verify GitHub CLI authentication, install the extension, and select the GitHub.com repository you can read:
gh auth status# If needed:gh auth logingh extension install githubnext/gh-caogh cao dashboard --repo OWNER/REPOSITORYThese commands work unchanged in Windows Command Prompt and PowerShell.
Windows 11 from a clean machine
Section titled “Windows 11 from a clean machine”Native Windows is supported from Command Prompt or PowerShell; WSL is optional.
Install the GitHub CLI and a container engine with WinGet, then reopen the
terminal so PATH is refreshed:
winget install --exact --id GitHub.cliwinget install --exact --id Docker.DockerDesktop- Docker Desktop uses the WSL 2 backend with Linux containers. It needs
hardware virtualization enabled in BIOS/UEFI, may install WSL 2
(
winget install --exact --id Microsoft.WSL) with administrator approval, and can require a Windows restart. Start Docker Desktop and wait until the engine is running beforegh cao dashboard. - Licensing: Docker Desktop requires a paid subscription for larger
organizations. Podman is a free alternative:
winget install --exact --id RedHat.Podman, thenpodman machine init(once) andpodman machine start; run the dashboard with--container-engine podman. - Storage: Private state and credentials stay in the per-repository cache,
restricted to your Windows account by an access-control list. PostgreSQL data
lives in an owner-labelled engine volume named
gh-cao-postgres-<id>-datainstead of a bind mount, because Windows file sharing cannot preserve PostgreSQL’s required ownership and permissions. Deleting the cache folder does not delete that volume; remove it withdocker volume rm(orpodman volume rm) after removing its container. - Maintenance commands are copy-only on Windows: the dashboard shows them for you to paste into the terminal instead of running them.
- The bundled server is extracted to your user temporary folder and removed when the command stops.
Repeat --repo OWNER/REPOSITORY to select up to 20 exact
GitHub.com repositories. A checkout is unnecessary when --repo is explicit.
No gh cao setup, policy file, repository enrollment, campaign, or CAO Actions
installation is required.
Open and stop: Keep the command running in the terminal. After initial collection, open the full Dashboard: URL it prints in your browser; the command also prints the PostgreSQL namespace. The Go server binds to loopback on an available local port and evaluates the normal dashboard queries against canonical PostgreSQL on your machine, not a hosted service or browser IndexedDB. Press Ctrl-C in that terminal to stop the server and collection. The namespace remains for later sessions with the same repository scope.
Online evidence, local serving: GitHub remains the authenticated upstream
source for repository, workflow, run, and available artifact evidence.
Collection uses your local gh identity and requires network access and
repository permissions. No cloud deployment does not mean offline
acquisition or bypassing GitHub access controls.
Automatic, bounded refresh: The server starts immediately; collection runs
in background passes separated by five minutes while the command runs.
Until history discovery reaches the requested window, including on an empty
database, passes run back to back (two seconds apart) to backfill continuously.
Reaching the quota reserve waits for the quota reset; failures keep the normal
cadence.
The recent evidence window defaults to seven days (maximum 168h), while
server lifetime defaults to, and cannot exceed, 48 hours per invocation.
Each pass reads up to 1000 runs (ten 100-run pages). History checkpoints survive restarts, and admitted pages remain in PostgreSQL
inside the selected window. Agentic runs still missing artifacts stay in a persisted backlog,
so the issues and pull requests they reference are ingested in later passes. The header’s data-status tooltip shows ingestion progress, quota headroom,
pauses and errors. A shared 500-point core API pass ceiling, counting only the pass’s own requests,
reserves at least 1000 points or 20% of core quota for other work.
For example, gh cao dashboard --repo OWNER/REPOSITORY --window 12h --duration 2h
narrows both. The default count is 200 per repository for each of the
recent-run lookup and cached usage sample, not a promise of complete history.
Only agentic .lock.yml workflows are included, and runs that never executed
(skipped activations, runs awaiting approval) are excluded. Acquisition budgets, API
access, and artifact availability can leave evidence partial or unavailable;
ordinary Actions jobs and missing evidence must not look like healthy zeros.
A failed refresh reports the error and retains the last accepted PostgreSQL revision.
Optional reuse: Existing local setup can stay in place; the command does
not adopt its CAO policy as collection scope. Choose repositories in the UI or
pass explicit --repo selections naming any accessible remote repository. When the
only explicit selection is the current checkout, its .github/aw/logs artifact cache is
reused, or select one with --logs-dir PATH. Otherwise caches live in your user
cache directory, keyed by repository scope. --cache-dir PATH selects a separate private dashboard cache;
do not point it at an existing Activity database. Cache files can contain
private evidence: protect their permissions and do not publish them.
See the command reference for all flags, acquisition limits, and separately approved maintenance actions. Starting the dashboard does not change policy, workflows, or remote repository state.
Set up shared monitoring (optional)
Section titled “Set up shared monitoring (optional)”The remaining walkthrough prepares a control repository for monitoring in GitHub Actions. It uses the terminal because publishing and credential setup are not dashboard actions yet. It is not a prerequisite for the dashboard onboarding.
Estimated time: 15 minutes; approval and deployment vary.
Monitoring only: no campaign installation or new agentic work.
This is one monitoring path. For private targets, PATs, enterprise hosts, and other topologies, see setup combinations.
Prepare a control repository for shared monitoring.
Prerequisites
Section titled “Prerequisites”- Tools: Git and GitHub CLI 2.68+. Installer alternative: Bash, curl, Node.js 24+ (Git Bash on Windows).
- Logged in to GitHub CLI: verify with
gh auth statusand rungh auth loginif needed. - Repository: exact
OWNER/REPOSITORY; Agentic Workflow history is optional.
Use a private control repository for private or internal evidence. Production dashboard access belongs to the authenticated hosted server. Pages is synthetic-only; setup does not configure Pages or request public publication consent.
Step 1 - Install CAO
Section titled “Step 1 - Install CAO”Extension-first quickstart
Section titled “Extension-first quickstart”On GitHub.com:
gh extension install githubnext/gh-caogh cao --versionCreate or clone a clean default-branch control checkout. Native setup prepares missing runtime, policy, and gh-aw without a separate installer or local Node.js.
Create or clone a control checkout.
gh repo create OWNER/CONTROL_REPOSITORY --private --clonecd CONTROL_REPOSITORYUse --public only for public evidence.
To use an existing remote repository instead:
gh repo clone OWNER/CONTROL_REPOSITORYcd CONTROL_REPOSITORYPublic-only setup example.
Create a public control with
gh repo create OWNER/CONTROL_REPOSITORY --public --clone, then enter OWNER/*
at Repositories, review the exact names, and approve
commit-and-push. All evidence must be public. Interactive wildcards containing
private/internal targets are rejected for public controls, not silently trimmed.
Installer alternative (Node.js 24+).
The root installer installs gh-aw, the gh cao GitHub CLI extension,
and baseline monitoring runtime and policy.
Existing policy is preserved. No campaign is added or run.
Step 2 - Connect one repository
Section titled “Step 2 - Connect one repository”In an interactive terminal at the control repository’s root:
gh cao setupSetup prepares missing runtime and policy, reuses existing installations, and configures scope,
and authentication. No separate init is needed.
See details.
- At Repositories, enter your exact
OWNER/REPOSITORY. The control stays included. Comma-separated entries andOWNER/*also work: review the exact expanded names. Future repositories are not enrolled. - Choose Authentication only if prompted. Confirmed public targets
automatically use
public-onlywith Actions’GITHUB_TOKEN, no App/PAT, even when the control repository is private. Private/internal remote targets require credentials; see Authentication. - Review the exact read scope, output scope, and authentication, then confirm Apply this setup? This grants no dashboard publication authority.
- Store secrets in Actions, never in policy or committed files. Credentials do not expand scope.
- Review the one-line change summary; open the full-diff path for details. “Commit and push these CAO monitoring changes? [y/N]” optionally publishes reviewed CAO files and returns deployment pending links immediately.
No campaigns or agentic work are installed. Publication requires a synchronized default branch, matching origin, and empty index; no protection bypass. Declining, blocked, or unattended setup stays local.
If setup stops, inspect its error, local files, and credential changes before retrying; do not publish incomplete setup. For unattended public-only setup, see Authentication.
Step 3 - Publish and open your dashboard
Section titled “Step 3 - Publish and open your dashboard”Check installation:
gh cao doctorIf setup published, follow its Actions link. Otherwise review and publish:
git status --shortgit diff -- .githubCheck that .github/workflows/cao.json names only the intended repositories
and that control-plane.campaigns is {}. Keep control-plane.workflows and
control-plane.operations absent or {} too: monitoring does not enroll
execution. Do not publish private evidence to a public dashboard.
Include only setup-created files, never unrelated files or secrets:
git add .github activity dashboardgit diff --cached --statgit commit -m "Set up CAO monitoring"git pushCheck CAO validation in Actions for full policy and workflow validation. The installation prepares shared runtime tools; it does not install scheduled Activity or dashboard artifact publication workflows.
Open the authenticated hosted dashboard, or prepare an explicit operational canonical JSONL for local Go/PostgreSQL ingestion. See Agent analysis. Missing evidence remains unavailable, not proof of zero cost or success. CAO monitors Agentic Workflows, not every ordinary Actions job. The sample dashboard is synthetic and cannot verify operational results.
Optional: add automation later
Section titled “Optional: add automation later”Monitoring is enough. For automation, derive the simplest suitable structure from your outcome and scope.
For optional automation, try the Daily Repo Status quickstart: one bounded control-repository report. Other choices: Direct operation for supplied targets, Standalone fleet workflow for fleets, campaign for independent workers, or ordinary GitHub Actions for deterministic work.
None is enrolled, enabled or run by setup. Installation is not execution: review and commit workflows and policy together before enabling them. Start in review mode with one repository; model access and AI credits are separate prerequisites. See Roll out a campaign.
The Repo Assist walkthrough demonstrates a review-only campaign.
Continue learning
Section titled “Continue learning”- Explore the dashboard.
- Configuration: understand your policy.