CLI Reference
keppy ships a single command, keppy, which reads a TOML configuration file and writes the corresponding KEPLER punch-card generator file.
Synopsis
Arguments
| Argument | Description |
|---|---|
CONFIG |
Path to the input .toml configuration file. Must exist. |
OUTPUT |
Path where the generated punch-card file will be written. |
Options
| Option | Description |
|---|---|
--burngen PATH |
Path for the BURN generator file. Defaults to <output-dir>/<burngen-name> taken from the config's chemistry.burngen field. |
--help |
Show the help message and exit. |
Environment
KEPLER_DATA must be set when [chemistry] preset = "..." is used. It should point to the KEPLER auxiliary data directory that contains the composition files:
Custom compositions ([chemistry] custom = {...}) work without this variable.
Examples
Generate a punch-card deck and BURN generator from a TOML config:
keppy star.toml run/s20g
# writes: run/s20g (punch-card generator deck)
# writes: run/solas09g (BURN generator — name from config)
Override the BURN generator output path:
keppy star.toml run/s20g --burngen run/myburngen
# writes: run/s20g (punch-card generator deck)
# writes: run/s20bg (BURN generator — name from CLI)
Display usage:
Output
On success the command prints both output paths and exits with code 0:
Any configuration validation error or unsupported file type produces a clean error message and exits with a non-zero code.
Programmatic equivalent
The CLI is a thin wrapper around two public functions:
from keppy.main import load_config, kepgen
# validate config only
config = load_config("star.toml")
# write punch cards and BURN generator
burngen_path = kepgen("star.toml", "run/s20g")
# override BURN generator path
burngen_path = kepgen("star.toml", "run/s20g", burngen_path="run/myburngen")
main
Main routines, including loaders and CLI entrypoint.
load_config
Load and validate a YAML or TOML configuration file.
Source code in src/keppy/main.py
kepgen
Load config, write KEPLER punch cards and the BURN generator file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
Path
|
Path to the TOML/YAML configuration file. |
required |
output_path
|
Path
|
Destination for the punch-card generator deck. |
required |
burngen_path
|
Path | None
|
Destination for the BURN generator file. When
|
None
|
Returns:
| Type | Description |
|---|---|
Path
|
The resolved path of the written BURN generator file. |