Recipes

Prompt on the left. Code on the right. Sometimes the code is shorter.

Basics

Prompt

"Write a function that adds two numbers and returns the result. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 add.nerd
fn add a b
ret a plus b

MCP (Model Context Protocol)

Prompt

"List all available tools from an MCP server. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 tools.nerd
mcp tools "https://mcp.example.com"
Prompt

"Use the web_search tool from an MCP server. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 use_tool.nerd
mcp use "https://mcp.example.com" "web_search" "{\"query\":\"NERD lang\"}"
Prompt

"Read a config file from an MCP resource. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 read_resource.nerd
mcp read "https://mcp.example.com" "file:///config.json"
Prompt

"Get a summarize prompt template from an MCP server. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 get_prompt.nerd
mcp prompt "https://mcp.example.com" "summarize" "{\"style\":\"brief\"}"

Agents

Prompt

"Ask Claude what Cloudflare Workers is in one sentence. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 agent.nerd
llm claude "What is Cloudflare Workers? One sentence."

HTTP

Prompt

"Make an authenticated GET request with a Bearer token. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 auth.nerd
http get "https://api.example.com/data" auth bearer "token123"

JSON

Prompt

"Fetch a GitHub user and print their follower count. Use https://nerd-lang.org/llms.txt for syntax."

馃搫 github.nerd
let user http get "https://api.github.com/users/octocat"
out user."followers"

Get startedMore examples on GitHub