dilnaka-cli
v0.0.2
Published
Command line interface for Dilnaka Cloud — manage projects and connect to your databases without exposing them to the internet.
Maintainers
Readme
Dilnaka Cloud CLI
Command line interface for Dilnaka Cloud. Manage your projects from a terminal and — once the tunnel ships — reach your databases without ever exposing them to the internet.
npm install -g dilnaka-cli
dilnaka loginOr without installing:
npx dilnaka-cli loginRequires Node.js 18.17 or newer. Zero runtime dependencies.
Commands
| Command | What it does |
| --- | --- |
| dilnaka login | Authenticate this machine (device flow — approve in your browser) |
| dilnaka logout | Remove the stored credential from this machine |
| dilnaka whoami | Show the account and token this machine uses |
| dilnaka status | Show server, session, and linked project |
| dilnaka list | List your projects and their services (--json for scripts) |
| dilnaka link [project] | Link the current directory to a project |
How login works
The CLI never asks for your password and never asks you to paste a token.
dilnaka loginasks the control plane to open a login request and prints a short code such asABCD-EFGH.- Your browser opens
/dashboard/account/tokenswith that code prefilled. You are already signed in there, so approving is one click. - The CLI, which has been polling, receives a personal access token and stores
it in
~/.dilnaka/config.jsonwith0600permissions.
Approval is the only place your identity enters the flow, and it happens in a signed-in browser session. A code on its own grants nothing.
Revocation is immediate. Every request re-checks the token against the
server, so revoking one from the dashboard stops that machine on its next
command. dilnaka logout only deletes the local copy — to kill a lost laptop's
access, revoke the token in the dashboard.
Linking a directory
dilnaka link writes .dilnaka.json next to your code:
{
"projectId": "clx…",
"projectName": "commerce-api"
}It holds no secret, so commit it — a teammate who clones the repo inherits the
link. Commands search parent directories for it, the way git finds .git.
Configuration
| Variable | Purpose |
| --- | --- |
| DILNAKA_API_URL | Point at a different control plane (self-hosted, local dev) |
| DILNAKA_TOKEN | Use this token instead of the stored one — for CI |
| NO_COLOR | Disable coloured output |
For CI, create a token from Dashboard → Account → CLI Tokens and expose it as
DILNAKA_TOKEN. No dilnaka login step is needed.
Development
npm install
npm run build
DILNAKA_API_URL=http://localhost:5090 node dist/index.js statusnpm run typecheck type-checks without emitting. The source is TypeScript
compiled to ESM; dist/ is what ships.
Roadmap
Shipped here is the identity layer. Next:
dilnaka connect <db>— a local port tunnelled to your database, so database ports can stop being open to the internetdilnaka variables/dilnaka run— read service variables, run a command locally against themdilnaka logs -f,dilnaka redeploydilnaka shell— an interactive shell in a running containerdilnaka up— deploy the current directory
