CLI reference
Use the CLI to develop, deploy, configure, and operate an App. Start with the
quick start for installation, or run cantelop --help
for the command overview.
Project#
Project commands read cantelop.json, compile the App definition it names
(src/cantelop.ts by default), and use the App name declared there. Use
-config PATH when the manifest is elsewhere; paths in it are relative to
that file. When the definition exports more than one App, dev, build,
deploy, and doctor take --app NAME.
For the optional Dockerfile and its build context, see Session runtime configuration.
cantelop init -app SLUG -provider openai|claude|picreatescantelop.json, the App definitionsrc/cantelop.ts, the runtimesrc/agent.ts, andpackage.json. The provider is required. It needs no login and refuses to overwrite files. Install the supported SDK 1.0 afterwards withnpm install @cantelop/sdk. With CLI 0.15.2, add the inline message type shown in the quick start before runningdev.cantelop devserves the App at127.0.0.1:8787, rebuilds after edits, and records a local credential in the SDK'slocalprofile.-portchanges the port,-env-filechooses a local environment file, and--containerruns Sessions in Docker. Restart container mode after edits.cantelop buildbuilds the generated Edge Worker and Linux runtime image locally. It does not require login or upload anything.cantelop doctorchecks the toolchain, project, authentication, and required production configuration. It runs every check and exits non-zero on failure.cantelop deploybuilds, uploads, and creates a release.--dry-runstops after the build;--create-appallows creation of a missing App without an interactive prompt;--env-file .envimports the App's declared variables and secrets first.cantelop env syncimports the declared variables and secrets from.env(or--env-file) without deploying.--dry-runshows names only.
Operations#
These commands use the project's App and accept --json.
logs --follow --json emits one event per line; finite commands return one
document.
cantelop routeslists the routes the live release serves (one/commands/*path per SDK command, the homepage, and declared webhooks) with their traffic, as on the App's Ingress page.cantelop routes --openapi > openapi.jsonwrites them as an OpenAPI 3.1 document. It describes methods and paths only.cantelop logs --followtails completed-request events with status, duration, Session, and Workspace. Omit--followfor a single read.cantelop session listlists Sessions and their states.cantelop session inspect SESSION_IDshows one Session's details.cantelop session terminate SESSION_IDreleases its Sandbox. The Session remains reusable and Workspace files persist.cantelop releaseslists releases newest first.cantelop rollbackactivates the newest superseded release. It refuses to race a deployment still being provisioned.cantelop database migrations WORKSPACE_IDshows the system and application migrations applied to one Workspace's database.
Resources#
Resource commands take generated App IDs instead of using the project manifest.
cantelop app listlists your Apps and their IDs.cantelop app inspect APP_IDshows an App, its Workspaces, and active release.cantelop app create -slug SLUGcreates an App athttps://<slug>.cantelop.dev.cantelop app archive APP_IDremoves the App and its Workspaces from product reads and queues cleanup. Local project files remain untouched.cantelop app env set APP_ID NAME=VALUEsets a variable. Useenv list APP_IDto read values andenv unset APP_ID NAMEto remove one.cantelop app secret set APP_ID NAMEreads a secret from stdin. Usesecret list APP_IDto list names andsecret unset APP_ID NAMEto remove one. Values are never returned.cantelop app deploy APP_ID -image IMAGE -artifact DIRECTORYdeploys artifacts built by your own automation.cantelop app credentials [--app APP]prints the credentials a hosted backend uses to call the App, as dotenv (default), aCANTELOP_APP_CONFIGdocument (--format app-config), or the bare token (--format token).cantelop app credentials rotate [--app APP]issues a new token. The previous one keeps working for--grace(24h by default, at most 168h), or stops at once with--now.
Variables and secrets are shared by the Edge Worker's webhooks and homepage and by newly started Sessions. See environments for local defaults and production checks.
Account#
cantelop loginopens browser authorization and stores the CLI credential with mode0600.-console ORIGINselects another console;CANTELOP_CONFIGoverrides the credential file path.cantelop versionprints the CLI version and source commit.-vis an alias.cantelop --helpshows command groups and common examples.helpand-hare aliases.
Uninstall#
Stop any running cantelop dev process first. For a Homebrew installation,
run brew uninstall cantelop. For the alternative installer, remove only the
cantelop executable in ~/.local/bin, or the custom CANTELOP_INSTALL_DIR
you selected. Do not remove the whole directory, which may contain other tools.
If an earlier installer edited your shell profile, remove the line marked
# added by cantelop installer from .zshrc, .bashrc, .bash_profile,
.profile, or the fish configuration file conf.d/cantelop.fish, as appropriate.
Keep any PATH entries needed by your other software.
Uninstalling the CLI does not delete local projects, saved credentials, or
hosted Apps and Workspaces. Use cantelop app archive APP_ID before uninstalling
if you want to archive a hosted App and queue its cleanup.