devtk
v1.0.0
Published
25+ developer tools in your terminal. Generate mock data, hash strings, encode/decode, and more.
Maintainers
Readme
DevToolbox CLI
25+ developer tools in your terminal. Generate mock data from TypeScript interfaces, hash strings, encode/decode, convert timestamps, and more.
Install
npm install -g devtkOr use without installing:
npx devtk mock "export type User = { name: string; email: string; }"🎲 Mock Data Generator — The Flagship Feature
Generate realistic mock data directly from TypeScript interfaces:
devtk mock 'export type User = {
id: string;
name: string;
email: string;
age: number;
isActive: boolean;
createdAt: string;
}'Output:
[
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Sarah Chen",
"email": "[email protected]",
"age": 28,
"isActive": true,
"createdAt": "2025-09-15"
}
]Smart Type Inference
You don't need to specify generators — it detects field names automatically:
| Field Name | Generates | Field Name | Generates |
|------------|-----------|------------|-----------|
| id, *Id | UUID | email | real emails |
| name, firstName | real names | phone | phone numbers |
| startTime/endTime | datetime | price/amount | $currency |
| isActive/enabled | boolean | status | status strings |
| city | city names | company | company names |
| createdAt | date | imageUrl/avatar | image URLs |
| title | sentences | description | paragraphs |
| ...and 30+ more | | | |
Your Exact Use Case
# TypeScript interface → instant mock data
devtk mock 'export type TIntervalQueryS2E = {
startTime: string;
endTime: string;
};' -n 3[
{ "startTime": "2025-09-15T14:23:41Z", "endTime": "2026-01-28T08:45:12Z" },
{ "startTime": "2025-06-03T19:12:55Z", "endTime": "2025-11-19T22:33:08Z" },
{ "startTime": "2026-02-14T06:55:30Z", "endTime": "2025-08-22T11:28:47Z" }
]Output Formats
# JSON (default)
devtk mock "export type User = { name: string; }" -f json
# CSV
devtk mock "export type Product = { id: string; price: string; }" -f csv
# SQL INSERT statements
devtk mock "export type Order = { orderId: string; amount: string; }" -f sql
# TypeScript interface + data
devtk mock "export type User = { name: string; }" -f typescriptPipe from Files
# Read from a file
devtk mock ./types.ts
# Pipe from stdin
cat types.ts | devtk mock --count 20Reproducible Data
# Same seed = same data every time
devtk mock "export type User = { name: string; }" --seed 42All Commands
Mock Data
devtk mock <interface> # Generate mock data
-n, --count <number> # Number of rows (default: 5)
-f, --format <format> # json, csv, sql, typescript
-s, --seed <number> # Seed for reproducible dataHash
devtk hash "hello world"
# SHA-1: 2aae6c35...
# SHA-256: b94d27b9...
# SHA-512: 309ecc48...Base64
devtk base64 encode "hello" # aGVsbG8=
devtk base64 decode "aGVsbG8=" # helloUUID
devtk uuid # Generate 1 UUID
devtk uuid -n 5 # Generate 5 UUIDs
devtk uuid -n 3 -u # 3 uppercase UUIDsTimestamp
devtk timestamp # Current Unix timestamp
devtk timestamp -c 1712923200 # Convert Unix → human
devtk timestamp -d "2024-01-15" # Convert date → UnixURL
devtk url encode "hello world & foo=bar" # hello%20world%20%26%20foo%3Dbar
devtk url decode "hello%20world" # hello worldSlug
devtk slug "Hello World! 2026 🎉" # hello-world-2026
devtk slug "My Blog Post" -s _ # my_blog_postNumber Base
devtk base 42 # 42 in decimal → binary, octal, hex
devtk base ff -f 16 # 0xFF → all bases
devtk base 1010 -f 2 # binary → all basesCron
devtk cron "0 9 * * 1" # Runs on Monday, at 09:00
devtk cron "*/15 * * * *" # Runs every 15 minutesJWT Decode
devtk jwt eyJhbGciOiJIUzI1NiJ9.eyJzdWIi...
# Decodes header + payload + shows expiryLorem Ipsum
devtk lorem # 3 paragraphs
devtk lorem -n 5 -t sentences # 5 sentences
devtk lorem -n 50 -t words # 50 wordsWeb Version
Try all 26 tools in your browser: devtk-app.web.app
License
MIT © Askin John Samuel
