@applet-one/cli
v0.2.3
Published
Create, deploy, and manage Cloudflare Worker apps with Applet
Maintainers
Readme
Applet CLI
Create, deploy, and manage apps with Applet.
Install
npm install -g @applet-one/cliRequires Node.js 20 or newer. The CLI and its Miniflare/workerd runtime are the only requirements for Applet development and deployment; pnpm is only used to run the starter scripts. Wrangler is optional for direct Cloudflare deployment.
Quick start
applet init my-app
cd my-app
pnpm install
pnpm devTo scaffold into the current directory instead, run applet init . from a folder where the starter's files do not already exist; the folder name becomes the app name.
Sign in and deploy:
applet login
applet deployCommands
applet init <project-name|.>— create a starter project;.scaffolds the current directory (using its folder name as the app name) if the generated paths are unused.applet migrate-config— split a legacy combinedapplet.jsoncinto standardwrangler.jsoncand Applet-only hosting settings. Preserves the original asapplet.legacy.jsonc; refuses conflicting Wrangler files or an existing backup. Local only; no login or deployment needed.applet version/applet --version— print the installed CLI version.applet login— authenticate with Applet.applet logout— sign out and remove the saved login.applet status [--json]— check authentication status;--jsonemits a machine-readable result.applet dev [--host HOST] [--port PORT]— run the Worker locally on Miniflare/workerd; local Durable Object state persists under.applet/dev. Restart the command after source changes.applet build --dry-run— validate configuration and build an artifact summary without uploading.applet deploy— build and deploy the project in the current directory fromwrangler.jsonc(orwrangler.json) plus optional hosting settings inapplet.jsonc. Legacy combined configurations still work. Applet assigns a generated URL such ashttps://bright-otter.applet.worksand reapplies hostingaccess(legacy:applet.access) (publicby default) even if the dashboard was changed since the last deployment.applet access— show local and live access.applet access privatechanges both JSONC and the live app;applet access public --yesdoes likewise after explicit confirmation. Before first deployment the command changes JSONC only. Opening a private app URL in a browser redirects to Applet sign-in when needed. API requests without an app-host session receive 401; CLI tokens cannot make general runtime requests.- Direct Cloudflare deployment remains available with Wrangler:
wrangler deploy. Wrangler is not needed for Applet-managed deployment. applet logs [--limit N]— show the latest 1–100 deployed-app log entries from the last 24 hours (default 100), in time order. Includes deployment outcomes (deployment:), runtime logs, and dispatch failures; it does not live-tail or showapplet devoutput. A successful deployment creates an entry even before the app handles a request. Deployment entries come from Applet's deployment records, not Cloudflare Workers Logs. Log collection begins on deployment after Applet enables observability; earlier events cannot be recovered. Cloudflare retains Workers Logs for 3 days on Free or 7 days on Paid. Your app's console messages may contain sensitive data; avoid logging credentials or personal information.applet backup— download the app's configured state backup. The project must enable top-levelbackupinapplet.jsonc(legacy:applet.backup) and be redeployed after enabling it; exports are currently limited to 10 MiB.applet delete [app-name] [--yes] [--no-input]— permanently delete a named hosted app from any directory, or omit the name to use the current project's app. Without--yes, the CLI asks for confirmation;--no-inputdisables prompting and requires--yes.
Worker fields belong only in Wrangler configuration; applet.jsonc contains only access, backup, and optional $schema. Without hosting settings, deployment defaults to public access and no backups. Direct Wrangler deployments do not enforce Applet private access or include its backup helper. Wrangler TOML and environment resolution are not supported by Applet yet; using Wrangler configuration does not provide full Wrangler feature parity. See docs/applet-project-config-v1.md for capabilities and migration details.
App names are not hostname labels. Use the generated URL printed after deployment or returned by the app API.
Set APPLET_API_URL to use a non-default Applet API endpoint.
