Skip to content

Commit cd93d04

Browse files
committed
Rename CLI from 'nexadb' to 'nexa' - Clean separation
BREAKING CHANGE: CLI binary renamed from 'nexadb' to 'nexa' Benefits: - No command conflicts: 'nexadb' for server, 'nexa' for interactive CLI - Clean UX: Single installation gives both commands - Professional: Like mysql (mysqld + mysql client) Changes: 1. Rust CLI: - Binary name: nexadb → nexa - Command name: nexadb → nexa - Prompt: nexadb> → nexa> - Help text updated 2. Build & CI/CD: - build.sh outputs nexa-{platform} binaries - GitHub Actions builds nexa-{platform} artifacts - All 5 platforms supported (macOS Intel/ARM, Linux x86/ARM, Windows) 3. Linux Installation: - install.sh now downloads nexa binary from GitHub releases - Auto-detects architecture (x86_64/aarch64) - Installs to ~/.local/bin/nexa - Updated help output to show 'nexa -u root -p' 4. Docker: - Dockerfile downloads nexa binary (architecture-aware) - Available at /usr/local/bin/nexa inside container - docker exec -it <container> nexa -u root -p User Experience: brew install nexadb # or curl install.sh nexadb start # Start server nexa -u root -p # Interactive CLI
1 parent 79399e4 commit cd93d04

6 files changed

Lines changed: 60 additions & 22 deletions

File tree

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ COPY admin_panel/ admin_panel/
3131
# Install Python dependencies
3232
RUN pip install --no-cache-dir msgpack
3333

34+
# Download nexa CLI binary (architecture-aware)
35+
RUN ARCH=$(uname -m) && \
36+
if [ "$ARCH" = "x86_64" ]; then \
37+
NEXA_URL="https://github.com/krishcdbry/nexadb/releases/latest/download/nexa-x86_64-unknown-linux-gnu"; \
38+
elif [ "$ARCH" = "aarch64" ]; then \
39+
NEXA_URL="https://github.com/krishcdbry/nexadb/releases/latest/download/nexa-aarch64-unknown-linux-gnu"; \
40+
fi && \
41+
if [ -n "$NEXA_URL" ]; then \
42+
curl -fsSL "$NEXA_URL" -o /usr/local/bin/nexa && \
43+
chmod +x /usr/local/bin/nexa || true; \
44+
fi
45+
3446
# Create data directory
3547
RUN mkdir -p /data
3648

install.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,31 @@ EOF
165165

166166
chmod +x "$BIN_DIR/nexadb"
167167

168+
# Download nexa CLI binary
169+
echo -e "${CYAN}Downloading nexa CLI (interactive terminal)...${RESET}"
170+
171+
# Detect architecture
172+
ARCH=$(uname -m)
173+
if [ "$ARCH" = "x86_64" ]; then
174+
NEXA_BINARY="nexa-x86_64-unknown-linux-gnu"
175+
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
176+
NEXA_BINARY="nexa-aarch64-unknown-linux-gnu"
177+
else
178+
echo -e "${YELLOW}Unsupported architecture: $ARCH. Skipping nexa CLI installation.${RESET}"
179+
NEXA_BINARY=""
180+
fi
181+
182+
if [ -n "$NEXA_BINARY" ]; then
183+
# Download latest nexa binary from GitHub releases
184+
NEXA_URL="https://github.com/krishcdbry/nexadb/releases/latest/download/$NEXA_BINARY"
185+
if curl -fsSL "$NEXA_URL" -o "$BIN_DIR/nexa" 2>/dev/null; then
186+
chmod +x "$BIN_DIR/nexa"
187+
echo -e "${GREEN}✓ nexa CLI installed${RESET}"
188+
else
189+
echo -e "${YELLOW}⚠ Could not download nexa CLI. It will be available after first release.${RESET}"
190+
fi
191+
fi
192+
168193
# Add to PATH if not already
169194
echo -e "\n${BOLD}[5/5] Configuring PATH...${RESET}"
170195

@@ -217,6 +242,7 @@ echo -e ""
217242
echo -e "${CYAN}${BOLD}📚 USEFUL COMMANDS${RESET}"
218243
echo -e " ${CYAN}nexadb start${RESET} - Start all services"
219244
echo -e " ${CYAN}nexadb admin${RESET} - Admin UI only"
245+
echo -e " ${CYAN}nexa -u root -p${RESET} - Interactive CLI terminal"
220246
echo -e " ${CYAN}nexadb reset-password${RESET} - Reset password"
221247
echo -e " ${CYAN}nexadb --help${RESET} - Show help"
222248
echo -e ""

