Command-line tools

Workshop works through four command-line tools, each aimed at a different audience and stage of the workflow. workshop and sdk are the everyday tools for people working in workshops. sdkcraft, shipped as its own snap, is the SDK-author tool that publishers run on their workstation. workshopctl is an in-workshop helper that SDK hooks invoke to report state back to the daemon.

workshop

workshop is the daily go-to instrument for regular users, with a set of commands that govern the entire lifecycle of a workshop.

There are several categories of commands that vary by their purpose:

Actions

Commands

What they do

Create, update, delete

init, launch, refresh, remove, restore, start, stop

Create a workshop definition, then govern the workshop’s existence and runtime state, from first launch to refresh, restore, and removal.

Customize

sketch-sdk, sketches

Augment a workshop with project-specific customizations through sketch SDKs.

Enumerate

info, list

List the workshops in a project and inspect their current details.

Track changes

changes, tasks

Review recent changes to the workshops in a project and the tasks that make up each change.

Manage connections

connect, connections, disconnect, remount

Wire interface plugs and slots between SDKs, list existing connections, and remount their sources.

Run shell commands

exec, shell

Run an ad-hoc command in a workshop or open an interactive shell inside it.

Run named actions

actions, run

List and invoke the named actions defined in a workshop’s actions: section.

Manage warnings

okay, warnings

List warnings raised by the daemon and acknowledge them.

Note

workshop talks to the Workshop daemon, workshopd, via a REST API, so alternatives are possible and, in fact, encouraged.

sdk

sdk makes it easy to find and learn more about the SDKs available to you. Like workshop, it talks to the Workshop daemon, workshopd, over a REST API.

There is one category of commands:

Actions

Commands

What they do

Discover

find, info, list

Search the SDK Store, enumerate the SDKs available on your machine, and inspect their details.

sdkcraft

sdkcraft is what an SDK publisher uses on their workstation to scaffold, build, test, try, and publish SDKs to the SDK Store.

There are several categories of commands that vary by their purpose:

Actions

Commands

What they do

Lifecycle

build, clean, pack, prime, pull, stage, test, try

Work through the parts-based build pipeline to produce an SDK artefact and try it locally before publishing.

Store

create-track, register, release, revisions, upload

Claim an SDK name, manage its tracks, upload artefacts, and list or release revisions to channels.

Store account

login, whoami

Authenticate against the SDK Store and inspect the active identity.

Other

init, version

Bootstrap a new project layout and report the installed SDKcraft version.

Note

SDKcraft is a separate snap, installed independently of Workshop. See the SDKcraft repository for installation and release notes.

workshopctl

workshopctl reports SDK state back to the Workshop daemon over a restricted socket. SDK hooks invoke it from inside a running workshop; it is not intended for end users to call directly.

There is one category of commands:

Actions

Commands

What they do

Report SDK health

set-health

Let the daemon know whether the SDK is okay, waiting, or in an error state, with an optional machine-readable error code and a human-readable message.

Note

workshopctl only works from an SDK hook context, where the daemon supplies a context cookie via the WORKSHOP_COOKIE environment variable. Running it from an interactive shell returns cannot invoke workshopctl operation commands ... from outside of a workshop.

See also

Reference:

Tutorial: