Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
harmont-cli
Command-line client for the Harmont CI platform. Run CI pipelines on your own machine, in Docker, from a Python pipeline definition checked into your repo.
Pipelines are written with the companion harmont-py DSL.
Install
harmont-cli is not yet published to crates.io. Install from source:
Verify:
Requirements
hm run --local shells out to Docker and to Python:
- Docker — the local executor boots a fresh container per chain.
- Python 3.11+ — used to render the pipeline definition to JSON.
harmont-py— the Python package that defines the pipeline DSL. Not yet on PyPI; install from git:
Quickstart
1. Write a pipeline
Pipelines live in .harmont/<slug>.py inside your repo. Each file uses the @hm.pipeline("slug") decorator to register one or more named pipelines. Save the following as .harmont/hello.py:
return
The DSL is small:
hm.sh(cmd, label=...)— start a chain with one shell command (shorthand forhm.scratch().sh(...))..sh(cmd, label=..., cwd=...)— chain another command. Chained.shcalls share filesystem state inside the same container.cwd="path"prependscd <path> &&to the command..fork(label=...)— branch into parallel work from a shared base.hm.wait()— explicit synchronization barrier.@hm.target()— reusable, memoized building block; compose into pipelines via fixture-style typed params (Target[T],Annotated[Step, BaseImage("...")]).
A two-branch variant:
=
=
=
return
For larger pipelines, compose with @hm.target and typed fixture params:
return
return
return
For the full DSL surface (cache policies, matrix axes, soft-fail, timeouts), see the upstream harmont-py repo.
2. Run it
From the repo root:
The CLI walks .harmont/*.py, resolves the hello slug, renders the pipeline to JSON, and schedules the chains across Docker containers. Each chain inherits state from its parent; forks run in parallel up to --parallelism N (defaults to the host's available parallelism).
If the repo declares only one pipeline, the slug is optional:
3. Useful flags
Cloud
hm cloud <verb> talks to the hosted Harmont API at api.harmont.dev.
Every cloud verb is delivered by the embedded hm-plugin-cloud WASM
plugin (no separate install step):
# paste a token directly)
# (defaults to .harmont/plan.json)
Tokens are stored in ~/.harmont/credentials.toml (mode 0o600). The
active org slug is persisted per-user under
~/.config/harmont/state/cloud.kv. Source-archive upload for
cloud run is plan-5 work — pre-render your pipeline to
.harmont/plan.json first.
Build from source
The OpenAPI client is generated at build time from the vendored openapi.json via progenitor. The snapshot ships with the crate.
See also
harmont-py— the Python DSL used to define pipelines that this CLI runs.
License
Dual-licensed under either of
- Apache License, Version 2.0 (
LICENSE-APACHE) - MIT license (
LICENSE-MIT)
at your option.
Plugin authoring
hm is plugin-driven via Extism. To write a plugin:
Implement one of StepExecutor, SubcommandPlugin, LifecycleHook, or
OutputFormatter, declare a PluginManifest, and call
register_plugin!(...). Build with:
The output .wasm can be installed with:
See cli/crates/hm-fixtures/src/bin/ for minimal working examples.
Output formatter
Implement OutputFormatter::on_event to render each BuildEvent.
Plugins emit bytes via host::write_stdout or host::write_stderr.
Built-in formatters: human (default), json. Select with
hm run --format <name>.