Documentation / CLI

Darwa CLI

Everything currently available from the Darwa terminal client—using real commands and the same plans and permissions enforced by the dashboard.

CLI 0.2.0Node.js 20+macOS + LinuxUpdated 7 Sep 2026

Install

Install with Homebrew on macOS, or use the published npm release on macOS and Linux.

terminal
brew install haqiq-app/tap/darwa

# Alternative release
npm i -g https://github.com/haqiq-app/darwa-cli/releases/download/v0.2.0/darwa-cli-0.2.0.tgz

darwa --version
darwa update --check
darwa update

Secure sign-in

darwa login opens the Darwa approval page and returns a one-time authorization code to a random 127.0.0.1 port. PKCE and state verification bind that response to the CLI that started the request. Your password never enters the terminal.

CommandScopeWhat it does
darwa loginsame deviceOpen browser authorization with a protected localhost callback
darwa login --remoteanother deviceUse a separate one-time browser code and secure WebSocket approval
darwa login --forcecurrent deviceReplace an existing CLI session
darwa whoamiaccountShow the account connected to this terminal
darwa logoutcurrent deviceRevoke the local session and remove its saved credential
terminal
darwa login

# Browser is on another device
darwa login --remote

# Replace the current session
darwa login --force
Security

CLI sessions expire after six hours and appear in Dashboard → Settings → Security, where they can be revoked at any time. Authorization codes are short-lived, single-use, and stored only as hashes.

AI Deployment Copilot

Live inventory answers are free. Model-backed conversation and deployment analysis are opt-in: the CLI asks before the first charge, non-interactive use requires --yes, and every paid reply prints the exact charge and remaining wallet balance. Darwa AI is read-only and receives only a bounded, sanitized workspace snapshot.

CommandScopeWhat it does
darwa ai chatlive workspaceOpen an interactive assistant with resource-aware selection menus
darwa ai chat "<question>"live workspaceAsk one question from a terminal or script
darwa ai modelsmodel catalogCompare available models and see the workspace default
darwa ai model selectAI creditsSelect the default model used by workspace AI operations
darwa diagnose <service>latest deploymentExplain the likely cause, evidence, and recommended actions
darwa ai diagnose <service>latest deploymentRun the same read-only diagnosis through the AI command group
darwa deploy --aifailed deploymentOffer diagnosis only if the new deployment fails
darwa ai workspaceworkspace telemetryPrioritize reliability, security, capacity, performance, and cost signals
darwa ai creditsworkspace walletShow balance, lifetime usage, and recent credit activity
darwa ai usage --days 30workspace walletShow requests, tokens, models, and credit cost for 7–90 days
terminal
darwa ai chat

you › Are any Frontend Cloud builds failing?

darwa deploy . --project storefront --ai

# CI: explicit consent without an interactive prompt
darwa deploy . --project storefront --ai --yes

darwa diagnose storefront
darwa ai workspace
darwa ai credits
darwa ai usage --days 30
Read only

Diagnosis never edits source, changes a paid plan, executes commands, or redeploys. Environment values are redacted before logs reach the model; only configured variable names are included.

Active product coverage

ProductCLI workflowAI-credit behavior
Web HostingPlans, websites, terminal, and File ManagerDeployment diagnosis when backed by a runtime project
Web ServicesProjects, services, GitHub, and deploysSanitized deployment diagnosis
Frontend CloudDeploy to an existing frontend serviceFailed build diagnosis
DatabasesInventory and PostgreSQL migrationWallet is shared with dashboard database AI
AI AgentsCatalog, plans, slots, and installationWallet remains separate from agent hosting plans
AI CreditsBalance, activity, and usage reportingExact per-request charge and remaining balance

Plans through the CLI

The CLI reads the current catalog from Darwa instead of embedding prices or capacity. Checkout is created by the backend and completed on Stripe. Ownership, available slots, plan compatibility, and capacity are checked again before provisioning.

CommandScopeWhat it does
darwa hosting planWeb HostingSelect and purchase an available Web Hosting plan
darwa agents catalogAI Agent catalogShow verified agents and each recommended plan
darwa agents catalog --plan <code>AI Agent planCheck which agents fit a specific current plan
darwa agents plan --plan <code>AI Agent planOpen checkout for a new compatible agent slot
darwa agents plan --term 1|12|24billing termChoose a supported billing term
terminal
darwa hosting plan

darwa agents catalog
darwa agents catalog --plan individual
darwa agents plan --plan startup --term 12

# Print checkout without opening it
darwa agents plan --plan startup --term 12 --no-browser --no-wait

Web Hosting

CommandScopeWhat it does
darwa hostingworkspaceList plans and websites, then open the interactive hosting console
darwa hosting addavailable planCreate a website in an unused hosting slot
darwa hosting planbillingPurchase another hosting plan through secure checkout
darwa shell <website>one websiteOpen an approved 15-minute server terminal
darwa files <website>one websiteOpen File Manager with a scoped 15-minute grant

AI agents

CommandScopeWhat it does
darwa agents listworkspaceShow purchased plans, free slots, and installed agents
darwa agents catalogcatalogList verified agents and capacity requirements
darwa agents install <agent>agent slotValidate compatibility and provision one verified agent
darwa agents planbillingPurchase an AI Agent plan
terminal
darwa agents list
darwa agents catalog --plan individual
darwa agents install n8n --name automation --slug automation

Resources and databases

CommandScopeWhat it does
darwa listworkspaceShow hosting purchases, domains, databases, and applications
darwa list --jsonworkspaceReturn the same inventory as machine-readable JSON
darwa databases listworkspaceList managed databases
darwa databases migrate [directory]databaseDiscover a local PostgreSQL source and upload a private dump
terminal
darwa list --all
darwa databases list
darwa databases migrate . --to production-db --replace

Projects and services

CommandScopeWhat it does
darwa projects listworkspaceList projects and their service totals
darwa projects create <name>workspaceCreate a project
darwa projects show <project>projectInspect one project and its services
darwa projects delete <project> --yesprojectDelete a project after explicit confirmation
darwa services listworkspaceList deployable services
darwa services create <name> --repo <owner/repo>projectCreate a GitHub-backed service
darwa services show <service>serviceInspect runtime, source, region, status, and URL
darwa services delete <service> --yesserviceDelete one service after explicit confirmation

GitHub

CommandScopeWhat it does
darwa github statusworkspaceShow the connected GitHub account
darwa github connectworkspaceOpen GitHub authorization
darwa github repossourceList repositories available to the installed GitHub app
darwa github disconnect --yesworkspaceRemove the source connection

Local deploys

Run from a website directory. Darwa packages the source, enforces archive limits, uploads it privately, and waits for the deployment unless --no-wait is supplied.

terminal
darwa deploy
darwa deploy . --project storefront-web
darwa deploy . --clear-cache --no-wait

Configuration

LocationPurposeCommit?
~/.config/darwa/config.jsonLocal API endpoint and revocable CLI sessionNo
darwa.jsonLinks a directory to a Darwa project or serviceYes
.darwaignoreExcludes files from deployment archivesYes

Use DARWA_API_URL, DARWA_WEB_URL, and DARWA_CONFIG_DIR only when overriding defaults for development or automation.