Everything you need to make a modern server. Packed into a single executable with zero dependencies. Built for Human and AI collaboration.
One small binary. Everything inside. No npm, pip, or cargo needed.
Hot-reloaded scripts with caching. No compile step, just edit and test.
Simple, consistent scripting language. Full docs and examples built in.
Let your AI code faster in a language made for it. Connect your app to popular AI agents.
Templates, routing, JSON, SSL, JWT, CORS, RSA, websockets. Fully featured and built-in.
Thread-safe data structures for process coordination, caching, and session state.
Sandbox mode restricts file access and uses virtual filesystem for safety.
Breakpoints, stack traces, code context. Handle one issue at a time.
Wrap your app scripts into a standalone executable. Extend with Go if needed.
Supports Linux, macOS, and Windows. One build, every platform.
Simple syntax. Consistent naming. Predictable behavior. Reduced complexity.
Full standard library and community contributions. Everything included in each binary release.
Duso is written in the language made by Google for solid and efficient concurrency at scale.
Apache 2.0 licensed. Community-driven and fully transparent.
Duso was designed to be quickly learned by most AI coding assistants.
# start here!
duso -read
# look up a specific function or lib
duso -doc claude
Start with a simple sample project.
duso -init myproject
One-shot Q&A style prompts are easy.
ai = require("ollama")
print(ai.prompt("sup?"))
You can add system prompt and tools, but this will get you started. Displays a cute "busy" spinner while waiting for a response.
ai = require("openai")
chat = ai.session()
while true do
prompt = input("\n\nYou: ")
if lower(prompt) == "exit" then break end
write("\n\nOpenAI: ")
busy("thinking...")
write(chat.prompt(prompt))
end
Prompts experts in parallel, gathers their responses, then runs them through a summary prompt.
ai = require("claude")
prompt = input("Ask the panel: ")
busy("asking...")
// build an array of functions to prompt
// each expert, then run them all in parallel
experts = ["Astronomer", "Astrologer", "Biologist", "Accountant"]
responses = parallel(map(experts, function(expert)
return function()
return ai.prompt(prompt, {
system = """
You are an expert {{expert}}. Always reason and
interact from this mindset. Limit your field of
knowledge to this expertise.
""",
max_tokens = 500
})
end
end))
// prepend the expert type into their response
for i = 0, 3 do
responses[i] = "{{experts[i]}} says: {{responses[i]}}"
end
busy("summarizing...")
summary = ai.prompt("""
Summarize these responses:
{{join(responses, "\n\n---\n\n")}}
List 3 the things they have in common.
Then list the 3 things that are the most different.
Don't separate with ---
""")
// format the markdown response for the terminal
print(markdown_ansi(summary))
You can run a web server from the command line.
# http://localhost:8080
duso -c 'http_server().start()'
Build an HTTP API with routing and JSON responses.
Best practice is one handler script per route to make
each more manageable and efficient at runtime. Each time
a route is triggered, http_server runs a new instance
of that script to handle it.
// server.du
port = 3000
server = http_server({port = port})
server.route("GET", "/api/user/:id", "user-get.du")
server.route("POST", "/api/user", "user-post.du")
print("Server running at http://localhost:{{port}}")
server.start()
// ...script blocks while server is running...
print("Server stopped.")
// user-get.du
ctx = context()
req = ctx.request()
res = ctx.response()
user = datastore("users").get(req.params.id)
if not user then res.error(404) end
res.json({
success = true,
data = user
}, 200)
// user-post.du
ctx = context()
req = ctx.request()
res = ctx.response()
id = uuid()
datastore("users").set(id, req.body)
res.json({
id = id,
name = req.body.name
}, 201)
Most languages prioritize human expressiveness and can be challenging for AI. For example, Python and JavaScript offer countless ways to solve the same problem, filled with subtle footguns and "magic" behavior. Their massive ecosystems with thousands of overlapping modules with hidden dependencies often confuse both humans and AI. Systems languages like Go reduce ambiguity and debugging but add complexity that slows development.
Duso is intentionally boring and predictable. No clever syntax tricks. No multiple ways to do the same thing. Every pattern is consistent and straightforward so AI can reason about code reliably, write better scripts faster, and use fewer tokens doing it. Plus, its entire runtime and ecosystem is included in a single binary. No package management or version conflicts. Built for LLMs first means everything is frictionless so you and your AI work more productively together.