Sweep operator runbooks (docs/QUICKSTART, docs/HEADLESS_USAGE, docs/architecture, docs/sample-data, docs/agent-workspace-prompt, docs/metrics/metrics.yml, dev_docs/server, dev_docs/disaster-recovery), the corporate-memory service README, the jira connector README + backfill scripts, the deploy skill, and test docstrings. Replaces `da sync` → `agnes pull`, `da analyst setup` → `agnes init`, `da metrics ...` → `agnes catalog --metrics` / `agnes admin metrics ...`, `da fetch` → `agnes snapshot create`, plus the matching docker-compose admin invocations. Vendor-specific `/opt/data-analyst/` install paths in jira backfill / consistency scripts and operator docs are replaced with the placeholder `<install-dir>` and a new `AGNES_ENV_FILE` env-var override that lets a deployment inject its actual install path without a code change. Aligns with the OSS vendor-agnostic policy in CLAUDE.md. CHANGELOG `### Internal` entry summarizes the audit and reaffirms the intentional stale-marker tuples (`_LEGACY_STRINGS`, `_OUR_COMMAND_MARKERS`) that must keep referencing `da sync` / `da fetch` / etc. for hook upgrade and override-detection logic.
45 lines
951 B
Markdown
45 lines
951 B
Markdown
# Headless / CI usage
|
|
|
|
For unattended clients (CI, cron, Claude Code), authenticate with a Personal Access Token (PAT) rather than an interactive session.
|
|
|
|
## Create a PAT
|
|
|
|
**Via UI:** sign in, open `/tokens`, create a token. Copy the raw value — it is shown exactly once.
|
|
|
|
**Via CLI (requires an interactive session):**
|
|
|
|
```bash
|
|
agnes auth token create --name "github-actions" --ttl 365d --raw
|
|
```
|
|
|
|
The `--raw` flag prints only the token, suitable for piping into a secret store.
|
|
|
|
## Use the PAT
|
|
|
|
Set the `AGNES_TOKEN` env var:
|
|
|
|
```bash
|
|
export AGNES_TOKEN=<your-token>
|
|
agnes query "SELECT 1"
|
|
```
|
|
|
|
### GitHub Actions example
|
|
|
|
```yaml
|
|
- name: Sync data
|
|
env:
|
|
AGNES_TOKEN: ${{ secrets.AGNES_TOKEN }}
|
|
AGNES_SERVER: https://agnes.example.com
|
|
run: |
|
|
uv tool install "$AGNES_SERVER/cli/wheel/agnes.whl"
|
|
agnes pull
|
|
```
|
|
|
|
## Revoke
|
|
|
|
```bash
|
|
agnes auth token list
|
|
agnes auth token revoke <id|prefix|name>
|
|
```
|
|
|
|
Or from `/tokens` → Revoke.
|