Skip to content

CLI reference

detpul — deploy and watch logs from the terminal. There are five commands.

Installation

The CLI isn't published as a separate npm package yet — it's built from the DETPUL monorepo. Install from source:

pnpm --filter @detpul/cli build
cd apps/cli && npm link   # 'detpul' komutunu global PATH'e ekler

You can also run it directly without npm link: node apps/cli/dist/index.js --help.

Auth and target API

DocsCli.auth.body1

Auth and target API priority order
OptionDescription
--token / DETPUL_TOKENAPI key (use this instead of config).
--api-url / DETPUL_API_URLControl plane API address.

You create an API key from the Dashboard → API Keys page; the token is shown only once, at creation time.

detpul login

Logs in with an API key and saves it to ~/.detpul/config.json.

detpul login options
OptionDescription
--token <token>API key (detpul_sk_...) — if omitted, you're prompted for a hidden (not echoed to the terminal) login.
--api-url <url>Control plane API address.

Example

$ detpul login
API key: ****************************
Giriş başarılı: sen@example.com

detpul logout

Removes the saved session (API key) from the local config. No options.

$ detpul logout
Çıkış yapıldı.

detpul whoami

Shows the email of the logged-in user — the fastest way to test whether your key is still valid.

detpul whoami options
OptionDescription
--token <token>API key (use this instead of config).
--api-url <url>Control plane API address.

Example

$ detpul whoami
sen@example.com

detpul deploy

Builds and deploys the connected repo. --project and --repo are required. See the Deploy page for repo requirements.

detpul deploy options
OptionDescription
--project <slug>Project slug, name, or id (required).
--repo <url>The repo URL to deploy — https git (required).
--port <port>Container port. Default: 3000.
--followPolls status until the deploy reaches LIVE/FAILED (every 2.5s).
--token <token>API key (use this instead of config).
--api-url <url>Control plane API address.

Example — build from repo + follow

$ detpul deploy --project my-app --repo https://github.com/kullanici/my-app.git --follow
Deploy kuyruğa alındı: cknj1a2b3c (QUEUED)
Durum: BUILDING
Durum: DEPLOYING
Durum: LIVE
Canlı: http://cknj1a2b3c.detpul.app

detpul logs [deploymentId]

Streams the deploy's runtime logs (SSE). If no deployment id is given, --project is used to pick that project's most recent deploy. Without -f, it takes a ~3-second snapshot and exits.

detpul logs options
OptionDescription
--project <slug>Project slug, name, or id (used when deploymentId isn't given).
-f, --followFollow live — exit with Ctrl+C.
--token <token>API key (use this instead of config).
--api-url <url>Control plane API address.

Example

detpul logs --project my-app -f
All commands use the same error format: if there's a server error, the message is printed to the terminal as-is, and the process exits with code 1.
CLI Reference — DETPUL Docs