Skip to content

romankarki/void

Repository files navigation

Void

Void is a configurable shell wrapper inspired by the requirements in REQUIREMENTS.md. It adds a customizable prompt, alias expansion, persistent history, theme presets, and basic command completion helpers while delegating command execution to your existing shell.

CLI Commands

Gold & Silver Prices

# International gold spot price (Alpha Vantage API)
void gold

# International silver spot price
void gold silver

# Nepal gold/silver prices in NPR (from hamropatro.com)
void gold --nepal
void gold -n

Output for void gold --nepal:

 NEPAL GOLD/SILVER PRICES
 ─────────────────────────────────────────────────────────
                     Tola        10g
 ─────────────────────────────────────────────────────────
 Gold Hallmark  Rs. 313500.00   Rs. 268775.00
 Gold Tajabi    Rs. 0.00        Rs. 0.00
 Silver         Rs. 5595.00     Rs. 4797.00
 ─────────────────────────────────────────────────────────
 Last Update: Monday, February 23, 2026 - 10:45 AM

Stock Market

# Top gainers (US market)
void stocks gainers
void stocks g

Currency Exchange

# Exchange rate between two currencies
void exg USD NPR
void exg EUR USD

Nepal News (RONB)

# Read latest news from RONB (Nepal's popular news channel)
void ronb

Navigation in news TUI:

  • or N - Next page
  • or P - Previous page
  • Q or ESC - Quit

WhatsApp CLI

# Start WhatsApp terminal client
void wa
void whatsapp

Commands inside WhatsApp CLI:

  • send <phone> <message> - Send message to phone number
  • chat <phone> - Start a chat session
  • msg <text> - Send message in current chat
  • clear - Clear screen
  • help - Show available commands
  • exit - Quit WhatsApp CLI

Phone format: country code + number (e.g., 9779800000000 for Nepal)

Beautify Output

# Run command with beautified output
void b <command>
void bench <command>

# Example
void b ls -la
void bench git status

Error Copy

# Copy last error to clipboard
void cp error
void cp err

Core Features

  • Config-driven shell executable and prompt (config.toml).
  • Prompt segments: user, path, time, exit_code.
  • Presets: minimal, cyberpunk.
  • Alias expansion before command execution.
  • Persistent history with dedup + max size cap.
  • Install and update workflow from the binary itself (void install, void update).
  • Meta commands:
    • void history
    • void complete <prefix>
    • void reload
    • void copy-error
    • void cp err
    • void cp error

Project Layout

cmd/void/main.go             # app entrypoint
internal/config/             # config model + loader
internal/shell/              # interactive loop and command dispatch
internal/prompt/             # prompt segment renderer
internal/history/            # history persistence
internal/autocomplete/       # completion suggestions
internal/theme/              # preset application
presets/                     # built-in preset files

Setup Guide

1) Prerequisites

  • Go 1.22+
  • A shell executable in your PATH (cmd.exe, powershell.exe, sh, etc.)

2) Clone and build

git clone <your-fork-or-repo-url>
cd void
go build -o void ./cmd/void

3) Create config

Copy the example:

mkdir -p ~/.void
cp config.example.toml ~/.void/config.toml

Or pass a config explicitly:

./void --config ./config.example.toml

4) Run

./void

Type commands as usual. Use exit to leave Void.

5) Configure for Windows CMD behavior

In config.toml:

[shell]
executable = "cmd.exe"
args = ["/C"]

6) Preset themes

Use a preset in config.toml:

preset = "cyberpunk"

Available now: cyberpunk, minimal.

Use Void prompt in other terminals

You can now reuse Void's prompt renderer without running the full void wrapper shell.

Generate prompt text

void prompt --last-exit-code 0 --workdir "$PWD"

Install shell hook snippets

Print the integration snippet for your shell:

void init powershell
void init bash
void init zsh
void init cmd

Then append the output to your shell profile:

  • PowerShell / VS Code PowerShell profile: add the snippet to $PROFILE.
  • Bash: add it to ~/.bashrc.
  • Zsh: add it to ~/.zshrc.
  • CMD: use the fallback PROMPT line (CMD has no native pre-prompt hook to run external programs).

This makes the same Void prompt style available in Windows Terminal, VS Code integrated terminals, and other shell hosts that use those profiles.

With the PowerShell profile snippet loaded, you can copy the last command error from the current shell session:

void cp error

Install and Update (single binary flow)

You can distribute a single void.exe binary and let users self-install:

void install

What void install does:

  • Installs void.exe to %LOCALAPPDATA%\Void\bin\void.exe (user-level).
  • Creates ~/.void/config.toml if missing.
  • Prompts to add Void to user PATH.
  • Prompts to append prompt integration to a shell profile (powershell by default on Windows).

Useful flags:

void install --yes
void install --shell powershell
void install --no-profile

For updates:

void update

This downloads the latest release asset from GitHub and replaces the installed binary.

Advanced:

void update --repo owner/repo

See PACKAGING.md for release artifact naming and distribution strategy.

Show activation label in place of username (Windows)

You can surface an active profile/environment name in the user segment by setting VOID_ACTIVE_LABEL.

Use the included script from the project root:

call activate.bat

Or pass a custom label:

call activate.bat backend

Clear the label in the same terminal:

set VOID_ACTIVE_LABEL=

Development

Run checks:

go test ./...
go vet ./...

Build release artifacts:

powershell -ExecutionPolicy Bypass -File scripts/build-release.ps1 -OutDir dist

Notes

This implementation is intentionally MVP-focused and currently uses a lightweight TOML parser that supports the subset used by config.example.toml and presets.

About

a beautifying cmd especially for windows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages