NEWAxDB CLI•12 Platforms

AxioDB CLI

Command line interface for AxioDB. Connect to any AxioDB server via TCP, run queries, manage databases — all from your terminal with MongoDB shell syntax.

Interactive REPL
TLS Support
CLI Commands
12 Platforms

Enable HTTP & TCP on the server first

The CLI needs TCP 27019 enabled (new AxioDB({ TCP: true }) or AXIODB_TCP=true) for data commands: db, collection, document, index, transaction, ping, health, connect. Management commands (user, role, user change-password, export/import) need HTTP 27018 enabled (GUI: true / AXIODB_GUI=true). TCP is data-plane only by design — no user/role management over TCP.

Quick Install

Linux / macOS

bash
1curl -fsSL https://raw.githubusercontent.com/nexoral/AxioDB/main/cli/Scripts/install.sh | bash

Windows (PowerShell)

powershell
1irm https://raw.githubusercontent.com/nexoral/AxioDB/main/cli/Scripts/install.ps1 | iex

Choose what to install: The installer prompts interactively (1) CLI, (2) GUI, (3) Both. When piped (curl | bash), it defaults to CLI. Set CHOICE for non-interactive selection:

CHOICE=1 → CLI onlyCHOICE=2 → GUI onlyCHOICE=3 → CLI + GUI

See Installation for full details.

Start a Temporary Server

Use serve for local development. The CLI creates a temporary AxioDBdata folder, installs the published npm package, and keeps the server attached to your terminal. Press Ctrl+Cto stop it and remove the temporary data.

bash
1# Start a temporary HTTP API server
2axiodb serve http
3
4# Start a temporary unauthenticated TCP server
5axiodb serve tcp
6
7# Start TCP authentication only (password required)
8axiodb serve tcp-auth
9
10# Start HTTP + authenticated TCP + Dashboard (GUI enabled)
11axiodb serve full
12
13# Choose the admin password instead of admin/admin
14axiodb serve tcp-auth my-secret-password # required for tcp-auth
15axiodb serve full my-secret-password # optional for http/full

Presets

  • http — HTTP API only on port 27018
  • tcp — unauthenticated TCP on port 27019
  • tcp-auth — authenticated TCP only
  • full — HTTP + authenticated TCP, GUI disabled

Admin password

tcp-auth requires it — it has no HTTP surface, so the seeded admin/admin could never be rotated and every TCP login would be rejected. http and full take it optionally, since the control server can rotate the password. tcp rejects it (no admin account).

Node.js 20+ and npm are required. The command uses fixed ports 27018 (HTTP) and 27019 (TCP), and reports the temporary data path and enabled endpoints when startup succeeds.

Connection String

Format: axiodb://host:port

The CLI uses a custom axiodb:// scheme — not mongodb:// or http://. Credentials and TLS are passed as separate flags, not embedded in the URL.

text
1# Format: axiodb://host:port
2
3# Local server (default)
4axiodb://localhost:27019
5
6# Remote server
7axiodb://192.168.1.100:27019
8
9# Custom domain
10axiodb://mydb.example.com:27019

Components

  • axiodb:// — scheme (required, always this value)
  • host — hostname or IP (required, default: localhost)
  • port — TCP port (required, default: 27019)

