Basic Syntax
The basic syntax for Devly CLI is:
devly [flags] <tool> [input]
Where:
- [flags] -- Optional flags like
--path,--export,--timeout,--set - <tool> -- The tool name (e.g.,
base64,jsonformat,hash) - [input] -- The input string to process (optional if using stdin or --path)
Command Options
| Flag | Short | Description |
|---|---|---|
| --path | -f | Read input directly from a file. Recommended for large files as the app reads the file itself without copying through shared storage. |
| --export | -o | Write output to a file instead of printing to terminal. Useful for large outputs. |
| --timeout | -t | Override the auto-selected timeout in seconds. Maximum is 300 seconds (5 minutes). |
| --list | -l | Show all available tools grouped by category. |
| --version | -v | Show the current version. |
| --help | -h | Show help information. |
| --set | -s | Override a tool option using key=value format. Can be specified multiple times. See --set examples below. |
--set Flag
The --set flag (short: -s) overrides a tool's default options from the command line using key=value format. This lets you control tool behaviour without opening the app.
# jsonpath — pass the path expression (pipe provides the JSON) curl -s https://dummyjson.com/users/1 | devly jsonpath --set path=$.firstName # jsonpath — with --path for the JSON file devly jsonpath --path data.json --set path=$.address.city # hmac — provide the secret key as an option echo "my message" | devly hmac --set secretKey=mysecret # Multiple --set flags at once devly jsonformat --path data.json --set sortKeys=true --set indent=4
For jsonpath, you can pass the path expression as a positional argument instead of using --set path=. Both of these are equivalent:
curl -s https://dummyjson.com/users/1 | devly jsonpath '$.firstName' curl -s https://dummyjson.com/users/1 | devly jsonpath --set path=$.firstName
Input Methods
Devly CLI supports multiple ways to provide input:
1. Direct Argument
Pass the input directly as an argument:
devly base64 "Hello World" # Output: SGVsbG8gV29ybGQ= devly jwt "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
2. Pipe from stdin
Pipe output from another command:
echo '{"name":"John","age":30}' | devly jsonformat cat response.json | devly jsonformat curl -s api.example.com/data | devly jsonformat
3. Redirect from file
Redirect file contents as input:
devly jsonformat < data.json devly yamlformat < config.yaml
4. Read from file (--path)
The recommended method for large files. The app reads the file directly:
devly jsonformat --path /path/to/large-file.json devly json2yaml -f config.json
When processing files larger than a few KB, using --path is more efficient because it avoids copying data through shared storage.
Output Options
Print to terminal (default)
By default, output is printed to stdout:
devly base64 "Hello" SGVsbG8=
Export to file (--export)
Save output directly to a file:
# Format JSON and save to file devly jsonformat --path data.json --export formatted.json # Convert JSON to YAML and save devly json2yaml --path config.json --export config.yaml # Short form devly jsonformat -f data.json -o pretty.json
Pipe to another command
Chain Devly with other tools:
# Format JSON and pipe to less for paging devly jsonformat --path large.json | less # Format JSON and copy to clipboard devly jsonformat --path data.json | pbcopy # Chain multiple operations cat data.json | devly jsonformat | grep "name"
Timeouts
Devly CLI automatically selects an appropriate timeout based on input size:
| Input Size | Auto Timeout |
|---|---|
| < 512 KB | 30 seconds |
| < 5 MB | 60 seconds |
| < 50 MB | 120 seconds |
| ≥ 50 MB | 180 seconds |
You can override this with --timeout:
# Set a 5-minute timeout for a complex operation devly jsonformat --path huge.json --timeout 300 # Short form devly json2yaml -f big.json -t 180
The maximum allowed timeout is 5 minutes (300 seconds). If your operation needs more time, consider breaking it into smaller chunks.
Resource Limits
Devly CLI limits memory usage to 30% of your system RAM. This protects your system from running out of memory when processing large files.
Some tools (like json2yaml) can expand input significantly in memory -- up to 20x for complex conversions. Devly estimates memory usage upfront and will reject jobs that would exceed the limit before any processing begins.
devly json2yaml --path massive.json # Error: Input too large. Estimated memory usage (4.2 GB) # exceeds the 30% system limit (2.4 GB).
Common Examples
Encoding & Decoding
# Base64 encode devly base64 "Hello World" # Base64 decode (input is already encoded) devly base64 "SGVsbG8gV29ybGQ=" # URL encode devly urlencode "Hello World & Goodbye" # JWT decode devly jwt "eyJhbGciOiJIUzI1NiIs..."
Formatting
# Format JSON from clipboard pbpaste | devly jsonformat | pbcopy # Format a JSON file in place devly jsonformat --path data.json --export data.json # Format SQL devly sqlformat "SELECT * FROM users WHERE id = 1" # Format YAML devly yamlformat --path config.yaml
Hashing
# Generate hash (shows all algorithms) devly hash "password123" # Generate UUID devly uuid # Generate random string devly randomstring
Conversions
# JSON to YAML devly json2yaml --path config.json --export config.yaml # XML to JSON devly xml2json --path data.xml # CSV to JSON devly csv2json --path data.csv --export data.json