LinuxCommandLibrary

charm

Deploy and manage applications with Juju

TLDR

Backup your Charm account keys

$ charm backup-keys
copy

Backup Charm account keys to a specific location
$ charm backup-keys [[-o|--output]] [path/to/output_file.tar]
copy

Import previously backed up Charm account keys
$ charm import-keys "[charm-keys-backup.tar]"
copy

Find where your cloud.charm.sh folder resides on your machine
$ charm where
copy

Start your Charm server
$ charm serve
copy

Print linked SSH keys
$ charm keys
copy

Print your Charm ID
$ charm id
copy

SYNOPSIS

charm [options] <command> [<args>]

PARAMETERS

-h, --help
    Show context-sensitive help.

-v, --verbose
    Increase log verbosity.

--quiet
    Silence non-error logs.

--log-level {debug,info,warning,error}
    Set explicit log level.

--version
    Display charm tool version.

DESCRIPTION

The charm command is a specialized CLI tool from Canonical for handling Juju charms, which are portable YAML bundles defining application deployment, configuration, and scaling logic on Juju's model-driven platform. It supports the full charm lifecycle: validating structure and content with charm proof, packaging into distributable .charm files via charm pack, inspecting metadata (charm info), and publishing to the Charm Store (charm upload or charm release).

Key capabilities include linting for syntax errors, checking hook scripts, verifying interfaces and relations, and generating documentation. Developers use it to ensure charms meet store policies before deployment on clouds like AWS, Azure, or Kubernetes. It integrates with snaps for operator charms and supports version control workflows.

Primarily for DevOps and platform engineers in the Ubuntu/Juju ecosystem, charm streamlines creating reusable software appliances. Install via snap for cross-distro compatibility, though classic confinement is required for full access.

CAVEATS

Requires snap install charm --classic; classic confinement needed for file access. Legacy for charm v1; use charmcraft for modern operator charms.

COMMON SUBCOMMANDS

proof: Validate charm.
pack: Bundle into .charm file.
upload: Publish to store.
info: Show metadata.

QUICK START

charm proof ./my-charm/
charm pack ./my-charm/ --release

HISTORY

Launched ~2016 by Canonical for Juju v2 charm ecosystem. Evolved with charm stores and operators; largely superseded by charmcraft post-2020 for libjuju/operator format.

SEE ALSO

juju(1), snap(8), charmcraft(1)

Copied to clipboard