Recipes
Prompt on the left. Code on the right. Sometimes the code is shorter.
Basics
"Write a function that adds two numbers and returns the result. Use https://nerd-lang.org/llms.txt for syntax."
fn add a b
ret a plus b
MCP (Model Context Protocol)
"List all available tools from an MCP server. Use https://nerd-lang.org/llms.txt for syntax."
mcp tools "https://mcp.example.com"
"Use the web_search tool from an MCP server. Use https://nerd-lang.org/llms.txt for syntax."
mcp use "https://mcp.example.com" "web_search" "{\"query\":\"NERD lang\"}"
"Read a config file from an MCP resource. Use https://nerd-lang.org/llms.txt for syntax."
mcp read "https://mcp.example.com" "file:///config.json"
"Get a summarize prompt template from an MCP server. Use https://nerd-lang.org/llms.txt for syntax."
mcp prompt "https://mcp.example.com" "summarize" "{\"style\":\"brief\"}"
Agents
"Ask Claude what Cloudflare Workers is in one sentence. Use https://nerd-lang.org/llms.txt for syntax."
llm claude "What is Cloudflare Workers? One sentence."
HTTP
"Make an authenticated GET request with a Bearer token. Use https://nerd-lang.org/llms.txt for syntax."
http get "https://api.example.com/data" auth bearer "token123"
JSON
"Fetch a GitHub user and print their follower count. Use https://nerd-lang.org/llms.txt for syntax."
let user http get "https://api.github.com/users/octocat"
out user."followers"