askdb-cli
v0.1.3
Published
Install and run a self-hosted AskDB instance, authenticated against your AskDB account.
Readme
askdb-cli
Installs and runs a self-hosted AskDB instance, authenticated against your AskDB account.
npm install -g askdb-cli
export ASKDB_IMAGE="ghcr.io/rophpad/askdb:latest"
askdb login [email protected]That verifies your credentials against the platform, pulls the image, starts the container, and applies your licence. Then open http://localhost:3000 and sign in with the same email and password.
After login, add your AI API key in Settings → AI. The key is stored only in the self-hosted instance's persistent data volume.
Commands
| | |
|---|---|
| askdb login [email] | Sign in and install. Prompts for anything missing. |
| askdb --login <email> <password> | Same, non-interactive. |
| askdb start / stop | Start or stop the instance |
| askdb status | Account, licence, and whether it is running |
| askdb logs [-f] | Container logs |
| askdb logout | Stop it and remove local credentials |
| askdb --version / askdb -v | Print the installed CLI version |
What is stored, and where
Everything lives in ~/.askdb (0700), removed entirely by askdb logout.
| File | Contents |
|---|---|
| credentials.json | Email, licence key, and a scrypt digest of your password |
| instance.env | Environment for the container, including that digest |
| docker-compose.yml | Generated; regenerated on each login |
Your password is never written to disk. The CLI derives the digest in memory and passes only that to the instance, which is enough for it to verify your sign-in locally. A copy of these files does not let anyone sign in to the platform.
askdb --login email password leaves the password in your shell history and, briefly, in the process list. Prefer askdb login on any shared machine.
Requirements
Docker (with Compose v2) running, and Node 20+.
Configuration
| Variable | Default | |
|---|---|---|
| ASKDB_CLOUD_URL | https://askdb-local.vercel.app | Platform to authenticate against |
| ASKDB_IMAGE | ghcr.io/rophpad/askdb:latest | Image to run |
| ASKDB_PORT | 3000 | Host port |
| ASKDB_HOME | ~/.askdb | Where credentials live |
| DATABASE_URL | — | Optional; a database can also be added from the UI |
Offline behaviour
Sign-in requires reaching the platform — that check is the point. Once installed, the instance itself never calls out: licences are verified offline, so askdb start works with no network. If the registry is unreachable but the image is already present locally, the CLI says so and starts it anyway.
