Driving Kerykeion from the terminal
Verified against kerykeion 6.0.1, Python 3.12+.
The CLI ships as an optional extra. Everything the library computes is reachable
from the shell: about fifty curated commands, plus kerykeion call as a guarded
dispatcher over the rest of the public API.
Accuracy rule for you: never invent a flag or a value. The CLI describes
itself — kerykeion info literals -f json lists every accepted value, and
kerykeion call <Factory>.<method> --explain describes every parameter. Read
those instead of guessing; the tables are large (48 ayanamsas, 23 house systems,
76 points) and change between releases.
Install
# gate: skip
pip install "kerykeion[cli]==6.0.1"
# Or: uv tool install "kerykeion-cli==6.0.1"
The command lives in its own package, kerykeion-cli, which the extra installs;
a plain pip install kerykeion has the library and no command. The interface is
built on the standard library alone, so nothing third-party comes with it.
kerykeion status is always safe to run first.
The three rules that keep output usable
- The payload goes to stdout; warnings and notes always go to stderr. This
holds for every format, including JSON. Never parse stderr, and never assume
a clean stderr means success — check the exit code.
- Format follows the destination: a terminal gets text, a pipe gets JSON.
Force it with
-f text|json|xml|svg, or let -o out.svg infer from the
suffix. Scripts should pass -f explicitly rather than rely on the default.
JSON is the library's full model (a natal chart is ~35 KB); -f xml is
to_context(), the same chart in ~5 KB, and the shape to read into a
context window. -f is the one format flag, on every command.
- Exit codes are the contract. Branch on them; do not match on messages.
kerykeion subject save ada --name "Ada Lovelace" \
--date 1815-12-10 --time 18:00 \
--lat 51.5074 --lng -0.1278 --tz Europe/London --offline
kerykeion natal -s ada -f json | head -3 # JSON, no ANSI, clean to pipe
kerykeion natal -s ada -f svg -o /tmp/ada.svg # SVG to a file
If a consumer cannot read stderr, --envelope puts provenance and the warnings
in the JSON itself. Every command that produces a payload takes it:
kerykeion natal -s ada -f json --envelope
Exit codes
| Code |
Meaning |
What to do |
| 0 |
success |
— |
| 1 |
unexpected error |
rerun with --traceback; this is a bug |
| 2 |
usage error (from the parser) |
fix the command line |
| 4 |
invalid input |
fix the flag the message names |
| 5 |
kerykeion rejected the request |
astrological/domain error |
| 6 |
ephemeris problem |
date out of coverage, missing data files |
| 7 |
network |
GeoNames unreachable; prefer --offline |
| 8 |
sampling ceiling |
narrow the range/step, or --no-limit |
| 9 |
warnings escalated |
you passed --warnings-as-errors |
| 130 |
interrupted |
— |
kerykeion status --check runs the install checks and exits 6 when the install
is genuinely broken; a plain kerykeion status only reports and always exits 0.
kerykeion status --check -f json
Subjects live in profiles
Almost every command takes -s <profile> rather than fifteen inline flags. A
profile is a JSON recipe stored under $XDG_CONFIG_HOME/kerykeion/subjects/,
written 0600 inside a 0700 directory because birth data is personal.
kerykeion subject list
kerykeion subject show ada -f json
kerykeion subject verify ada -f json
Inline flags override the profile, so a stored subject can be reused for a
relocated reading without editing it. Full details and --set:
references/profiles.md.
Capability routing — find the command, then open the reference
| You want |
Command |
Reference |
| natal, synastry, transit, composite, return, progression |
natal, synastry, … |
commands.md |
| an SVG with a theme, a language, a variant |
any chart command -f svg |
rendering.md |
| aspects, dominants, moon phase, relationship score |
aspects, dominants, moon, relationship-score |
commands.md |
| profections, firdaria, ZR, horary, directions, solar arc, ACG, relocation |
technique <sub> |
commands.md |
| eclipses, lunations, ingresses, stations, VoC, hours, sun times, mundane, phenomena, occultations |
sky <sub> |
commands.md |
| a time series of positions, or transits over a range |
ephemeris, transits |
commands.md |
| storing and reusing a subject |
subject <sub> |
profiles.md |
| something with no curated command |
kerykeion call … |
call-dispatcher.md |
| the list of valid values for a flag |
kerykeion info … |
io-and-exit-codes.md |
Top traps
These produce a wrong chart silently or a confusing failure. They are the
reason to read before composing a command.
- House-system letters are case-sensitive.
i (Sunshine/alt.) and I
(Sunshine) are different systems. --houses placidus (a name) is safer than a
letter; kerykeion info houses lists both.
- A relocated
transit/return takes either --lat/--lng/--tz together
or --city (geocoded; needs the network or the local default-geo database).
Two coordinates out of three is exit 4, on purpose: the natal timezone at new
coordinates is a multi-hour error in the houses and Ascendant. Passing both
--city and coordinates is also exit 4 — one command, one place, never a
silent pick between the two.
--online and --offline are mutually exclusive (exit 4). Prefer
--offline in scripts; the default goes online only when lat/lng/tz are not
all known.
sky voc --from/--to is a UTC range. Pass --tz (or a profile) so naive
bounds are read in that zone rather than as UTC.
- An offset-bearing
--from on a DST fall-back hour is refused rather than
guessed, because the moment factories take wall-clock parts without a fold.
transits --refine requires --events. Alone it would be a silent no-op.
transits --include-subjects is for per-sample moments, not --events.
Add --calculate-dignities when those attached subjects also need essential
dignity fields; on transits, it requires --include-subjects.
- A long series hits the sampling ceiling (exit 8) before computing anything.
Widen the step or pass
--no-limit deliberately.
- Chart flags
--degree-indicators, --aspect-icons and --external-view
only apply to --style classic. Under the default modern style the
library ignores them and says so on stderr.
Never invent values
kerykeion info literals -f json | head -5 # every accepted enum, by name
kerykeion info houses # letters and name aliases
kerykeion info points # what --points accepts
kerykeion info methods # strategy names per command
Reference index
- references/commands.md — the whole command tree, with
what each one needs.
- references/io-and-exit-codes.md — formats,
streams,
--envelope, exit codes, info, status --check.
- references/profiles.md — the profile store,
--set,
permissions and PII.
- references/rendering.md — every SVG and report
option, and which chart types they affect.
- references/call-dispatcher.md — reaching any
public factory,
--explain, and --param coercion.
- references/recipes.md — task-shaped examples for
pipelines, batches and CI.
For writing Python against the library rather than driving it from a shell, use
the kerykeion skill instead.
1---2name: kerykeion-cli3description: Drive kerykeion from the terminal — astrology without writing Python. Use this skill WHENEVER the task is to run astrology from a shell, a pipeline, a Makefile, a cron job or CI: natal / synastry / transit / composite / return / progression charts and SVG wheels; aspects, dominants, moon phase, relationship score; profections, firdaria, zodiacal releasing, horary, primary directions, solar arc, astrocartography, house comparison, fixed stars; eclipses, lunations, ingresses, stations, void-of-course Moon, sun times, planetary hours, mundane aspects, phenomena, occultations; ephemeris and transit time series. Trigger on "kerykeion" plus any of terminal, shell, bash, command line, CLI, pipe, jq, script, cron, CI, or on a pasted `kerykeion ...` command. Covers the profile store, exit codes, stdout-vs-stderr discipline, the `call` dispatcher that reaches every public factory, and the traps that silently produce a wrong chart. To write Python instead, use `kerykeion`.4license: AGPL-3.05---67# Driving Kerykeion from the terminal89Verified against **kerykeion 6.0.1**, Python 3.12+.1011The CLI ships as an optional extra. Everything the library computes is reachable12from the shell: about fifty curated commands, plus `kerykeion call` as a guarded13dispatcher over the rest of the public API.1415**Accuracy rule for you:** never invent a flag or a value. The CLI describes16itself — `kerykeion info literals -f json` lists every accepted value, and17`kerykeion call <Factory>.<method> --explain` describes every parameter. Read18those instead of guessing; the tables are large (48 ayanamsas, 23 house systems,1976 points) and change between releases.2021## Install2223```bash24# gate: skip25pip install "kerykeion[cli]==6.0.1"26# Or: uv tool install "kerykeion-cli==6.0.1"27```2829The command lives in its own package, `kerykeion-cli`, which the extra installs;30a plain `pip install kerykeion` has the library and no command. The interface is31built on the standard library alone, so nothing third-party comes with it.32`kerykeion status` is always safe to run first.3334## The three rules that keep output usable35361. **The payload goes to stdout; warnings and notes always go to stderr.** This37 holds for every format, including JSON. Never parse stderr, and never assume38 a clean stderr means success — check the exit code.392. **Format follows the destination**: a terminal gets text, a pipe gets JSON.40 Force it with `-f text|json|xml|svg`, or let `-o out.svg` infer from the41 suffix. Scripts should pass `-f` explicitly rather than rely on the default.42 JSON is the library's full model (a natal chart is ~35 KB); `-f xml` is43 `to_context()`, the same chart in ~5 KB, and the shape to read into a44 context window. `-f` is the one format flag, on every command.453. **Exit codes are the contract.** Branch on them; do not match on messages.4647```bash48kerykeion subject save ada --name "Ada Lovelace" \49 --date 1815-12-10 --time 18:00 \50 --lat 51.5074 --lng -0.1278 --tz Europe/London --offline5152kerykeion natal -s ada -f json | head -3 # JSON, no ANSI, clean to pipe53kerykeion natal -s ada -f svg -o /tmp/ada.svg # SVG to a file54```5556If a consumer cannot read stderr, `--envelope` puts provenance and the warnings57in the JSON itself. Every command that produces a payload takes it:5859```bash60kerykeion natal -s ada -f json --envelope61```6263## Exit codes6465| Code | Meaning | What to do |66|---|---|---|67| 0 | success | — |68| 1 | unexpected error | rerun with `--traceback`; this is a bug |69| 2 | usage error (from the parser) | fix the command line |70| 4 | invalid input | fix the flag the message names |71| 5 | kerykeion rejected the request | astrological/domain error |72| 6 | ephemeris problem | date out of coverage, missing data files |73| 7 | network | GeoNames unreachable; prefer `--offline` |74| 8 | sampling ceiling | narrow the range/step, or `--no-limit` |75| 9 | warnings escalated | you passed `--warnings-as-errors` |76| 130 | interrupted | — |7778`kerykeion status --check` runs the install checks and exits 6 when the install79is genuinely broken; a plain `kerykeion status` only reports and always exits 0.8081```bash82kerykeion status --check -f json83```8485## Subjects live in profiles8687Almost every command takes `-s <profile>` rather than fifteen inline flags. A88profile is a JSON *recipe* stored under `$XDG_CONFIG_HOME/kerykeion/subjects/`,89written `0600` inside a `0700` directory because birth data is personal.9091```bash92kerykeion subject list93kerykeion subject show ada -f json94kerykeion subject verify ada -f json95```9697Inline flags override the profile, so a stored subject can be reused for a98relocated reading without editing it. Full details and `--set`:99[references/profiles.md](references/profiles.md).100101## Capability routing — find the command, then open the reference102103| You want | Command | Reference |104|---|---|---|105| natal, synastry, transit, composite, return, progression | `natal`, `synastry`, … | [commands.md](references/commands.md) |106| an SVG with a theme, a language, a variant | any chart command `-f svg` | [rendering.md](references/rendering.md) |107| aspects, dominants, moon phase, relationship score | `aspects`, `dominants`, `moon`, `relationship-score` | [commands.md](references/commands.md) |108| profections, firdaria, ZR, horary, directions, solar arc, ACG, relocation | `technique <sub>` | [commands.md](references/commands.md) |109| eclipses, lunations, ingresses, stations, VoC, hours, sun times, mundane, phenomena, occultations | `sky <sub>` | [commands.md](references/commands.md) |110| a time series of positions, or transits over a range | `ephemeris`, `transits` | [commands.md](references/commands.md) |111| storing and reusing a subject | `subject <sub>` | [profiles.md](references/profiles.md) |112| something with no curated command | `kerykeion call …` | [call-dispatcher.md](references/call-dispatcher.md) |113| the list of valid values for a flag | `kerykeion info …` | [io-and-exit-codes.md](references/io-and-exit-codes.md) |114115## Top traps116117These produce a **wrong chart silently** or a confusing failure. They are the118reason to read before composing a command.119120- **House-system letters are case-sensitive.** `i` (Sunshine/alt.) and `I`121 (Sunshine) are different systems. `--houses placidus` (a name) is safer than a122 letter; `kerykeion info houses` lists both.123- **A relocated `transit`/`return` takes either `--lat`/`--lng`/`--tz` together124 or `--city` (geocoded; needs the network or the local default-geo database).**125 Two coordinates out of three is exit 4, on purpose: the natal timezone at new126 coordinates is a multi-hour error in the houses and Ascendant. Passing both127 `--city` and coordinates is also exit 4 — one command, one place, never a128 silent pick between the two.129- **`--online` and `--offline` are mutually exclusive** (exit 4). Prefer130 `--offline` in scripts; the default goes online only when lat/lng/tz are not131 all known.132- **`sky voc --from/--to` is a UTC range.** Pass `--tz` (or a profile) so naive133 bounds are read in that zone rather than as UTC.134- **An offset-bearing `--from` on a DST fall-back hour is refused** rather than135 guessed, because the moment factories take wall-clock parts without a fold.136- **`transits --refine` requires `--events`.** Alone it would be a silent no-op.137- **`transits --include-subjects` is for per-sample moments, not `--events`.**138 Add `--calculate-dignities` when those attached subjects also need essential139 dignity fields; on `transits`, it requires `--include-subjects`.140- **A long series hits the sampling ceiling (exit 8) before computing anything.**141 Widen the step or pass `--no-limit` deliberately.142- **Chart flags `--degree-indicators`, `--aspect-icons` and `--external-view`143 only apply to `--style classic`.** Under the default `modern` style the144 library ignores them and says so on stderr.145146## Never invent values147148```bash149kerykeion info literals -f json | head -5 # every accepted enum, by name150kerykeion info houses # letters and name aliases151kerykeion info points # what --points accepts152kerykeion info methods # strategy names per command153```154155## Reference index156157- [references/commands.md](references/commands.md) — the whole command tree, with158 what each one needs.159- [references/io-and-exit-codes.md](references/io-and-exit-codes.md) — formats,160 streams, `--envelope`, exit codes, `info`, `status --check`.161- [references/profiles.md](references/profiles.md) — the profile store, `--set`,162 permissions and PII.163- [references/rendering.md](references/rendering.md) — every SVG and report164 option, and which chart types they affect.165- [references/call-dispatcher.md](references/call-dispatcher.md) — reaching any166 public factory, `--explain`, and `--param` coercion.167- [references/recipes.md](references/recipes.md) — task-shaped examples for168 pipelines, batches and CI.169170For writing Python against the library rather than driving it from a shell, use171the **`kerykeion`** skill instead.