Snapcraft commands

Lifecycle

Lifecycle commands can take an optional parameter <part-name>. When a part name is provided, the command applies to the specific part. When no part name is provided, the command applies to all parts.

build

Build artifacts defined for a part.

clean

Remove a part’s assets.

pack

Create the final artifact.

prime

Prime artifacts defined for a part.

pull

Download or retrieve artifacts defined for a part.

remote-build

Build a snap remotely on Launchpad.

snap

Create the final artifact.

stage

Stage built artifacts into a common staging area.

try

Prepare a snap for “snap try”.

Plugins

list-plugins

List available plugins, optionally for a given base.

plugins

List available plugins, optionally for a given base.

Extensions

expand-extensions

Expand extensions in snapcraft.yaml.

extensions

List available extensions for all supported bases.

list-extensions

List available extensions for all supported bases.

Other

init

Create an initial project filetree.

lint

Lint a snap file.

version

Show the application version and exit.

Store account

export-login

Log in to the Snap Store exporting the credentials.

login

Log in to the Snap Store.

logout

Clear Snap Store credentials.

whoami

Get information about the current login.

Store key management

create-key

Create a key to sign assertions.

list-keys

List the keys available to sign assertions.

register-key

Register a key to sign assertions with the Snap Store.

sign-build

Sign a built snap file and assert it using the developer’s key.

Store snap names

list

List the names registered to the logged-in account.

list-registered

List the names registered to the logged-in account.

metrics

Get metrics for a snap.

names

List the names registered to the logged-in account.

register

Register <snap-name> with the store.

upload-metadata

Upload metadata from <snap-file> to the store.

Store snap release management

close

Close <channel> for <snap-name> in the store.

list-revisions

List published revisions for <snap-name>.

promote

Promote a build set from a channel.

push

Upload a snap to the Snap Store.

release

Release <snap-name> to the store.

revisions

List published revisions for <snap-name>.

status

Show the status of a snap in the Snap Store.

upload

Upload a snap to the Snap Store.

Store snap tracks

list-tracks

Show the available tracks for a snap in the Snap Store.

set-default-track

Set the default track for a snap.

tracks

Show the available tracks for a snap in the Snap Store.

Store validation sets

edit-validation-sets

Edit the list of validations for <snap-name>.

gated

List all gated snaps for <snap-name>.

list-validation-sets

Get the list of validation sets.

validate

Validate a gated snap.

Store registries

edit-registries

Edit or create a registries set.

list-registries

List registries sets.