skillfed

charmcraftlocal

Pack charms with local Python package dependencies

charmcraftlocal v0.4.0 84.2K downloads/30d#14,019 on PyPI0
License unclear Active released

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 charmcraftlocal

uv

uv add charmcraftlocal

poetry

poetry add charmcraftlocal

Installing 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

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

charm packaging with local dependenciesjuju charm build local python packagespoetry local package charm packingcharmcraft local dependency managementcharm monorepo shared code packaging
juju-charmpoetry-integrationmonorepo-tooling

More Build Tools packages