Docs chevron_right Operate cpak

CLI reference

The current commands for packages, instances, development, storage, and system integration.

CLI reference

Run cpak <command> --help for the flags accepted by the installed build. The tables below describe the current user-facing command surface.

Package lifecycle

CommandPurpose
installInstall a package from a Git origin.
runInstall when needed, start the environment, and launch a binary.
listList installed packages. Accepts --json.
updateUpdate one package or every installed package.
rollbackRestore the previous installed version.
removeRemove one installed package and its owned runtime resources.
extractExport a resolved package as a tar archive.
aliasSet, remove, or list local origin aliases.

Install, run, remove, stop, and shell accept branch, release, or commit selectors where applicable. Without a selector, remove uses the source of the sole installed copy. It refuses to choose when several copies of the same origin are installed.

cpak remove retains private application data and persistent file grants. Add --purge to delete them with the package. Host files mounted through filesystem permissions are outside the purge scope.

Running instances

CommandPurpose
launchLaunch a command in the active package environment.
shellOpen an interactive shell in a package instance.
logsPrint or follow instance output.
stopStop a running instance.
psList runtime, process, health, age, and listener state.
statusShow runtime state for one package or named instance.
inspectReturn complete runtime state as JSON.
healthCheck runtime health and fail when it is not ready.
serviceManage persistent application services and boot restoration.
orchestrateStart several applications with ordering, health checks, and retries.
environmentManage named environments with persistent writable state.

Use --instance on supported commands to select a named instance of the same package.

cpak environment has its own create, list, inspect, shell, stop, delete, policy, permissions, processes, signals, signal, application-exports, export-application, and unexport-application actions. Read Persistent environments before using a distribution package as a mutable workspace.

cpak service provides enable, disable, remove, start, stop, restart, list, status, logs, setup, and restore. Read Persistent application services for declared commands, restart policies, dependencies, boot adapters, environment files, and secrets.

Package development

CommandPurpose
initGenerate a manifest v3 skeleton.
validateValidate cpak.json.
gen-schemaWrite the schema generated by the current runtime.
migrate-manifestConvert a v1 manifest to v2.
lockResolve manifests and OCI images into cpak.lock.json.
testInstall and check a local package in a temporary store.
devTest a local package and launch its selected binary.

test and dev accept --origin for relative dependencies and --lock for an explicit lock file.

Composition and policy

CommandPurpose
addonInspect addons and slots, select providers, or change activation.
overrideReplace one local permission value or edit the complete JSON.
grantList, manage, or revoke persistent file grants.
doctorReport host runtime capabilities.
auditCheck local store integrity and optionally repair it.

Use cpak addon slots and cpak addon providers to inspect provider state, then cpak addon use to select an exclusive provider. enable and disable remain available for explicit addon choices. JSON output is available for list, slots, and providers.

cpak update --non-interactive rejects updates that request additional permissions. JSON output is available for update, list, doctor, alias list, and garbage collection where shown by command help.

Storage

CommandPurpose
storageInspect, migrate, verify, or repair the active storage driver.
dedupDeduplicate equal files below a selected path.
gcReport or delete unreferenced layers and cache data.

Run cpak gc --json before cpak gc --apply when automating cleanup.

Runtime and registry access

CommandPurpose
authBind private source and registry access to one package origin.
completionGenerate completion definitions for Bash, Zsh, or Fish.
self-updateCheck for or install a newer official cpak binary.

Use cpak auth login, logout, list, or status to manage private package access. Read Private GitHub repositories and OCI registries before adding a separate token host.

Generate the definition for the active shell and load it through that shell's normal completion mechanism:

cpak completion bash > cpak.bash
cpak completion zsh > _cpak
cpak completion fish > cpak.fish

cpak self-update --check reports an available release and leaves the installed binary unchanged. Package-manager builds keep the version notice and delegate replacement to the system package manager. See Update the cpak runtime.

System integration and distribution

CommandPurpose
systemInstall or inspect the system authority and its enforced policies.
sessionManage desktop and kiosk login sessions from installed packages.
host-actionRequest one typed operation from an allowed host provider.
discoverProvide signed Store data and package actions to software centers.
verify-signatureVerify a publisher signature against one resolved package state.

discover is the machine interface used by software-center integrations. Use the normal install, remove, and Store interfaces for interactive package management. system and session may require Polkit confirmation; see System integration and Desktop and kiosk sessions.

cpak system provides setup, remove, and status for the system authority; read and write actions for enforcement, signatures, trust, and the permission ceiling; and explain and clear-removal for verified-launch recovery.

host-action is normally called by a package shim rather than by a person. Its provider, action, and arguments remain subject to the package's effective policy. See Host actions.

Projects and technologies around cpak