`charmcraft create-lib`


charmcraft create-lib [options] <name>


Create a charm library.

Charmcraft manages charm libraries, which are published by charmers to help other charmers integrate their charms. This command creates a new library in your charm which you are publishing fo r others.

This command MUST be run inside your charm directory with a valid metadata.yaml. It will create the Python library with API version 0 initially:


Each library has a unique identifier assigned by Charmhub that supports accurate updates of libraries even if charms are renamed. Charmcraft will request a unique ID from Charmhub and initial ise a template Python library.

Creating a charm library will take you through login if needed.


-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

See also:

  • close
  • fetch-lib
  • list-lib
  • login
  • logout
  • names
  • publish-lib
  • register
  • register-bundle
  • release
  • resource-revisions
  • resources
  • revisions
  • status
  • upload
  • upload-resource
  • whoami

Last updated 7 months ago.