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

Connection & Services

The CLI connects over TCP 27019 by default for all operations: database, collection, document CRUD, aggregation, indexes, transactions, archive export/import, telemetry (info, stats), and user/role administration. Optional HTTP fallback for export/import is available via --http (port 27018).

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 a temporary native MCP server (port 27020)
11axiodb serve mcp
12
13# Start full stack: HTTP + authenticated TCP + Dashboard GUI + MCP server
14axiodb serve full
15
16# Choose the admin password instead of admin/admin
17axiodb serve tcp-auth my-secret-password # required for tcp-auth
18axiodb 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
  • mcp — native Model Context Protocol server on port 27020
  • full — HTTP + authenticated TCP + Dashboard GUI + MCP server

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 and mcp reject it (no admin account).

Powered by Bun (or auto-installed if missing). The command uses fixed ports 27018 (HTTP), 27019 (TCP), and 27020 (MCP), 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—falseUse HTTP API instead of TCP for export/import
--http-host—localhostHTTP server host (when using --http)
--http-port—27018HTTP server port (when using --http)

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 route over TCP (port 27019) by default; passing --http uses the HTTP API (port 27018 with --http-host / --http-port).

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# Vector search over TCP
23axiodb -c axiodb://127.0.0.1:27019 document vector-search \
24 --db mydb --collection items --field embedding \
25 --vector '[0.023, -0.41, 0.88, 0.12]' --top-k 5 --metric cosine
26
27# Vector search with embedding loaded from a file and metadata query filter
28axiodb -c axiodb://127.0.0.1:27019 document vector-search \
29 --db mydb --collection items --field embedding \
30 --vector-file ./query_vector.json --query '{"category":"electronics"}' --min-score 0.7
31
32# Find several documents by ID
33axiodb -c axiodb://127.0.0.1:27019 document find-by-ids '["id1","id2"]' \
34 --db mydb --collection users
35
36# With authentication
37axiodb -c axiodb://127.0.0.1:27019 -u admin -p secret db list
38
39# With TLS
40axiodb -c axiodb://127.0.0.1:27019 --tls --tls-cert ./cert.pem db list
41
42# Using --host and --port instead of connection string
43axiodb --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> db.users.vectorSearch("embedding", [0.1, 0.2, 0.3], {"topK": 5, "metric": "cosine"})
28axiodb:mydb:users> exit

Export & Import (via TCP / HTTP)

Export and import default to the TCP protocol (port 27019) with chunked transfer. Pass --http to route through the HTTP Dashboard API (port 27018). Tab completes .tar.gz file paths automatically.

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

User & Role Administration

Manage users, roles, and permissions over TCP (port 27019, default) or HTTP (port 27018 with --http).

bash
1# User and role administration via TCP (port 27019, default)
2axiodb user list -u admin -p secret
3axiodb user create analyst analyst123 View -u admin -p secret
4axiodb user change-password oldpass newpass -u admin -p oldpass
5axiodb role list -u admin -p secret
6axiodb role create Auditor db:view,document:view -u admin -p secret
7
8# Or over HTTP port 27018 using --http flag
9axiodb user list --http -u admin -p secret
10
11# Server runtime diagnostics and stats
12axiodb info -u admin -p secret
13axiodb stats -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

Self-Removal (Destroy)

Safely removes the AxioDB CLI executable from the system. Aliases: distory, uninstall.

bash
1# Self-remove the AxioDB CLI executable from the system
2axiodb destroy
3
4# Skip interactive confirmation prompt
5axiodb destroy -y
6# or
7axiodb destroy --force

Features

TCP Data Operations

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

Health & Telemetry

Check TCP health and retrieve instance diagnostics and stats with 'axiodb info' and 'axiodb stats'

User & Role Administration

Manage users, roles, and permissions directly over TCP or HTTP with shared RBAC

Interactive REPL

MongoDB shell syntax with tab autocomplete

Export & Import

Backup/restore databases via TCP (default) or HTTP API, tab-completes file paths

TLS Encryption

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

TCP Authentication

-u / -p flags, shared RBAC with GUI

Self-Removal (Destroy)

One-line clean uninstallation with 'axiodb destroy' (-y / --force)

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 operates over TCP (port 27019) for all database operations, administration, and chunked archive export/import. HTTP (port 27018) is optionally supported via the --http flag. TCPAuth and TLS features require AxioDB server version 15.0.0 or later.