Skip to content

Quick Start

Create a file called hello.dvl:

Ask "What is your name?" as user name
Print user_name

Ask declares an input parameter. Print outputs a value.

Terminal window
devlish run hello.dvl --input '{"user_name": "World"}'

Output: World

Ask "Customer tier?" as customer tier
Ask "Deal size?" as deal size
discount_rate equals 0.05
If customer_tier is "enterprise"
discount_rate equals 0.15
discount equals deal_size times discount_rate
Print discount
Terminal window
devlish run pricing.dvl --input '{"customer_tier": "enterprise", "deal_size": 500000}'
# 75000
Terminal window
devlish validate pricing.dvl

Returns exit 0 if the file is valid, or diagnostic errors with line numbers.

Terminal window
devlish compile pricing.dvl --output pricing.dvlc.json
devlish disassemble pricing.dvlc.json
devlish run pricing.dvlc.json --input '{"customer_tier": "enterprise", "deal_size": 500000}'

Bytecode is the portable format. It runs natively (CLI), in browsers (WASM), or via MCP.

Replace Print with Respond with to return JSON instead of text:

Ask "Customer tier?" as customer tier
Ask "Deal size?" as deal size
discount_rate equals 0.05
If customer_tier is "enterprise"
discount_rate equals 0.15
discount equals deal_size times discount_rate
Respond with record with discount as amount and customer_tier as tier
Terminal window
devlish run pricing.dvl --input '{"customer_tier": "enterprise", "deal_size": 500000}'
# {"success":true,"responded":true,"response":{"amount":75000,"tier":"enterprise"}}
Command Description
devlish run <file> Run a .dvl source or .dvlc.json bytecode
devlish compile <file> Compile to bytecode
devlish validate <file> Check syntax
devlish lint <file> Style and correctness suggestions
devlish disassemble <file> Show bytecode instructions
devlish new <name> Scaffold a new project
devlish mcp Start the MCP server
devlish package Build a distributable artifact