Wakapi coding stats (summaries, projects, today status, totals) via a small Python CLI.
Python: ≥ 3.10 required (PEP 604 syntax in the script). .python-version and GitHub Actions CI use 3.10 (aligned with the minimum).
| File | Contents |
|---|---|
| SKILL.md | Agent instructions: when to use, env, minimal CLI examples, troubleshooting |
| references/wakapi-api.md | Full API/CLI reference: URLs, auth, stats vs summaries, --range table, curl, timeouts, extended examples |
wakapi-skill/
├── SKILL.md
├── README.md
├── LICENSE
├── references/
│ └── wakapi-api.md
├── scripts/
│ └── wakapi_query.py
├── tests/
│ └── test_wakapi_query.py
| Variable | Required | Purpose |
|---|---|---|
WAKAPI_URL |
Yes | Instance origin (e.g. https://wakapi.dev). |
WAKAPI_API_KEY |
Yes* | API key (HTTP Basic, key only). *Not required for health (GET /api/health). |
Do not commit secrets. No other environment variables are read; CLI flags are documented in SKILL.md and references/wakapi-api.md.
git clone https://github.com/chensoul/wakapi-skill.git
cd wakapi-skillPython ≥ 3.10, stdlib only (CI uses 3.10 — see .python-version).
python3 -m venv .venv
source .venv/bin/activate# Instance origin + API key (key not needed only for `health`)
export WAKAPI_URL="https://your-wakapi.example"
export WAKAPI_API_KEY="your-key"
python3 scripts/wakapi_query.py --help
python3 scripts/wakapi_query.py health # GET /api/health
python3 scripts/wakapi_query.py summaries --range today # compat summaries ?range=
python3 scripts/wakapi_query.py summaries --range last_7_days --timezone Asia/ShanghaiQuick start: SKILL.md · full CLI/curl/presets: references/wakapi-api.md.
Wakapi:
python3 -m unittest discover -s tests -p 'test_*.py' -vpip install coverage
coverage run --source=scripts -m unittest discover -s tests -p 'test_*.py' -q
coverage report -m --include='scripts/wakapi_query.py'| Area | Files |
|---|---|
| Wakapi CLI | scripts/wakapi_query.py |
| Agent docs | SKILL.md, references/wakapi-api.md, … |
| Tests | tests/test_wakapi_query.py |
| Workflow | When | What |
|---|---|---|
.github/workflows/ci.yml |
Push / PR | py_compile, unittest, package-check (publish dir = Wakapi skill only; see .clawhubignore) |
.github/workflows/release.yml |
Tag v* |
Tarball |
.github/workflows/clawhub-publish.yml |
Tag / dispatch | Publish wakapi-skill to ClawHub |
ClawHub slug: wakapi-skill. Registry metadata: SKILL.md.
See LICENSE.