nexadb-cli-rust/.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@ jobs:
1616
# macOS
1717
- os: macos-latest
1818
target: x86_64-apple-darwin
19-
artifact_name: nexadb
20-
asset_name: nexadb-x86_64-apple-darwin
19+
artifact_name: nexa
20+
asset_name: nexa-x86_64-apple-darwin
2121
- os: macos-latest
2222
target: aarch64-apple-darwin
23-
artifact_name: nexadb
24-
asset_name: nexadb-aarch64-apple-darwin
23+
artifact_name: nexa
24+
asset_name: nexa-aarch64-apple-darwin
2525

2626
# Linux
2727
- os: ubuntu-latest
2828
target: x86_64-unknown-linux-gnu
29-
artifact_name: nexadb
30-
asset_name: nexadb-x86_64-unknown-linux-gnu
29+
artifact_name: nexa
30+
asset_name: nexa-x86_64-unknown-linux-gnu
3131
- os: ubuntu-latest
3232
target: aarch64-unknown-linux-gnu
33-
artifact_name: nexadb
34-
asset_name: nexadb-aarch64-unknown-linux-gnu
33+
artifact_name: nexa
34+
asset_name: nexa-aarch64-unknown-linux-gnu
3535

3636
# Windows
3737
- os: windows-latest
3838
target: x86_64-pc-windows-msvc
39-
artifact_name: nexadb.exe
40-
asset_name: nexadb-x86_64-pc-windows-msvc.exe
39+
artifact_name: nexa.exe
40+
asset_name: nexa-x86_64-pc-windows-msvc.exe
4141

4242
steps:
4343
- uses: actions/checkout@v4

nexadb-cli-rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ anyhow = "1.0"
1919
dirs = "5.0"
2020

2121
[[bin]]
22-
name = "nexadb"
22+
name = "nexa"
2323
path = "src/main.rs"
2424

2525
[profile.release]

nexadb-cli-rust/build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
#
3-
# Build script for NexaDB Rust CLI
3+
# Build script for Nexa CLI (NexaDB Interactive Terminal)
44
# Builds binaries for all platforms
55

66
set -e
77

8-
echo "Building NexaDB CLI for all platforms..."
8+
echo "Building Nexa CLI for all platforms..."
99

1010
# Install cross if not installed
1111
if ! command -v cross &> /dev/null; then
@@ -37,14 +37,14 @@ for target in "${TARGETS[@]}"; do
3737

3838
# Copy to dist folder
3939
if [[ "$target" == *"windows"* ]]; then
40-
cp "target/$target/release/nexadb.exe" "dist/nexadb-$target.exe"
40+
cp "target/$target/release/nexa.exe" "dist/nexa-$target.exe"
4141
else
42-
cp "target/$target/release/nexadb" "dist/nexadb-$target"
42+
cp "target/$target/release/nexa" "dist/nexa-$target"
4343
# Strip binary to reduce size
44-
strip "dist/nexadb-$target" 2>/dev/null || true
44+
strip "dist/nexa-$target" 2>/dev/null || true
4545
fi
4646

47-
echo "✓ Built: dist/nexadb-$target"
47+
echo "✓ Built: dist/nexa-$target"
4848
done
4949

5050
echo ""

nexadb-cli-rust/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const MSG_ERROR: u8 = 0x82;
2727
const MSG_NOT_FOUND: u8 = 0x83;
2828

2929
#[derive(Parser, Debug)]
30-
#[command(name = "nexadb")]
31-
#[command(about = "NexaDB Interactive CLI - Database for AI Developers", long_about = None)]
30+
#[command(name = "nexa")]
31+
#[command(about = "Nexa - Interactive CLI for NexaDB", long_about = None)]
3232
struct Args {
3333
/// NexaDB server host
3434
#[arg(long, default_value = "localhost")]
@@ -163,7 +163,7 @@ Type 'help' for commands or 'exit' to quit.
163163
fn print_help() {
164164
let help = r#"
165165
╔═══════════════════════════════════════════════════════════════════╗
166-
NexaDB CLI Commands ║
166+
Nexa CLI Commands
167167
╚═══════════════════════════════════════════════════════════════════╝
168168
169169
Collection Management:
@@ -502,9 +502,9 @@ fn main() -> Result<()> {
502502

503503
loop {
504504
let prompt = if let Some(ref col) = client.current_collection {
505-
format!("nexadb({})> ", col).green().bold().to_string()
505+
format!("nexa({})> ", col).green().bold().to_string()
506506
} else {
507-
"nexadb> ".green().bold().to_string()
507+
"nexa> ".green().bold().to_string()
508508
};
509509

510510
match rl.readline(&prompt) {

0 commit comments

Comments
 (0)