aegisdb-cli-0.1.6 is not a library.
aegis-cli
Command-line interface for the Aegis Database Platform.
Overview
aegis-cli provides a powerful command-line tool for interacting with Aegis databases. It supports interactive queries, data import/export, and administrative operations.
Features
- Interactive Shell - REPL for SQL queries
- Query Execution - Run queries from command line or files
- Data Import/Export - CSV, JSON, and SQL formats
- Admin Commands - Cluster and node management
- Output Formats - Table, JSON, CSV output
Installation
The CLI is installed automatically with Aegis:
Or build manually:
Usage
Basic Commands
# Start interactive shell
# Execute a query
# Execute from file
# Connect to specific server
Command Reference
aegis [OPTIONS] <COMMAND>
Commands:
shell Start interactive SQL shell
query Execute a SQL query
import Import data from file
export Export data to file
status Show cluster status
help Print help
Options:
-h, --host <HOST> Server host [default: localhost]
-p, --port <PORT> Server port [default: 9090]
-u, --user <USER> Username
-P, --password Prompt for password
-f, --format <FMT> Output format: table, json, csv [default: table]
--help Print help
Interactive Shell
$ aegis shell
Connected to Aegis v2.0.0 at localhost:9090
aegis> SELECT * FROM users LIMIT 5;
┌────┬─────────┬─────────────────────┐
│ id │ name │ email │
├────┼─────────┼─────────────────────┤
│ 1 │ Alice │ alice@example.com │
│ 2 │ Bob │ bob@example.com │
│ 3 │ Charlie │ charlie@example.com │
└────┴─────────┴─────────────────────┘
3 rows (0.012s)
aegis> \help
Available commands:
\help Show this help
\tables List all tables
\describe Describe a table
\format Change output format
\quit Exit the shell
aegis> \quit
Goodbye!
Data Import
# Import CSV
# Import JSON
# Import with options
Data Export
# Export to CSV
# Export to JSON
# Export entire table
Admin Commands
# Cluster status
# Node information
# Detailed stats
Configuration
Create ~/.aegis/config.toml:
[]
= "localhost"
= 9090
= "admin"
[]
= "~/.aegis/history"
= 1000
= "aegis> "
[]
= "table"
= 120
= "NULL"
Environment Variables
| Variable | Description |
|---|---|
AEGIS_HOST |
Server host |
AEGIS_PORT |
Server port |
AEGIS_USER |
Username |
AEGIS_PASSWORD |
Password |
Examples
# One-liner query with JSON output
# Pipe query from stdin
|
# Export with compression
# Batch insert from file
|
License
Apache-2.0