charmcraftlocal
Pack charms with local Python package dependencies
What it is and what it does
charmcraftlocal is a build-time helper for Juju charm projects that use Poetry to manage Python dependencies. It solves the problem that charmcraft can only access files in the charm's own directory during packing, preventing it from directly including local Python packages from sibling directories in a monorepo. The tool searches a charm's pyproject.toml for local dependencies, copies them into the charm directory, and updates Poetry's lock files so the build succeeds.
It provides two main commands: `ccl pack` copies local packages and calls charmcraft, while `ccl update-lock` updates Poetry metadata during the build process. For projects with multiple charms sharing code, it also offers `ccl mirror` to create separate git repositories that meet standard tooling expectations, using git-filter-repo to preserve history while keeping pyproject.toml and poetry.lock in sync.
Use it for:
- Build a Juju charm in a monorepo where multiple charms share a common Python library in a sibling directory.
- Automate charm packing in CI/CD pipelines that expect charmcraft pack to work without manual dependency copying.
- Create mirror repositories for individual charms that maintain commit history while isolating local dependencies.
- Develop charms with Poetry-managed dependencies that reference local packages via path dependencies.
- Integrate charm builds into existing tooling that expects one charm per git repository at the root.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Packs Juju charms with local Python package dependencies by copying them into the charm directory and updating Poetry lock files before building.
Yes, if you are building Juju charms with Poetry in a monorepo or multi-charm structure. The tool directly solves a real constraint of charmcraft and is actively maintained. However, verify the license status before use in proprietary contexts, and confirm your charm project uses Poetry—it is not a general-purpose charm builder.
Install
charmcraftlocal on PyPI
pip
pip install charmcraftlocaluv
uv add charmcraftlocalpoetry
poetry add charmcraftlocalInstalling charmcraftlocal
Before you install
Low friction install via pipx or uv. Active maintenance with recent releases. Six runtime dependencies (pyyaml, requests, rich, tomli, typer, charm-refresh-build-version) are all standard utilities with broad ecosystem support.
License in practice
License status is unclear—no SPDX identifier or raw license text is available. Verify the actual license before using in proprietary or restricted contexts.
Quickstart
pipx install charmcraftlocal
charmcraftlocal pack
# or within charmcraft.yaml:
charmcraftlocal update-lock -v
Requires Python >=3.10. Designed for charms managed with Poetry; non-Poetry charms are not currently supported.
Verify before relying
- Whether the package works with charm projects outside monorepo structures or single-charm repositories.
- Performance characteristics when handling large numbers of local dependencies or deeply nested package structures.
- Compatibility with Poetry versions beyond what the description implies.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — charm-refresh-build-version, pyyaml, requests, rich, tomli, typer |
| Maintenance | actively maintained — 65 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,197/month — #14,019 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: charmcraftlocal-0.4.0-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
charm-refresh-build-versionWrites charm version information into…
unclear · top 15,000 on PyPI
charmcraftcacheAccelerates charmcraft builds by…
unclear · top 15,000 on PyPI
data-platform-helpersProvides version checking and validation…
permissive · top 15,000 on PyPI
coslProvides utilities for COS Lite charms,…
permissive · top 15,000 on PyPI
poetry-multiproject-pluginA Poetry plugin that enables building and…
permissive · top 15,000 on PyPI
opsA Python framework for developing…
permissive · top 15,000 on PyPI
charmlibs-pathopsProvides a pathlib-like interface for reading…
permissive · top 15,000 on PyPI
poetryPoetry is a dependency management and packaging…
permissive · top 1,000 on PyPI
poetry-corepoetry-core is a PEP 517 build backend that…
permissive · top 1,000 on PyPI
jujuA Python library providing asynchronous…
permissive · top 15,000 on PyPI