Install & Compatibility
Where this runs
tested against v3.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.140s · 19.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.128s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
craft_cli
✓ import craft_cli
EmitterMode
✓ from craft_cli import EmitterMode
✗ from craft_cli.emitter import EmitterMode
EmitterMode is exported from the top-level package, not a submodule.
emit
✓ from craft_cli import emit
✗ from craft_cli.emitter import emit
emit is a top-level singleton, not from internal modules.
Initialize the emitter and use basic output functions.
from craft_cli import emit, EmitterMode
# Initialize the CLI emitter
emit.init(EmitterMode.BRIEF, appname="myapp")
# Simple message
emit.message("Hello, world!")
# Progress bar
with emit.open_stream("Processing") as stream:
for i in range(10):
stream.progress(f"Step {i+1}")
# Error handling
emit.error("Something went wrong")
craft --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'craft_cli'
Package not installed or wrong import path (e.g., 'craft-cli' with hyphen).
fixInstall with 'pip install craft-cli' and import as 'craft_cli' (underscore).
RuntimeError: Emitter already initialized
emit.init() called twice without emit.cleanup() in between.
fixWrap code in try/finally: emit.init(...); try: ... finally: emit.cleanup().
AttributeError: module 'craft_cli' has no attribute 'emit'
Old import pattern or using incorrect casing.
fixUse 'from craft_cli import emit'.
Upgrade
Version history
3.4.1latest on PyPI · released Jun 17, 2026
Audit
Dependencies
No dependency data recorded yet.