A CLI that replaces browser tab context-switching. UUID generation, JWT inspection, JSON formatting, port management, and 60+ other daily utilities, all in one binary.
I am a guy who somehow cannot remember commands I use every single day. Need a UUID? Google it. Decode a JWT? Google it. Check what is on port 3000? Google “how to check port linux” for the 47th time, copy the command, forget it by tomorrow.
This is just my personal collection of those commands (the ones I kept Googling) wrapped into one thing I can actually remember: idt.
Installation
curl -sSf https://raw.githubusercontent.com/ickdev/idt/main/scripts/install.sh | bash
The script detects what you have and picks the right method automatically:
| Situation |
What happens |
| Rust only |
Clones repo, builds with cargo, installs binary |
| Docker only |
Builds inside a container (no Rust needed on host) |
| Both |
Asks which you prefer |
| Neither |
Tells you to install one and exits |
Clipboard support (--copy flag) requires an extra runtime dependency on Linux. The script checks for it after install and tells you exactly what to install if it is missing.
Manual install (Rust)
git clone https://github.com/ickdev/idt
cargo install --path idt
Shell completions
# Bash
idt completions bash >> ~/.bashrc
# Zsh
idt completions zsh >> ~/.zshrc
# Fish
idt completions fish > ~/.config/fish/completions/idt.fish
# PowerShell
idt completions powershell >> $PROFILE
Commands
All commands support short aliases. The pattern is idt <category> <subcommand> [args].
gen / g - Generate
| Command |
Alias |
Description |
idt gen uuid |
idt g u |
Generate a v4 UUID |
idt gen secret [len] |
idt g s [len] |
Secure random string (default 32 chars) |
idt gen bcrypt <str> |
idt g b <str> |
Bcrypt hash (--cost flag, default 12) |
idt gen rsa |
- |
RSA key pair saved to CWD (--bits, default 2048) |
idt gen lorem [n] |
idt g l [n] |
Lorem Ipsum words (--paragraphs for paragraph mode) |
idt gen qr <data> |
- |
QR code to terminal (--out file.png to save) |
idt gen gitignore <langs...> |
idt g gi node go |
Fetch and merge .gitignore templates |
idt g u # f47ac10b-58cc-4372-a567-0e02b2c3d479
idt g s 16 # 4kR$mXp2@nLqW7vZ
idt g b "my password" --cost 10 # $2b$10$...
idt g l 3 --paragraphs # Three Lorem paragraphs
idt g gi node python # .gitignore for Node + Python
| Command |
Alias |
Description |
idt format json [input] |
idt f j |
Prettify JSON (stdin, string, or file path) |
idt format sql [input] |
idt f s |
Format SQL queries |
idt f j '{"a":1,"b":2}'
echo '{"x":1}' | idt f j
idt f j query.json
parse / p - Parse
| Command |
Alias |
Description |
idt parse url <url> |
idt p u |
Break a URL into components |
idt p u "https://user:pass@example.com:8080/path?q=1#frag"
Output:
╭──────────┬───────────────────────╮
│ scheme │ https │
│ host │ example.com │
│ port │ 8080 │
│ path │ /path │
│ query │ q=1 │
│ fragment │ frag │
╰──────────┴───────────────────────╯
encode / ec - Encode
| Command |
Alias |
Description |
idt encode base64 [input] |
idt ec b64 |
Base64 encode |
idt encode url [input] |
idt ec url |
URL encode |
idt encode html [input] |
idt ec h |
HTML entity encode |
idt ec b64 "hello world" # aGVsbG8gd29ybGQ=
idt ec url "hello world" # hello%20world
idt ec h "<script>" # <script>
echo "pipe me" | idt ec b64
decode / dc - Decode
| Command |
Alias |
Description |
idt decode base64 [input] |
idt dc b64 |
Base64 decode |
idt decode url [input] |
idt dc url |
URL decode |
idt decode html [input] |
idt dc h |
HTML entity decode |
idt decode jwt [token] |
idt dc jwt |
Decode JWT (no signature verification) |
idt dc b64 "aGVsbG8gd29ybGQ=" # hello world
idt dc url "hello%20world" # hello world
idt dc jwt eyJhbGci... # Pretty-prints header + payload; warns if expired
str / s - String utilities
| Command |
Alias |
Description |
idt str camel [input] |
idt s c |
Convert to camelCase |
idt str snake [input] |
idt s s |
Convert to snake_case |
idt str kebab [input] |
idt s k |
Convert to kebab-case |
idt str pascal [input] |
idt s p |
Convert to PascalCase |
idt str count [input] |
idt s wc |
Count words, chars, and lines |
idt s c "hello world" # helloWorld
idt s s "HelloWorld" # hello_world
idt s k "Hello World" # hello-world
idt s p "hello world" # HelloWorld
echo "foo bar" | idt s wc
time / t - Time utilities
| Command |
Alias |
Description |
idt time now |
idt t n |
Current time as epoch + ISO 8601 |
idt time convert <ts> |
idt t c |
Unix timestamp → human-readable date |
idt t n
idt t c 1700000000 # 2023-11-14 22:13:20 UTC
web / w - Web utilities
| Command |
Alias |
Description |
idt web status <code> |
idt w s |
Look up an HTTP status code |
idt web serve [port] |
- |
Static HTTP server in CWD (default port 8080) |
idt web headers <url> |
idt w h |
Fetch and display response headers |
idt w s 404 # 404 Not Found - The server could not find the requested resource.
idt web serve # Serving . on http://0.0.0.0:8080
idt w h https://example.com
network / nw - Network utilities
| Command |
Alias |
Description |
idt network ip |
- |
Show local and public IP addresses |
idt network port list |
idt nw p l |
List all listening ports with PID and process |
idt network port check <port> |
idt nw p c |
Check if a port is available or in use |
idt network port kill <port> |
idt nw p k |
Kill the process bound to a port |
idt network wait <target> |
idt nw w |
Poll until a port or URL responds |
idt network ip
idt nw p l # Table of all listening ports
idt nw p c 3000 # ✓ port 3000 is available
idt nw p k 3000 # Prompts for confirmation; --force skips it
idt nw w 3000 # Spins until port 3000 opens
idt nw w http://localhost:3000 --timeout 30
Note: port list shows PID/process names only when run as root (or on systems where /proc/*/fd is readable). Port numbers are always shown.
env / v - Environment file utilities
| Command |
Alias |
Description |
idt env sort [file] |
idt v s |
Sort .env keys alphabetically |
idt env compare [file] [example] |
idt v c |
Diff .env against .env.example |
idt env strip [file] |
idt v x |
Blank values to produce .env.example |
idt v s # Sort .env in place
idt v s .env.staging --dry-run # Preview without writing
idt v c .env .env.example # Shows missing/extra keys
idt v x .env --out .env.example # Strip values, write new file
| Command |
Description |
idt convert y2j [input] |
YAML → JSON |
idt convert j2y [input] |
JSON → YAML |
idt convert c2j [input] |
CSV → JSON array |
idt cv y2j config.yaml
idt cv j2y '{"a":1}'
idt cv c2j data.csv
cat data.csv | idt cv c2j
color / c - Color utilities
| Command |
Alias |
Description |
idt color h2r <hex> |
- |
Hex → RGB |
idt color r2h <r> <g> <b> |
- |
RGB → Hex |
idt color preview <color> |
idt c p |
ANSI color swatch preview |
idt color h2r "#1a2b3c" # rgb(26, 43, 60)
idt color r2h 26 43 60 # #1a2b3c
idt c p "#ff6b35" # Colored block swatch
idt c p "255,107,53" # Also accepts r,g,b format
hash / h - Hashing
| Command |
Alias |
Description |
idt hash md5 [input] |
idt h m |
MD5 checksum |
idt hash sha256 [input] |
idt h s256 |
SHA-256 checksum |
idt hash verify <hash> [input] |
idt h v |
Verify a hash matches input |
idt h s256 "hello" # 2cf24dba...
idt h m file.txt # Hash file contents
echo "hello" | idt h s256
idt h v 2cf24dba... "hello" # ✓ match / ✗ mismatch
num / n - Number conversion
| Command |
Alias |
Description |
idt num hex <n> |
idt n x |
Decimal → Hex |
idt num bin <n> |
idt n b |
Decimal → Binary |
idt n x 255 # 0xFF
idt n b 10 # 0b1010
completions - Shell completions
idt completions bash # Bash
idt completions zsh # Zsh
idt completions fish # Fish
idt completions powershell
Global Flags
Available on every command:
| Flag |
Description |
-c, --copy |
Copy output to clipboard |
--json |
Force JSON output |
--table |
Force table output |
--plain |
Disable colors and styling |
--debug |
Show full error traces |
idt g u --copy # UUID generated + copied to clipboard
idt nw p l --json # Port list as JSON array
idt p u "https://..." --json | jq '.host'
Configuration (.idtrc)
idt supports a two-layer TOML config. The project-level file overrides the global one:
~/.idtrc ← Global defaults
<project>/.idtrc ← Project overrides (walks up from CWD)
Supported fields:
auto_copy = false # Auto-copy all output to clipboard
default_output = "pretty" # "pretty" | "json" | "table" | "plain"
color = true # Enable ANSI colors
default_secret_len = 32 # Default length for `idt gen secret`
default_lorem_count = 5 # Default word count for `idt gen lorem`
Example - project that always outputs JSON for piping:
# myproject/.idtrc
default_output = "json"
auto_copy = false
Piping
Most commands read from stdin when no argument is provided:
echo '{"a":1}' | idt f j
cat token.txt | idt dc jwt
cat data.yaml | idt cv y2j | jq '.users[]'
echo "Hello World" | idt s snake
Development
cargo build # Debug build
cargo build --release # Optimized release binary → target/release/idt
cargo test # Unit + integration tests
cargo clippy -- -D warnings
bash scripts/smoke_test.sh # Full smoke test suite
Project structure
src/
├── main.rs Entry point, SIGPIPE handling, error formatting
├── cli.rs Full clap command tree with aliases
├── config.rs Two-layer .idtrc loader
├── utils/
│ ├── ui.rs TTY-aware print helpers (success/error/warn)
│ ├── output.rs OutputMode resolver
│ └── clipboard.rs arboard wrapper
└── commands/
├── gen/ uuid, secret, bcrypt, rsa, lorem, qr, gitignore
├── format/ json, sql
├── parse/ url
├── encode/ base64, url, html
├── decode/ base64, url, html, jwt
├── str_cmd/ case conversion, count
├── time_cmd/ now, convert
├── web/ status, serve, headers
├── network/ ip, port, wait
├── env_cmd/ sort, compare, strip
├── convert/ yaml, csv
├── color/ convert, preview
├── hash_cmd/ md5, sha256, verify
└── num/ hex, bin
Docs
中文文档
continue reading on github →