RustyBase CLI & Initialization

Complete guide to setting up and managing your RustyBase instance. From installation to advanced system management.

1. Installation

RustyBase provides an automated installer for Unix-based systems (macOS & Linux) and Windows.

macOS & Linux (Shell)

Run the following command in your terminal to download and install the latest binary:

1curl -fsSL https://raw.githubusercontent.com/diptanshumahish/rustybase-release/master/install.sh | bash
What this does:
  • Detects your OS and Architecture (x86_64 or arm64).
  • Fetches the latest release metadata from GitHub.
  • Downloads the appropriate binary to a temporary location.
  • Installs it to /usr/local/bin/rustybase (may request sudo).

Windows (PowerShell)

Run this command in an Administrator PowerShell window:

1irm https://raw.githubusercontent.com/diptanshumahish/rustybase-release/master/install.ps1 | iex

2. Initialization (init)

Before you can run the server, you must initialize a data directory and create your admin credentials.

1rustybase init

Optional: rustybase init --path ./my-custom-data (Default is ./data)

Interactive Wizard Steps

The init command launches an interactive setup wizard:

1

Admin Username

The username for the root superuser. Default: admin.

[>] Admin username
2

Admin Password

Hidden input. Do not lose this! Full system control.

[*] Admin password
3

Initial Database

Name of the first database. Default: default.

[#] Initial database name
4

Shard Key Strategy

Distribution strategy. '_id' recommended.

[~] Default shard key
5

Server Port

HTTP port for API. Default: 3000.

[@] Server port
6

Server Host

Bind address. Default: 127.0.0.1.

[&] Server host
Outcome:RustyBase will create the directory structure, initialize the admin DB, create the root user, generate rustybase.config.json, and print your Connection String.

3. Starting the Server (serve)

Once initialized, you are ready to launch the database engine.

1rustybase serve

Startup Sequence

  • Banner: Displays the RustyBase ASCII logo.
  • Initialization: Loads storage engine and auth service.
  • Port Check: Verifies configured port availability.
  • Network Summary: Link to Swagger UI, API endpoints, and Auth protocols.

The server is now live. Press Ctrl+C to stop safely.

4. System Management

Built-in utilities to manage the system without starting the server.

List Users

View all registered users and their roles.

rustybase users

Resource Usage

Check CPU load, Memory RSS, Storage volume, and file paths.

rustybase usage

Port & Network

Quickly check configured port/host.

rustybase port

View Subscription

Check your current licensing status (Free/Pro).

rustybase whichplan

5. Danger Zone

System Reset

Wipes ALL data (databases, users, documents) but keeps configuration. Useful for dev resets.

1rustybase --reset

Uninstall

Completely removes RustyBase (binary, config, data) from your system.

1rustybase --uninstall

6. Reference: Command Summary

CommandDescription
rustybase initInitialize a new database instance (Wizard).
rustybase serveStart the API server.
rustybase usersList all system users.
rustybase usageShow CPU, RAM, and Disk usage.
rustybase portShow configured port/host.
rustybase whichplanShow current subscription tier.
rustybase --helpShow the official help menu.
rustybase --versionShow the installed version.
rustybase --reset[DESTRUCTIVE] Delete all data.
rustybase --uninstall[DESTRUCTIVE] Remove RustyBase entirely.