Quick Start

This guide shows you the basics — from your first command to piping data and running pipelines.

Your first commands

# Generate a UUID
devv uuid
# f47ac10b-58cc-4372-a567-0e02b2c3d479

# Format JSON
devv json format '{"name":"josh","tools":["devv"]}'
# {
#   "name": "josh",
#   "tools": [
#     "devv"
#   ]
# }

# Hash a string
devv hash "hello world" sha256
# b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

# Encode to Base64
devv base64 encode "my secret data"
# bXkgc2VjcmV0IGRhdGE=

Pipe from stdin

devv reads from stdin when data is piped in:

cat package.json | devv json format --sort-keys
curl -s https://api.example.com/data | devv json format
echo "hello world" | devv hash - sha256
echo "encoded" | devv base64 encode

Chain with pipelines

The real power — chain tools together:

# Format JSON, then Base64 encode the result
devv pipe exec "json-formatter | base64-encode" '{"key":"value"}'

# Decode base64, format as JSON
echo "eyJrZXkiOiJ2YWx1ZSJ9" | devv pipe exec "base64-decode | json-formatter"

Interactive REPL

Just type devv with no arguments:

$ devv

  devv v0.1.0 type a command or "help"

devv > uuid
f47ac10b-58cc-4372-a567-0e02b2c3d479

devv > json format {"a":1} | base64 encode
eyJhIjogMX0=

devv > exit

The REPL gives you tab completion, command history, and inline pipeline support.

What's next?

Was this page helpful?