26 Unix tools. One binary. Zero dependencies.·the missing coreutils for the agent era·vrk mcp - expose all 26 tools to any AI agent·curl vrk.sh/install.sh | sh - ready in 5 seconds·

vrk recase

vrk recase converts between naming conventions - snake_case, camelCase, kebab-case, PascalCase, and more.

The problem

Converting 200 field names from snake_case to camelCase takes 30 lines of Python to handle edge cases: leading underscores, consecutive capitals, numeric suffixes. sed 's/_\(.\)/\U\1/g' handles simple cases but breaks on acronyms like http_api_url.

The solution

vrk recase converts between naming conventions: snake_case, camelCase, PascalCase, kebab-case, SCREAMING_SNAKE, Title Case, and more. Auto-detects the input convention and handles acronyms correctly. Processes line by line for batch conversion.

Before and after

Before

echo 'user_first_name' | sed 's/_\(.\)/\U\1/g'
# Breaks on acronyms, doesn't handle PascalCase or kebab-case

After

echo 'user_first_name' | vrk recase --to camel

Example

echo 'user_first_name' | vrk recase --to camel

Exit codes

CodeMeaning
0Success
1Runtime error (I/O failure)
2–to missing or invalid value, interactive TTY with no stdin

Flags

FlagShortTypeDescription
--tostringTarget convention: camel, pascal, snake, kebab, screaming, title, lower, upper
--json-jboolEmit JSON per line: {input, output, from, to}
--quiet-qboolSuppress stderr output

Supported conventions

ConventionExampleFlag value
camelCasehelloWorldcamel
PascalCaseHelloWorldpascal
snake_casehello_worldsnake
kebab-casehello-worldkebab
SCREAMING_SNAKEHELLO_WORLDscreaming
Title CaseHello Worldtitle
lowercasehello worldlower
UPPERCASEHELLO WORLDupper

Input convention is auto-detected. You only need to specify the target.

How it works

$ echo 'hello_world' | vrk recase --to camel
helloWorld

$ echo 'helloWorld' | vrk recase --to snake
hello_world

$ echo 'user_first_name' | vrk recase --to pascal
UserFirstName

$ echo 'UserFirstName' | vrk recase --to kebab
user-first-name

Batch conversion

Processes line by line, so you can convert multiple names at once:

$ printf 'user_first_name\nuser_last_name\nemail_address\n' | vrk recase --to camel
userFirstName
userLastName
emailAddress

JSON output

$ echo 'hello_world' | vrk recase --to camel --json
{"input":"hello_world","output":"helloWorld","from":"snake","to":"camel"}

Pipeline integration

Convert API field names

# Extract keys from a JSON object and convert to camelCase
echo '{"user_name":"alice","email_addr":"[email protected]"}' | \
  jq -r 'keys[]' | vrk recase --to camel

Rename files in a directory

# Convert kebab-case filenames to snake_case
for f in *.md; do
  NEWNAME=$(echo "${f%.md}" | vrk recase --to snake).md
  mv "$f" "$NEWNAME"
done

When it fails

Missing –to flag:

$ echo 'hello' | vrk recase
usage error: recase: --to is required
$ echo $?
2

Invalid convention:

$ echo 'hello' | vrk recase --to unknown
usage error: recase: unsupported convention "unknown"
$ echo $?
2