Loading...

CDN.com.tr Help

Use cdnctl

Operate accounts, container apps, imports, logs, jobs, and object storage from terminal or AI agents.

Use cdnctl

Operate accounts, container apps, imports, logs, jobs, and object storage from terminal or AI agents.

cdnctl command reference

Looking for every cdnctl command? The quick-start and the full command list live on a dedicated reference page.

cdnctl full command reference

Quick-start commands plus the full list of every command (accounts, container apps, addons, purge, object storage, jobs, logs) with their flags.

Open the full command reference →

Your AI built a working app — here is how it goes live

The story and the road: from a plain project folder to a live HTTPS URL, with real command output at every step.

Open the full command reference →

Panel path

  1. Management Panel
  2. Help
  3. Tools
  4. cdnctl usage guide

Prerequisites

  • cdnctl binary does not require PHP.
  • Login output does not return user id/email/account id.
  • Self update verifies checksums.

Step-by-step guide

1

Check cdnctl version

Before agent or terminal automation starts, the binary freshness is checked.

  • Run cdnctl update --check.
  • If update is available, run checksum-verified update.

Expected result: CLI returns JSON and update state is clear.

cdnctl equivalent
cdnctl update --check
cdnctl update --yes
2

Move panel workflow to terminal

cdnctl is the public API equivalent of the panel; it does not take over panel-only payment/card steps.

  • Log in.
  • List accounts.
  • Run the relevant product command.
  • Check JSON output for secret/id leakage.

Expected result: Terminal flow keeps the same ownership boundary as the panel customer surface.

cdnctl equivalent
cdnctl login --email "<email>" --password "<password>"
cdnctl accounts list
3

Publish a project folder with init → check → deploy

cdnctl init reads the project folder, detects the language and any local AI agents (Claude Code, Cursor and similar), and writes cdnctl.yaml plus a Dockerfile template if one is missing. No git repository and no container registry are required.

  • Run cdnctl init in the project folder and answer the short prompts.
  • If the account has no platform package yet, cdnctl prints the purchase link; cdnctl init --wait resumes automatically once payment completes in the panel.
  • Review the generated cdnctl.yaml before the first deploy.

Expected result: The folder contains cdnctl.yaml and a Dockerfile, and the account is ready for deploy.

cdnctl equivalent
cdnctl init
cdnctl init --wait
4

Run pre-flight checks before code leaves your machine

cdnctl check scans the project locally. Errors block the deploy: a server bound to localhost only, secrets committed in code, .env missing from the ignore files, host node_modules copied into the image. Warnings explain production risks such as SQLite on a single pod, a missing healthcheck, or a hard-coded port.

  • Run cdnctl check and fix the lines marked as errors.
  • Re-run until the summary is clean; warnings are advisory but worth reading.

Expected result: check exits clean; nothing has left your machine during this step.

cdnctl equivalent
cdnctl check
5

Give an AI agent deploy access — not your panel password

A deploy token is shown once, works for a single account, and only covers the deploy surface: upload, build, deploy, status and logs — no delete and no billing. cdnctl mcp exposes the same commands to local agents over MCP.

  • Create a token with cdnctl deploy-token create and store it as CDN_ACCESS_TOKEN in the agent environment.
  • Register cdnctl mcp in the agent's MCP configuration; the agent can then run check and deploy itself.
  • Revoke the token at any time with cdnctl deploy-token revoke.

Expected result: The agent deploys with the restricted token; panel login and payment stay with you.

cdnctl equivalent
cdnctl deploy-token create
cdnctl mcp

Verification

  • Command outputs are JSON and redacted.
  • Payment/card handling is outside cdnctl scope.
  • AI agents use public tools without kubectl or internal APIs.

Use cases

An AI agent performs the same migration steps the user can do in the panel after the user has completed package purchase and account assignment.

Quick workflow

  1. Verify the account has the required paid package.
  2. Run `cdnctl update --check`.
  3. Login.
  4. List/select account.
  5. Create/deploy resources.
  6. Read JSON status/logs.

Checks

  • JSON output masks sensitive fields.
  • Update verifies checksum before installing.
  • Commands have panel equivalents.
  • cdnctl docs do not ask agents to buy packages or handle payment cards.

Frequently asked questions

I lost my deploy token — can I see it again?

No. The plain-text token is shown only once at creation. Revoke it with cdnctl deploy-token revoke and create a new one; the old token stops working immediately.

The deploy says "Build failed" — where are the logs?

cdnctl deploy prints the build log when a build fails. The most common causes are a Dockerfile that copies host node_modules into the image and a dependency missing from the manifest — cdnctl check catches both before upload. Runtime logs: cdnctl container apps logs --app <app_uuid>.

Which port must my application listen on?

Listen on the port declared in cdnctl.yaml, on all interfaces (0.0.0.0). A localhost-only bind is flagged by cdnctl check, because platform traffic reaches the container from outside the loopback interface.