Dal is a complete terminal coding agent. Dalgona is dal with opinionated batteries, switched on through the same public extension door.
Dal works without dalgona. It ships the agent loop, providers, tools, Starlark extensions, terminal interface, session storage, manuals, and wire protocols in one product.
Dalgona reuses dal through the public extension interface and turns on batteries for orchestration, history, quality, judged rules, web, work, MCP, review, ask, skills, ttsr-rules, and procs. It keeps its own configuration, data, and sessions.
Binaries are dalgon (aliases dal, dl) and dalgona (alias dg). A plugin that loads in dalgon loads in dalgona.
Everything extends dal through one door. The door is one public interface. Plugins, other programs, and dalgona's batteries use it, and so does dal's own terminal.
In process, the Host and Agent seam carries one snapshot, one change stream, one command path, one request and answer pair, and one blob read. In plain words, a client reads the session state, follows its updates, sends a command, answers a request from the agent, and fetches stored data. A Host owns the live sessions. An Agent is a handle to one session.
Across processes, the same operations travel as JSON-RPC over stdio or a local socket. The manuals live behind that door at dal:// and dalgona://. Philosophy explains why dal has one door.
Build from source. No tagged release exists, so the registry and installer channels have nothing to fetch yet. Install dal and dalgona has the details for each OS.
You need git, the latest stable Rust toolchain, and a C toolchain. The symbol grammars compile through cc.
git clone https://github.com/gosuda/dalgona
cd dalgona
rustup update stable --no-self-update
cargo build --release --locked -p dalgon -p dalgona
export PATH="$PWD/target/release:$PATH"In PowerShell, run the first four commands. Then extend PATH with this line instead of export:
$env:PATH = "$PWD\target\release;$env:PATH"The binaries land in target/release/ (dalgon with dal and dl, plus dalgona with dg), assuming the default Cargo target directory (CARGO_TARGET_DIR and --target-dir move it). Run dalgon --version to check the install.
Supported platforms are Linux, macOS, and Windows on x86_64 and aarch64. Unsigned Windows binaries may trigger SmartScreen; verify the checksum where one is published. Configuration and data use the same XDG-style layout on every OS: $XDG_CONFIG_HOME/dal/ and $XDG_DATA_HOME/dal/. Without those variables, the defaults are ~/.config/dal/ and ~/.local/share/dal/ under your home directory. On Windows, the home directory is HOME, USERPROFILE, or HOMEDRIVE with HOMEPATH. Dalgona uses dalgona in place of dal. Plugins need no toolchain.
Sign in, pick a model, and run one prompt. Quickstart: run your first dal agent turn walks through each step.
dalgon login
dalgon
dalgon -p "Summarize this repository's README"dalgon login signs in to a provider. dalgon opens the terminal; type /model to pick a model, then send a prompt. dalgon -p runs one turn and exits; it needs a model. Dal asks before every patch and every exec.
To verify the install, run these checks. Each comment names the start of the real output or the exit code.
dalgon docs
# prints the dal manual index starting with `# dal://`
dalgon docs dal://cli
# prints the command-line page
dalgon login --help
# prints sign-in usage starting with `Sign in to a provider`
dalgon login status
# exit 1 with no credentials; lists providers as `not configured`- Complete alone: chat in the terminal, search and edit with approval, keep journals, and read
dal://without installing dalgona. - Same door: load any dal plugin in dalgona unchanged. Name a dalgona battery in
disabled_batteriesto leave it out. - Starlark plugins: ship tools, commands, hooks, skills, rules, and prompt text from one
plugin.starwith no compile step. A broken plugin stops startup and namespath:line:col./reloadkeeps the previous set on failure. - Approval first: ask before every
patchand everyexecby default. Headless runs deny when no person can answer.evalruns Starlark only and is not a sandbox. - Durable sessions: continue with
-c, resume with-r, branch with/forkand/clone, and share with/export. Compaction starts at 85 percent of the context window. - Terminal and headless: work inline or fullscreen, print with
-p, emit JSON with--json, or drive ACP, RPC, router, and A2A clients over one protocol. - Batteries on demand: run dalgona for orchestration, plan and todo, ask, web search and fetch, MCP client, review, judged rules, quality guard, history, skills, ttsr-rules, symbol search, hashline edits, and the deferred
procstool over background jobs.
Dal keeps its core small. It has no MCP client (dalgona ships one; a plugin can reach HTTP services with net.fetch), no plan or todo (dalgona ships both), and no subagents by default. There is no LSP in either product, no upload (/export writes a file you share yourself), no self-rebuild (/reload reloads plugins), nothing but Starlark in eval, no second store besides the journal, and no browser front end in the binary. The optional sandbox is off by default, guards the home directory, and sets no network restriction. A plugin runs with your permissions, so read it before you install it.
dalgon login
dalgon login status
dalgon models
dalgon logoutlogin signs in interactively or with --api-key or --device-auth where the provider supports it. login status exits 0 when at least one provider is ready and 1 otherwise, with a sign-in hint and no secret output. models lists models with built-in prices and sources. logout removes stored credentials. Secrets live in auth.json with mode 0600; the loader refuses symlinks and group or other permission bits.
dalgon docs
dalgon docs dal://cli
dalgona docs dalgona://batteriesWith no URI, docs prints the index. With a page URI, it prints the page. Unknown URIs fail with a miss message on stderr and nothing on stdout.
dal
dal --screen fullscreen
dalgonadal starts the inline terminal by default once a provider and model are set. --screen fullscreen uses the alternate screen and replays the settled transcript on exit. dalgona starts the batteries product with its own config, data, and sessions. You can type while dal works; a steer reaches the model at the next safe point, a follow-up waits for the turn to end, and stop ends the turn at once.
dalgon -p "Summarize the staged diff"
dalgon --json -o reply.md "Summarize the staged diff"
dalgon -c -p "Continue with the next file"
dalgon -r my-session -p "Resume and finish"These need a configured model; without one dalgon reports the missing model and how to set it. Print mode runs one turn and waits up to 3 seconds for extension status to go quiet. JSON mode writes one JSON result or error line on stdout (with the stop reason, not the assistant text) only after every status kind is quiet; pair it with -o FILE to save the assistant message. Common run flags are -m for model, --thinking, --mode, -n for name, -C for workspace directory, and --no-session to skip saving.
dalgon -p --approval ask "Inspect the build script"
dalgon -p --approval edits "Format and update the changelog"
dalgon -p --approval edits --sandbox "Run the test suite"Pass --approval and --sandbox as run modifiers on a TUI or headless invocation (without a prompt, bare dalgon --approval ... starts the TUI on a terminal and fails on a pipe). The default ask asks before every patch and every exec. edits approves edits without asking and still asks for exec. all approves every call and is only for runs already confined by an external sandbox; the built-in --sandbox sets no network restriction, so it is not that confinement. When no controller can answer, dal denies and says why. --sandbox runs exec children through the platform helper with workspace, temporary, cache, and sandbox_writable roots writable. dalgon serve binds loopback only unless --public is given with a token from dalgon serve token.
dalgon plugin list
dalgona plugin grant quality
dalgona plugin revoke qualityUser plugins load from the data root only, never from the workspace, and must be listed in plugins in dal.toml before dalgon plugin grant <name> can grant them. In dalgona, bundled batteries such as quality are already registered (dalgon alone rejects dalgon plugin grant quality as not configured). list shows configured plugins and persistent grants. grant and revoke change the stored grant; session grants end with their sessions.
dalgon serve
dalgon serve token
dalgon serve --public
dalgon serve --a2a
dalgon rpc
dalgon rpc --socket /tmp/dalgon.sock
dalgon completion bash
dalgon rules test "check this text"serve starts the local router; --public listens wider and requires a token, and --a2a enables the agent-to-agent surface. rpc serves JSON-RPC over stdio or a local socket. completion prints shell completions for bash, elvish, fish, powershell, and zsh. rules test simulates one stream rule against the given text with --source, --tool, and --path selectors.
The same pages live inside the binaries and in the checkout. Use dalgon docs for dal:// and dalgona docs for dalgona://.
Core use:
- Quickstart
- Install
- Command line
- Slash commands
- Settings in dal.toml
- Providers and models
- Tools, modes, and approval
Extension and session control:
- Plugins
- Port a pi extension
- Rules
- Symbols and structural editing
- Sandbox
- Complexity guard
- System prompt
- Sessions and compaction
- Terminal and keys
Clients and embedding:
- Protocol
- Router and A2A
- Embed in Rust
- Build a client
- Example plugins
- Philosophy: why dal has one extension door
Dalgona product:
Project contracts:
No CONTRIBUTING.md is checked in.
Work from the repository root. It holds one Cargo workspace and one Cargo.lock. Use the latest stable Rust toolchain.
Mirror the dal CI lane before review (.github/workflows/dal.yml):
cargo fmt --check
cargo clippy --workspace --exclude dalgona --exclude dalgona-batteries --exclude dalgona-gates --all-targets --all-features --locked -- -D warnings
cargo test --workspace --exclude dalgona --exclude dalgona-batteries --exclude dalgona-gates --all-features --locked
cargo deny --locked checkThe dal lane excludes the dalgona packages; the dalgona lane (.github/workflows/dalgona.yml) covers dalgona, dalgona-batteries, and dalgona-gates the same way, so match the scope to your change. AGENTS.md lists the merge gates. The timing-lane stress budgets (DAL_TIMING_BUDGETS) run only on schedule or manual dispatch, not on every push.
Regenerate the dal manual after doc changes with the docs-gen command recorded in AGENTS.md. Keep Linux, macOS, and Windows behavior in mind. Do not publish a crate, create or push a tag, create a release, or run a release workflow without explicit approval.
Report issues and propose changes as GitHub issues and pull requests against gosuda/dalgona.
Dal and dalgona are source-available under the Sustainable Use License, Version 1.0, with licensor metaphorics. Read the full terms in LICENSE.md.
This repository also includes Starlark translations of examples from pi (https://github.com/earendil-works/pi), Copyright (c) 2025 Mario Zechner, used under the MIT License; the license text is in docs/examples.md.