Sign in
Almost every CLI command talks to the Dina platform on your behalf, so the CLI needs to know who you are. Signing in is a one-time step per machine.
Signing in
dina auth login
What happens:
- The CLI contacts the Dina platform to discover the login server.
- If a browser is available, it opens a login page and waits for you to approve the connection.
- If no browser is available (you’re on a headless server or over SSH), the CLI prints a short code and a URL you can visit from any other device.
Once approved, the CLI prints the expiry time of your new session. You’re ready to run any other command.
Checking whether you’re signed in
dina auth status
You’ll see one of two things:
- Authenticated — the CLI tells you when the current token expires and which API it’s pointed at.
- Not authenticated — the CLI tells you to run
dina auth login.
For scripts, pass --output json to get a machine-readable payload:
dina auth status --output json
Signing out
dina auth logout
This deletes the saved credentials. You can sign back in with dina auth login whenever you’re ready.
Where credentials are stored
The CLI stores a single file at:
~/.config/dina/auth.json
It’s readable only by your user account. If you’re setting up a shared machine or CI runner, don’t share this file — every user or runner should sign in separately.
Do I always need to sign in?
A few commands work without authentication:
dina version,dina update,dina doctor,dina install— these only touch your local machine.dina feedback bug— so you can report problems even when sign-in itself is broken.
Everything else (deploying, managing apps, reading logs, adding domains) requires you to be signed in first.
Troubleshooting
“Not authenticated” even after signing in. Run dina doctor. It checks for expired tokens and missing credential files, and tells you what to do.
Login tab didn’t open. Try running the command again with --debug to see where it’s stuck, or check whether your terminal session is able to launch a browser. On a headless machine, the CLI should fall back to the device code flow automatically — copy the URL it prints and open it somewhere else.
Still stuck? Send a bug report. You don’t need to be signed in to do that.