Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orbx

orbx is a lightweight CLI toolkit for developers - encryption, encoding, network diagnostics and everyday utilities, all from the terminal.

Built with Go and Cobra.


Install

go install github.com/mmilanovic4/orbx@latest

Usage

$ orbx --help

orbx is a lightweight CLI utility for quick system tasks.

Usage:
  orbx [flags]
  orbx [command]

🧰 Utilities
  aes         AES-GCM encryption utilities
  base64      Encode or decode base64
  charfreq    Show character frequency table of input
  clearclip   Clear system clipboard
  compress    Compress or decompress input using gzip
  convert     Convert units: length, weight, temperature, storage, time
  copyclip    Copy input to system clipboard
  countdown   Countdown timer (e.g. 1h30m, 5m, 90s)
  download    Download a file from a URL
  entropy     Calculate Shannon entropy of input
  hash        Generate hash of a string
  hex         Encode or decode hex
  qr          Generate a QR code from text or URL
  random      Generate a cryptographically secure random string
  size        Show logical size of a file or directory
  text        String utilities
  watch       Repeatedly run a command every N seconds
  wc          Count lines, words and characters

🌐 Network Tools
  cert        Show TLS certificate info for a domain or file
  dns         Resolve DNS records for a domain
  headers     Show HTTP response status and headers
  hosts       List entries from /etc/hosts
  ip          Show public and local IP addresses
  ping        HTTP latency check (like ping, but for URLs)
  rdns        Reverse DNS lookup for an IP address
  sshlist     List configured SSH hosts from ~/.ssh/config
  subnet      Calculate subnet details (network, broadcast, host range)
  tcpcheck    Check TCP port connectivity

💻 Developer Tools
  color       Convert between color formats (HEX, RGB, RGBA)
  env         Pretty print env file content
  favicon     Generate favicon.ico and Apple touch icons from a PNG
  html        Encode or decode HTML entities
  jwt         Decode a JWT token (header and payload, no verification)
  ports       Show processes using network ports
  prettyprint Format and pretty print JSON or XML
  serve       Start a static file server in current directory
  unixts      Unix timestamp utilities
  url         Decode and parse a URL
  uuid        Generate a UUID (v1, v3, v4, v5, v6, v7)

Additional Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command

Flags:
  -h, --help      help for orbx
  -v, --version   version for orbx

Use "orbx [command] --help" for more information about a command.

Stdin support is available across most tools, allowing you to pipe input directly instead of passing it as an argument:

echo -n 'lorem ipsum' | orbx hash md5

Clear Clipboard

Note: clearclip is supported on macOS and Linux (X11) only. On Linux, xclip must be installed (apt install xclip). Windows is not currently supported.

orbx clearclip

AES-GCM Encryption

# AES-256 (default)
orbx aes key --out secret.key

# AES-128 or AES-192
orbx aes key 16 --out secret.key
orbx aes key 24 --out secret.key

# Encrypt and save to file
orbx aes encrypt 'Hello from the other side!' --key secret.key --out ciphertext.txt

# Decrypt from file
orbx aes decrypt --key secret.key --file ciphertext.txt

Entropy

Calculates the Shannon entropy of an input, expressed in bits per byte.

Note: By default, entropy attempts to decode the input as base64 before calculating — consistent with the output format of the aes encrypt command. If your input is not base64-encoded, pass the --raw flag to skip decoding and calculate entropy on the raw input directly.

# Direct input (base64)
orbx entropy 'SGVsbG8='

# Skip base64 decoding, treat input as raw bytes
orbx entropy 'Hello!' --raw

# From file
orbx entropy --file ciphertext.txt

# Good entropy
head -c 10000 /dev/urandom | orbx base64 encode | orbx entropy

Interpreting the result

bits/byte Meaning
~8.0 Excellent — output looks random (good ciphertext)
6.0–7.9 High entropy — likely compressed or encrypted data
3.0–5.9 Moderate — structured data, natural language
< 3.0 Low — highly repetitive or predictable input

A well-formed AES-GCM ciphertext should score close to 8.0 bits/byte.

Compression

By default, output is base64-encoded for compatibility with other orbx commands (e.g. piping into aes encrypt). Use --raw to write raw gzip bytes, which can be opened with 7-Zip, gunzip, or any standard gzip tool.

Note: --raw output is fully compatible with gzip/gunzip for single files. Archives created with tar -czf (.tar.gz) are not supported — use tar directly for directories.

# Compress a string and save to file (base64 output)
orbx compress 'Hello from the other side!' --out compressed.txt

# Compress a file and save output (base64 output)
orbx compress --file largefile.txt --out compressed.txt

# Decompress a base64-compressed file
orbx compress --file compressed.txt --decode

# Compress to a raw .gz file (compatible with 7-Zip, gunzip, etc.)
orbx compress --file largefile.txt --raw --out archive.gz

# Decompress a raw .gz file
orbx compress --file archive.gz --raw --decode

# Compress and decompress via pipeline
cat largefile.txt | orbx compress | orbx compress --decode

# Compress then encrypt
cat largefile.txt | orbx compress | orbx aes encrypt --key secret.key --out out.enc

# Decrypt then decompress
orbx aes decrypt --file out.enc --key secret.key | orbx compress --decode

Size

Calculates the logical (apparent) size of a file or directory — the actual data size, not the disk usage reported by du. Useful for estimating cloud storage costs, transfer sizes and archive sizes before compression.

# Current directory
orbx size

# Specific directory
orbx size /path/to/dir

# Single file
orbx size file.txt

# Glob pattern — size of each file + total
orbx size dist/*.json

# Multiple targets
orbx size file1.txt file2.txt dir/

QR Code

Generates a QR code from text or a URL. By default it renders directly in the terminal using half-block Unicode characters. Use --out to save a PNG or SVG file instead.

# From argument
orbx qr 'https://example.com'

# From stdin
echo -n 'https://example.com' | orbx qr

# Higher error correction
orbx qr 'https://example.com' --level 4

# Save to PNG
orbx qr 'https://example.com' --out qr.png

# Save to SVG
orbx qr 'https://example.com' --out qr.svg

Subnet

Calculates subnet details from an IPv4/IPv6 address in CIDR notation, or an IPv4 address with a netmask (dotted-decimal or hex).

# CIDR notation
orbx subnet 192.168.1.10/24

# IP + dotted-decimal netmask
orbx subnet 192.168.1.10 255.255.255.0

# IP + hex netmask (e.g. as reported by ifconfig)
orbx subnet 192.168.1.10 0xffffff00

# IPv6
orbx subnet 2001:db8::/64

Requirements

  • Go 1.20+

About

orbx is a lightweight CLI utility for quick system tasks.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages