devkits
v0.7.0
Published
Handy developer tools for your terminal — uuid, base64, jwt, color, hash & more
Maintainers
Readme
Features
Install
# Install globally
npm install -g devkits
# Or use directly without installing
npx devkitsUsage
dt <command> [options]Run without arguments for interactive mode:
dtGet 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 aboveCommands (by category)
Security & Crypto
| Command | Alias | Description |
| ------- | ----- | --------------------------------------------------------------------- |
| jwt | — | Decode or encode JWT tokens with expiry detection & HMAC verification |
| hash | — | Generate hashes (SHA family, MD5, BLAKE2, CRC32) & 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 |
| ascii | — | ASCII / character lookup table |
| case | — | Convert strings between casing formats |
| regex | — | Test regex patterns & show matches with capture groups |
| text | — | Text stats & transformations (wc, reverse, slug, word frequency) |
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 |
| bytes | — | Convert byte sizes (B, KB, MB, GB, TB, PB) |
| completion| — | Generate shell auto-completion scripts |
| cron | — | Parse and describe cron expressions |
| lorem | — | Generate Lorem ipsum placeholder text |
| semver | sv | Parse, validate, compare, and bump semver |
| fake | — | Generate fake data (names, emails, IPs, companies & more) |
Mathematics
| Command | Alias | Description |
| -------- | ------ | ---------------------------------------------- |
| math | — | Evaluate mathematical expressions |
| number | num | Convert between decimal, hex, binary, octal |
Media
| Command | Alias | Description |
| ------- | ----- | ----------------------------------------------- |
| image | — | Show image file metadata (PNG, JPEG, GIF, WebP) |
All commands support
--jsonfor 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 alphaJWT
dt jwt "eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiSm9obiJ9.xxx"
dt jwt <token> --json # → {"header":{...},"payload":{...},"expired":true/false}
dt jwt <token> --verify secret # Verify HMAC signature
dt jwt encode '{"name":"John"}' --secret mysecret # Create a signed token
dt jwt encode name=John role=admin --exp 3600 # key=value payload + expiry
dt jwt encode '{"sub":"123"}' --no-sign # Unsigned tokenHash
dt hash "hello"
dt hash "hello" --algo sha512
dt hash "hello" -a sha512 # Same as --algo sha512
dt hash "hello" --algo md5
dt hash "hello" --algo crc32
dt hash "hello" --algo sha3-256 --format base64
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-SHA256Timestamp / 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 timezoneJSON
dt json '{"a":1,"b":{"c":2}}'
echo '{"a":1}' | dt json
dt json '{"a":1}' --minify # {"a":1}
dt json "invalid" --validate # Check validityQR Code
dt qrcode "https://example.com"
echo "hello" | dt qrcodeRandom
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 onceRegex
dt regex "\\d+" "order 42 item 7" --flags g # Show all matches
dt regex "(\\w+)@(\\w+)" "[email protected] [email protected]" # Capture groups
dt regex "\\s+" "a b c" --replace "-" # Preview replacement
echo "abc123" | dt regex "[a-z]+" --flags g --jsonText
dt text "hello world" # Stats: words, chars, lines, bytes…
cat file.txt | dt text # wc-style counting via pipe
dt text "My Project Name" --slug # → my-project-name
dt text "hello world" --reverse # → dlrow olleh
dt text "foo bar foo" --freq # Word frequency table
dt text "b\na\nc" --sort --unique # Line operationsFake Data
dt fake name # Random full name
dt fake email # Random email address
dt fake -c 5 ip # 5 random IPs
dt fake integer --min 1 --max 10 # Random integer
dt fake password --json # JSON outputURL
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 encodeCIDR
dt cidr 192.168.1.0/24 # Show network info
dt cidr 10.0.0.0/8 # Class A networkMath
dt math "sqrt(16) * 3" # 12
dt math "2^10" # 1024
dt math "sin(PI/2)" # 1
dt math "100 / 3" --precision 4 # 33.3333MAC 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 validDiff
dt diff "abc" "abd"
dt diff --file old.txt new.txtCSV
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 metadataIP
dt ip # Your public IP & location
dt ip 8.8.8.8 # Look up a specific IPDevelopment
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 checkContributing
PRs and issues are welcome! See CONTRIBUTING.md for guidelines.
License
MIT © yvng-jie
