Quick Start
1. Write a program
Section titled “1. Write a program”Create a file called hello.dvl:
Ask "What is your name?" as user namePrint user_nameAsk declares an input parameter. Print outputs a value.
2. Run it
Section titled “2. Run it”devlish run hello.dvl --input '{"user_name": "World"}'Output: World
3. Add logic
Section titled “3. Add logic”Ask "Customer tier?" as customer tierAsk "Deal size?" as deal size
discount_rate equals 0.05If customer_tier is "enterprise" discount_rate equals 0.15
discount equals deal_size times discount_ratePrint discountdevlish run pricing.dvl --input '{"customer_tier": "enterprise", "deal_size": 500000}'# 750004. Validate syntax
Section titled “4. Validate syntax”devlish validate pricing.dvlReturns exit 0 if the file is valid, or diagnostic errors with line numbers.
5. Compile to bytecode
Section titled “5. Compile to bytecode”devlish compile pricing.dvl --output pricing.dvlc.jsondevlish disassemble pricing.dvlc.jsondevlish 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.
6. Structured output
Section titled “6. Structured output”Replace Print with Respond with to return JSON instead of text:
Ask "Customer tier?" as customer tierAsk "Deal size?" as deal size
discount_rate equals 0.05If customer_tier is "enterprise" discount_rate equals 0.15
discount equals deal_size times discount_rateRespond with record with discount as amount and customer_tier as tierdevlish run pricing.dvl --input '{"customer_tier": "enterprise", "deal_size": 500000}'# {"success":true,"responded":true,"response":{"amount":75000,"tier":"enterprise"}}CLI commands
Section titled “CLI commands”| 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 |
What’s next
Section titled “What’s next”- Your First Tool - make this program callable by an LLM
- Language Reference - full syntax guide