Skip to content

yvng-jie/devtools-cli

npm version CI Node version License Stars

🔧 dt — Developer Toolkit

Terminal Swiss Army Knife
UUID · Base64 · Color Converter · JWT Decoder · SHA Hash · JSON · QR Code · Password Generator · CIDR · MAC · Image Metadata — all in one command.

No more leaving your terminal to copy-paste into online tools.

dt demo


✨ Features

Zero setup Install once, use anywhere with the dt command
🎮 Interactive mode Run dt with no args for a categorized menu — great for beginners
🔍 Search mode Press s or / in interactive mode to search commands by name, alias, or description
⌨️ Number shortcuts Select commands by number in interactive mode; also supports command names and aliases directly
🔗 Pipe friendly echo "hello" | dt base64 encode — works with Unix pipelines
📋 JSON output Add --json for machine-readable output, pipeable to jq
📋 Clipboard copy Press C in interactive mode to copy results to clipboard
🎨 Beautiful output Colorful, well-formatted results with chalk and categorized display
📦 Minimal deps Only depends on chalk and qrcode — everything else uses Node.js built-in APIs

🚀 Install

# Install globally
npm install -g devkits

# Or use directly without installing
npx devkits

📖 Usage

dt <command> [options]

Run without arguments for interactive mode:

dt

Get help for any command:

dt help               # Show main help (grouped by category)
dt help uuid          # Show help for a specific command
dt uuid --help        # Same as above

Commands (by category)

🛡️ Security & Crypto

Command Alias Description
jwt Decode JWT tokens with expiry detection & HMAC signature verification
hash Generate SHA hashes (sha1/256/384/512) & HMAC

🔤 Encoding

Command Alias Description
base64 Encode or decode Base64 (standard & URL-safe)
url Encode, decode, or parse URLs & query strings

🌐 Network

Command Alias Description
cidr CIDR/IP calculator (network, broadcast, subnet mask, host range)
mac Format and validate MAC addresses (colon/hyphen/dot/cisco/unix)
ip Look up IP address information & geolocation

📋 Data Processing

Command Alias Description
json Format, validate, and highlight JSON
diff Compare two strings or files
csv Format and view CSV data

🧰 Utilities

Command Alias Description
uuid Generate UUIDs (v1/v4/v7)
color Convert colors (HEX / RGB(A) / HSL(A) / named)
timestamp ts Convert between Unix timestamps and dates
qrcode qr Generate QR codes in the terminal
random rand Generate passwords & random numbers

🔢 Mathematics

Command Alias Description
math Evaluate mathematical expressions

🖼️ Media

Command Alias Description
image Show image file metadata (PNG, JPEG, GIF, WebP)

All commands support --json for structured JSON output.

📸 Examples

Base64

dt base64 encode "hello world"
dt base64 decode "aGVsbG8gd29ybGQ="
echo "hello" | dt base64 encode
dt base64 encode "hello" --json # → {"action":"encode","input":"hello","output":"aGVsbG8="}
dt base64 encode "hello" --url  # URL-safe (no padding)

Color Converter

dt color "#ff7f50"
dt color "rgb(255, 127, 80)"
dt color "hsl(16, 100%, 66%)"
dt color coral
dt color coral --json           # → {"hex":"#FF7F50","rgb":"rgb(255,127,80)","hsl":"hsl(16,100%,66%)"}
dt color "#ff7f5080"             # RGBA with alpha

JWT Decode

dt jwt "eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiSm9obiJ9.xxx"
dt jwt <token> --json           # → {"header":{...},"payload":{...},"expired":true/false}
dt jwt <token> --verify secret  # Verify HMAC signature

Hash

dt hash "hello"
dt hash "hello" --algo sha512
dt hash "hello" -a sha512       # Same as --algo sha512
echo "hello" | dt hash
dt hash "hello" --json          # → {"algorithm":"SHA256","input":"hello","hash":"2cf2..."}
dt hash --file config.json       # Hash file contents
dt hash "hello" --key secret     # HMAC-SHA256

Timestamp / ts

dt ts                         # Current timestamp
dt ts 1716806400              # Timestamp → readable date
dt ts "2026-05-28"            # Date → timestamp
dt ts 1716806400 --utc        # UTC time
dt ts 1716806400 --iso        # ISO 8601 format
dt ts now --json              # → {"unix":...,"iso":"...","local":"...","utc":"..."}
echo 1716806400 | dt ts       # Pipe input
dt ts now --timezone Asia/Shanghai  # Show time in specific timezone

JSON

dt json '{"a":1,"b":{"c":2}}'
echo '{"a":1}' | dt json
dt json '{"a":1}' --minify   # {"a":1}
dt json "invalid" --validate # Check validity

QR Code

dt qrcode "https://example.com"
echo "hello" | dt qrcode

Random

dt random password                    # 16-char password
dt random password -l 32 --no-symbols # 32-char alphanumeric
dt random number --min 1 --max 10     # Random integer
dt random password -c 5               # 5 passwords at once

URL

dt url encode "hello world"           # → hello%20world
dt url decode "hello%20world"         # → hello world
dt url parse "?foo=1&bar=2"           # Parse query string
echo "hello world" | dt url encode

CIDR

dt cidr 192.168.1.0/24          # Show network info
dt cidr 10.0.0.0/8             # Class A network

Math

dt math "sqrt(16) * 3"          # 12
dt math "2^10"                  # 1024
dt math "sin(PI/2)"             # 1
dt math "100 / 3" --precision 4 # 33.3333

MAC Address

dt mac aa:bb:cc:dd:ee:ff
dt mac AA-BB-CC-DD-EE-FF        # Auto-detects format
dt mac aabb.ccdd.eeff            # Also valid

Diff

dt diff "abc" "abd"
dt diff --file old.txt new.txt

CSV

echo "a,b,c\n1,2,3" | dt csv
dt csv "name,age\nAlice,30"

Image

dt image screenshot.png          # Show PNG metadata
dt image photo.jpg               # Show JPEG metadata

IP

dt ip                           # Your public IP & location
dt ip 8.8.8.8                   # Look up a specific IP

�🛠 Development

git clone https://github.com/yvng-jie/devtools-cli.git
cd devtools-cli
pnpm install

pnpm dev <command>   # Run in dev mode (e.g. pnpm dev uuid)
pnpm build           # Production build → dist/
pnpm test            # Run tests (vitest)
pnpm lint            # Check code style
pnpm typecheck       # TypeScript type check

🤝 Contributing

PRs and issues are welcome! See CONTRIBUTING.md for guidelines.

📄 License

MIT © yvng-jie

About

Handy developer tools for your terminal — uuid, base64, jwt, color, hash & more

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors