| Crates.io | dev-kit |
| lib.rs | dev-kit |
| version | 0.1.11 |
| created_at | 2025-12-28 04:30:54.8461+00 |
| updated_at | 2026-01-19 15:53:20.317527+00 |
| description | DevKit Command-Line App |
| homepage | https://github.com/wenhaozhao/dev-kit |
| repository | https://github.com/wenhaozhao/dev-kit |
| max_upload_size | |
| id | 2008230 |
| size | 176,572 |
A collection of utilities and tools for development.
d.
$ devkit uri decode 'foo%20bar'
foo bar
e.
$ devkit uri encode 'foo bar'
foo%20bar
p.
$ devkit uri parse 'https://example.com/path?a=1&b=2'
scheme: https
host: example.com
port: 443
path: /path
query:
a=1
b=2
All JSON tools support the following input types:
$ devkit json beauty '{"a":1}'
$ devkit json beauty data.json
$ devkit json beauty https://api.example.com/data.json
$ devkit json beauty 'cat data.json'
-.
$ cat data.json | devkit json beauty -
$ devkit json beauty 'GET https://api.example.com/data.json
Accept: application/json'
b, query, q, search, s, format, f.
# Format
$ devkit json beauty '{"a":1,"b":2}'
{
"a": 1,
"b": 2
}
# Query with JSONPath
$ devkit json query -q '$.a' '{"a":1,"b":2}'
1
# Query with key pattern: contains 'items'
$ devkit json query -q 'items' '{"items":[1,2,3]}'
{
"$.items": [
[
1,
2,
3
]
]
}
# Query with value pattern: digit only
$ devkit json query -q '\d' '{"items":[1,2,3]}'
{
"$.items[*]": [
1,
2,
3
],
"$.items[0]": [
1
],
"$.items[1]": [
2
],
"$.items[2]": [
3
]
}
d.
$ devkit json diff '{"a":1}' '{"a":2}' --diff-tool vscode
-q, --query <QUERY>: Extract content using JSONPath/Key/Value pattern before processing.--query-type <TYPE>: Query type: jsonpath (jp), prefix (p), suffix (s), contains (c), regex (r). Auto-detects if not set.--beauty: Beauty output.-f, --file <FILE>: Write output to a file (for Beauty and Query).--diff-tool <TOOL>: Diff tool to use: idea, vscode, zed, etc.# Get current time (RFC3339)
$ devkit time now
2023-10-27T10:00:00+08:00
# Get current millisecond timestamp
$ devkit time now -f ts
1698372000000
# Get current time with custom format
$ devkit time now -f "%Y-%m-%d %H:%M:%S"
# Parse timestamp
$ devkit time parse 1698372000000
2023-10-27T10:00:00+08:00
# Parse string and convert format
$ devkit time parse "2023-10-27 10:00:00" -f ts
1698372000000
-t, --tz, --timezone <TIMEZONE>: Specify timezone (e.g., +08:00).-f, --format <FORMAT>: Output format: rfc3339, ts, or custom format (e.g., %Y-%m-%d).--iu, --input-unit <UNIT>: Input timestamp unit: s, ms.--ou, --output-unit <UNIT>: Output timestamp unit: s, ms.Supports alias b64.
e.
$ devkit base64 encode 'hello world'
aGVsbG8gd29ybGQ=
d.
$ devkit base64 decode 'aGVsbG8gd29ybGQ='
hello world
-u, --url-safe: Use URL-safe Base64.-n, --no-pad: No padding.-r, --raw-output: Raw output (for Decode).-f, --file <FILE>: Write output to a file.Generate QR codes from text or URLs. Supports alias qr.
# Output as text (default)
$ devkit qrcode 'https://github.com/wenhaozhao/dev-kit'
# Save as image
$ devkit qrcode 'https://github.com/wenhaozhao/dev-kit' -o image -f qr.png
-o, --output-type, --type <TYPE>: Output type: text (default), image, svg.-e, --ec-level, --ecl <LEVEL>: Error correction level: l (7%), m (15%), q (25%), h (30%).-v, --version <VERSION>: QR code version (1-40 or auto).-p, --plain: Plain text output without details.cargo install --path ./dk
To use the devkit command from anywhere, ensure that the Cargo binary directory is in your PATH.
For most users, this means adding ~/.cargo/bin to your PATH environment variable.
Add this line to your .bashrc, .zshrc, or equivalent:
export PATH="$HOME/.cargo/bin:$PATH"
Add %USERPROFILE%\.cargo\bin to your Path environment variable via the System Environment Variables settings.
devkit --help