Not supported in URL

  • ❌ Path segments (axiodb://host:27019/db)
  • ❌ Query parameters (axiodb://host:27019?auth=true)
  • ❌ Credentials (axiodb://user:pass@host:27019)
  • ❌ TLS variant (axiodbs://) — use --tls flag instead

MongoDB users: AxioDB's connection string is simpler than MongoDB's. There is no mongodb:// format, no replica set syntax, no auth source query params. Just axiodb://host:port — all options go in flags.

Global Flags

These flags work with all commands. Pass them before the subcommand or after it.

FlagShortDefaultDescription
--connection-string-c""Connection string (axiodb://host:port)
--host—localhostServer host
--port—27019Server port
--username-u""Username for TCP authentication
--password-p""Password for TCP authentication
--tls—falseEnable TLS encryption
--tls-cert—""Path to CA certificate (for self-signed)
--tls-skip-verify—falseSkip TLS certificate verification
--output-otableOutput format: table | json
--timeout—30Request timeout in seconds
--db—""Database name (for single commands)
--collection—""Collection name (for single commands)
--http-host—localhostHTTP server host (for export/import)
--http-port—27018HTTP server port (for export/import)

Note: -c overrides --host and --port when both are provided. Auth flags (-u/-p) are only sent if the server has TCPAuth: true enabled. Export/import use the HTTP API (port 27018) — --http-host and --http-port are separate from the TCP flags.

Usage

Single Commands

bash
1# Test connection
2axiodb -c axiodb://127.0.0.1:27019 ping
3
4# Check service health
5axiodb -c axiodb://127.0.0.1:27019 health
6
7# List databases
8axiodb -c axiodb://127.0.0.1:27019 db list
9
10# Insert a document
11axiodb -c axiodb://127.0.0.1:27019 document insert '{"name":"Alice","age":30}' \
12 --db mydb --collection users
13
14# Query documents (JSON output)
15axiodb -c axiodb://127.0.0.1:27019 document query '{"age":{"$gt":25}}' \
16 --db mydb --collection users --output json
17
18# Query using an index hint
19axiodb -c axiodb://127.0.0.1:27019 document query '{"email":"[email protected]"}' \
20 --db mydb --collection users --hint email
21
22# Find several documents by ID
23axiodb -c axiodb://127.0.0.1:27019 document find-by-ids '["id1","id2"]' \
24 --db mydb --collection users
25
26# With authentication
27axiodb -c axiodb://127.0.0.1:27019 -u admin -p secret db list
28
29# With TLS
30axiodb -c axiodb://127.0.0.1:27019 --tls --tls-cert ./cert.pem db list
31
32# Using --host and --port instead of connection string
33axiodb --host 192.168.1.100 --port 27019 ping

Interactive REPL (MongoDB Shell Style)

bash
1# Start with connection string
2axiodb connect -c axiodb://127.0.0.1:27019
3
4# Start with auth
5axiodb connect -c axiodb://127.0.0.1:27019 -u admin -p secret
6
7# Start with TLS
8axiodb connect -c axiodb://127.0.0.1:27019 --tls --tls-cert ./cert.pem
9
10# Start with host/port flags (no connection string)
11axiodb connect --host 192.168.1.100 --port 27019
12
13# Start with defaults (localhost:27019)
14axiodb connect
15
16# Once connected — MongoDB shell syntax:
17axiodb> use mydb
18axiodb:mydb> show dbs
19axiodb:mydb> show collections
20axiodb:mydb> use mydb.users
21axiodb:mydb:users> db.users.find({})
22axiodb:mydb:users> db.users.find({age: {$gt: 25}})
23axiodb:mydb:users> db.users.insert({name: "Bob", age: 25})
24axiodb:mydb:users> db.users.updateOne({name: "Bob"}, {$set: {age: 26}})
25axiodb:mydb:users> db.users.deleteOne({name: "Bob"})
26axiodb:mydb:users> db.users.countDocuments()
27axiodb:mydb:users> exit

Export & Import (via HTTP API)

Export and import use the HTTP Dashboard API (port 27018), not the TCP protocol. They require -u/-p flags for HTTP session authentication. Tab completes .tar.gz file paths automatically.

bash
1# Export database (saves mydb.tar.gz in current directory)
2axiodb export mydb \
3 --http-host localhost --http-port 27018 \
4 -u admin -p secret
5
6# Export from remote server
7axiodb export mydb \
8 --http-host prod.example.com --http-port 27018 \
9 -u admin -p secret
10
11# Import database from file (tab completes .tar.gz files)
12axiodb import ./backups/mydb.tar.gz \
13 --http-host localhost --http-port 27018 \
14 -u admin -p secret
15
16# Import overwrites if database already exists — delete first via GUI or CLI
17axiodb db delete mydb -c axiodb://localhost:27019 -u admin -p secret
18axiodb import ./backups/mydb.tar.gz \
19 --http-host localhost --http-port 27018 \
20 -u admin -p secret

User & Role Administration (via HTTP API)

Management commands use HTTP port 27018. The TCP protocol remains data-plane only.

bash
1# User and role administration uses the HTTP API (port 27018)
2axiodb user list --http-host localhost --http-port 27018 -u admin -p secret
3axiodb user create analyst analyst123 View --http-host localhost --http-port 27018 -u admin -p secret
4axiodb role list --http-host localhost --http-port 27018 -u admin -p secret
5axiodb role create Auditor document:view,document:query --http-host localhost --http-port 27018 -u admin -p secret

Transactions

Transaction steps run in order on one TCP connection and commit together. Updates are flat merges; operators such as $inc are not supported.

bash
1# Run transaction steps from a JSON file on one TCP connection
2cat > transfer.json <<'EOF'
3[
4 {"operation":"update-by-id","id":"sender","updateData":{"balance":500}},
5 {"operation":"update-by-id","id":"receiver","updateData":{"balance":1500}},
6 {"operation":"savepoint","savepointName":"checked"}
7]
8EOF
9
10axiodb transaction run transfer.json --db mydb --collection accounts \
11 -c axiodb://127.0.0.1:27019 -u admin -p secret

Features

TCP Data Operations

Database, collection, document CRUD, aggregation, indexing, counts, hints, find-by-IDs, and transactions

Health & Diagnostics

Check TCP service health and retrieve instance information

HTTP Administration

Manage users and roles without adding management commands to the TCP client

Interactive REPL

MongoDB shell syntax with tab autocomplete

Export & Import

Backup/restore databases via HTTP API, tab-completes file paths

TLS Encryption

--tls, --tls-cert, --tls-skip-verify flags

TCP Authentication

-u / -p flags, shared RBAC with GUI

JSON & Table Output

--output json for scripting, --output table for reading

Supported Platforms

OSArchitectures
Linuxamd64, arm64, 386, armv7
macOSamd64 (Intel), arm64 (Apple Silicon)
Windowsamd64, arm64, 386
FreeBSDamd64
OpenBSDamd64
NetBSDamd64

Version Compatibility

CLI VersionServer VersionProtocol
cli-v1.xAxioDB >= 15.0.0TCP (port 27019)

Note: The CLI uses two protocols: TCP (port 27019) for queries/CRUD, and HTTP (port 27018) for export/import. They are separate surfaces — TCP commands cannot talk to the HTTP API and vice versa. TCPAuth and TLS features require AxioDB server version 15.0.0 or later.