aegisdb-cli-0.2.4 is not a library.
aegis-cli
Command-line interface for the Aegis Database Platform.
Overview
aegis-cli provides a command-line tool for interacting with Aegis database servers. It supports SQL queries, key-value operations, cluster management, and an interactive shell.
Features
- SQL Query Execution - Execute queries from command line
- Interactive Shell - REPL for SQL queries
- Key-Value Store - Get, set, delete, and list keys
- Cluster Management - View cluster and node status
- Multiple Output Formats - Table, JSON, CSV output
- Database Shortcuts - Connect using shorthand names (nexusscribe, axonml, dashboard)
Installation
Build from source:
Usage
Command Reference
aegis-client [OPTIONS] <COMMAND>
Commands:
query Execute a SQL query
status Check server health and status
metrics Get server metrics
tables List all tables
kv Key-value store operations
cluster Cluster information
shell Interactive SQL shell
help Print help
Options:
-s, --server <SERVER> Server URL [default: http://localhost:9090]
-d, --database <DATABASE> Database: shorthand (nexusscribe, axonml, dashboard),
URL (aegis://host:port/db), or host:port
-h, --help Print help
-V, --version Print version
Database Connection
# Using shorthand names
# Using aegis:// URL
# Using host:port
# Using server flag
Shorthand Names:
| Name | Port | Description |
|---|---|---|
dashboard |
9090 | Main dashboard server |
local |
9090 | Alias for dashboard |
axonml |
7001 | AxonML node |
nexusscribe |
9091 | NexusScribe node |
SQL Queries
# Simple query
# Create table
# Insert data
# Select with columns
# Output as JSON
# Output as CSV
Interactive Shell
Aegis SQL Shell
Connected to: http://localhost:9091
Type 'exit' or 'quit' to exit, 'help' for commands.
aegis> SELECT * FROM users;
+----+-------+-------------------+
| id | name | email |
+====+=======+===================+
| 1 | Alice | alice@example.com |
+----+-------+-------------------+
1 row(s) returned in 0 ms
aegis> \d
(lists tables)
aegis> \q
Bye!
Shell Commands:
| Command | Description |
|---|---|
\q, exit, quit |
Exit the shell |
\d |
List tables |
\h, help |
Show help |
Key-Value Operations
# Set a key
# Get a key
# Delete a key
# List all keys
# List keys with prefix
Status and Metrics
# Server health
# Server metrics
# Cluster info
# List tables
Node Management
The CLI supports dynamic node registration. Nodes can be added manually or synced automatically from a running cluster.
Sync Nodes from Cluster
# Auto-discover all nodes from a running cluster
# Sync from a specific server
This queries the cluster's /api/v1/admin/nodes endpoint and automatically creates shorthands based on node names.
Manual Node Management
# List all registered nodes
# Add a node manually
# Remove a node
Config File
Node shorthands are stored in ~/.aegis/nodes.json. Example:
Examples
# Auto-discover nodes from cluster
# Quick health check across all nodes
# Create and populate a table
# Export query results as JSON
License
Apache-2.0