`charmcraft pack`


charmcraft pack [options]


Build and pack a charm operator package or a bundle.

You can juju deploy the resulting .charm or bundle’s .zip file directly, or upload it to Charmhub with charmcraft upload.

For the charm you must be inside a charm directory with a valid metadata.yaml, requirements.txt including the ops package for the Python operator framework, and an operator entrypoint, usually src/charm.py. See charmcraft init to create a template charm directory structure.

For the bundle you must already have a bundle.yaml (can be generated by Juju) and a README.md file.


-h, --help Show this help message and exit
-v, --verbose Show debug information and be more verbose
-q, --quiet Only show warnings and errors, not progress
--verbosity Set the verbosity level to ‘quiet’, ‘brief’, ‘verbose’, ‘debug’ or ‘trace’
-p, --project-dir Specify the project’s directory (defaults to current)
--format Produce the result formatted as a JSON string
--debug Launch shell in build environment upon failure
--destructive-mode Pack charm using current host which may result in breaking changes to system configuration
--shell Launch shell in build environment in lieu of packing
--shell-after Launch shell in build environment after packing
--bases-index Index of ‘bases’ configuration to build (can be used multiple times); defaults to all
--force Force packing even after finding lint errors
--measure Dump measurements to the specified file

See also:

  • analyze
  • clean
  • init
  • version

Last updated 11 months ago.