czm is a production CLI client for the eczema treatment tracker backend.
It talks to the real API over HTTP, uses API-key auth only, and follows the backend contract for subjects, locations, episodes, applications, due items, and events. It supports Python 3.11 and Python 3.12.
- Follow the full getting-started tutorial: docs/getting-started.md
- Read the command reference for the full command-by-command manual: docs/reference.md
- Read the implementation notes below if you want the non-obvious behavior explained.
This repository now includes an Agent Skills-compatible skill package at skills/czm. It is procedural guidance for agents that need to use czm to manage eczema episodes, check what is due, and log treatment applications.
Suggested use:
- Read skills/czm/SKILL.md first. In an Agent Skills-compatible runtime, this file is the entry point that the agent loader reads to decide when the skill applies and what to do next.
- Read the reference files under
skills/czm/referencesfor exact workflows, commands, and error handling. - Use
czm setupfirst, thenczm due list,czm episode get,czm episode heal,czm episode relapse, andczm application logas needed.
How loading works:
SKILL.mdis plain markdown with YAML frontmatter.- The agent runtime indexes that file, looks at the
nameanddescription, and matches it to the user request. - If the skill matches, the runtime reads the routing rules in
SKILL.mdand then the referenced files for details. - Nothing in
skills/czmis executed by the CLI itself; it is guidance for an agent that knows how to consume Agent Skills.
What the user has to do:
- Usually nothing inside
czmitself. - The skill must be available to the OpenClaw or Agent Skills runtime as files on disk, either by checking out this repository where the runtime can read it or by copying/symlinking
skills/czminto the runtime's configured skill directory. - If OpenClaw runs as a different Unix user, that user must also be able to read the skill files.
- Once the runtime can see the skill, requests about eczema tracking are routed to this skill automatically.
- For backend setup,
czm setupaccepts an optional--base-urlwhen your backend is not on the default local Docker port.
Installer helper:
If you want a one-command install from this repository clone into a skill directory you control, run:
python3 scripts/install_skill.py --target-dir /path/to/openclaw/skillsThat command copies skills/czm into /path/to/openclaw/skills/czm. If you prefer a symlink instead of a copy, add --mode symlink.
More detail: docs/skill-install.md
Example backend bootstrap with a custom URL:
czm setup \
--username admin \
--password admin \
--api-key-name czm-cli \
--timezone Europe/Berlin \
--base-url http://backend-host:28173Layout:
skills/czm/SKILL.mdskills/czm/references/commands.mdskills/czm/references/workflows.mdskills/czm/references/entity-resolution.mdskills/czm/references/error-handling.mdskills/czm/references/examples.mdskills/czm/references/protocol.md
czm setupczm subject createczm subject listczm subject getczm location createczm location listczm episode createczm episode listczm episode getczm episode healczm episode relapseczm application logczm application updateczm application deleteczm application listczm due listczm events list
- Config precedence is
CLI flag > environment variable > config file. - The config file lives at the XDG path
~/.config/czm/config.tomlby default, or the matchingXDG_CONFIG_HOMEpath when that variable is set. - The CLI uses
X-API-Keyfor authentication. - Subject resolution is deterministic: exact match, then case-insensitive match, then substring match.
- Location resolution follows the same rule set, checking both
codeanddisplay_name. - Naive local timestamps are interpreted in the configured CLI timezone and converted to UTC before being sent to the backend.
- JSON mode prints the backend-shaped payloads directly so the output stays strict and predictable.
- Exit codes are deterministic:
0success2invalid request/config3not found4ambiguous reference5auth failure6conflict7transport/server failure
Run the tests:
python3 -m pytestInstall editable:
PIP_INDEX_URL=https://pypi.org/simple python3 -m pip install -e .