Start fresh with a new open source server engine that has everything you need. No npm, no async/await, no bloat. Just a new, simple scripting language built on a powerful, massively concurrent runtime made with Go. Hot reload as you code, then deploy anywhere as a single 10MB binary.
npm install. pip install. Hundreds of packages, version conflicts, and security updates before you write a line.
Build tools, configs, boilerplate. Hours of setup and learning curve before you can actually code.
Languages built for humans write sloppy code. Unclear syntax and ambiguous patterns lead to costly AI mistakes.
One 10MB binary. Everything inside. No npm, pip, or cargo needed.
Hot-reloaded scripts with caching. No compile step, just edit and test.
New script language features simple syntax with predictable behavior.
Templates, routing, JSON, SSL, JWT, CORS, RSA, websockets. Fully featured and built-in.
Let your AI code faster in a language made for it. Connect your app to popular AI agents.
For in-memory caching and process coordination, and even long-term ACID-compliant storage.
Duso has built-in support for Postgres, MySQL, MariaDB, TiDB, and CockroachDB.
Simple API backed by Go's efficient goroutines. Run thousands of parallel operations.
Upload, crop, scale, and convert between PNG, GIF, and JPEG. Save, load, and transform images.
Sandbox mode restricts file access and uses virtual filesystem for safety.
Use Duso to build config, setup, diagnostics, and other command line tools.
App code, full runtime, all dependencies in a single, tiny executable.
Supports Linux, macOS, and Windows. One build, every platform.
Hot reload, instant feedback, intuitive syntax. Development feels effortless and enjoyable.
No callbacks either. Enjoy the simple coding freedom of a real concurrency model.
Markdown, regex, crypto, base64, UUID, date/time, math, HTTP client. Everything you need built in.
Community modules bundled in the binary like Claude, OpenAI, Ollama, Gemini, CouchDB, and Stripe.
Duso was written in Go, a battle-tested language made by Google to build efficient concurrent systems at scale.
You're not forced into multiple servers. Scale up simply by adding more cores to your server.
Duso runs great on the cheapest virtual servers with a resting memory use of ~5MB.
Breakpoints, stack traces, code context. Even tames concurrent errors. Handle one issue at a time.
120+ functions and library modules with integrated examples and guides. Learn as you build.
Look up reference for any function, keyword, type, or module right from the command line.
Warns about parsing errors and more subtle code issues that might break at runtime.
LSP server, syntax highlighting, autocomplete, hints, and diagnostics for VS Code, Zed, NeoVim etc.
Duso is new, but solid. It's already running API servers, web servers, and static site builds.
Apache 2.0 licensed. Community-driven and fully transparent.
Duso was designed to be quickly learned by most AI coding assistants. All Duso documentation and examples are included in its binary.
# start here!
duso -read
# look up a specific function or lib
duso -doc claude
Start with a simple sample project. Several are included to help you get started. Plus there are dozens of examples you can extract as well. Or jump into the interactive REPL to test code directly.
# pick from 5 starter projects
duso -init myproject
# extract examples to local directory
duso -extract examples /tmp
# interactive REPL to test code
duso -repl
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. Builtins like parallel() and spawn() are backed by simple and efficient goroutines. Multi-line strings and versatile string templates are built into Duso, making it easy to compose prompts, SQL, and other long strings.
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:
{{replace(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.
""")
// 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()'
Spawn multiple worker scripts that process items from a datastore queue. Workers block on pop_wait() until tasks arrive, coordinate via shared datastore, and record results. Demonstrates concurrent processing with simple synchronization.
// queue-main.du
queue = datastore("tasks")
queue.set("done", 0)
// Spawn 3 workers
for i = 1, 3 do
spawn("queue-worker.du", {id = i})
end
// Queue 5 tasks
for i = 1, 5 do
queue.push("jobs", {name = "Task {{i}}"})
end
// Wait for all to complete
queue.wait("done", 5)
// Show results
work = queue.get("results")
for job in work do
print("✓ {{job.name}} by worker {{job.id}}")
end
// queue-worker.du
ctx = context()
id = ctx.id
queue = datastore("tasks")
while true do
job = queue.pop_wait("jobs", timeout = 5)
if not job then break end
sleep(random() * 2)
queue.push("results", {id = id, name = job.name})
queue.increment("done")
end
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 spawns a goroutine that runs a cached,
pre-parsed instance of that script to handle it. It’s a simple pattern
that’s also hyper efficient.
// 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")
// make users datastore use acid-compliant persistence
users = datastore("users", {
persist = "/tmp/users.gob",
wal = "/tmp/users.wal",
wal_sync_interval = 900
})
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()
user = parse_json(req.body)
datastore("users").set(id, user)
res.json({
id = id,
name = user.name
}, 201)
Duso is intentionally simple and predictable. No magic. No multiple ways to do the same thing. Every pattern is consistent so AI can reason about code reliably and write better scripts faster.
Duso is a joy to use. Everything including the runtime, libs, and docs is bundled in a single 10MB binary. No package management. No version conflicts. No stack building. Duso makes coding fun again.