DGC v0.47.2Edit on GitHub ↗
Features/Artifacts
preview what the agent builds on a localhost URL
Artifacts
#An artifact is how the agent proposes something visual on a local URL — most often a plan. In plan mode, DGC renders the plan (plan.md) as a clean page and serves it, as a rendered page — so you read the steps, files and approach in your browser instead of raw markdown scrolling past. The agent can also serve any page/app/chart it builds the same way.
- Project previews share one server and port (
http://127.0.0.1:45000by default), with a top-left dropdown. Proposed plans use a separate transient loopback server so a LAN setting can never expose them. - DGC prints the URL in the terminal; open it in your browser.
- Run /artifact to see them, open one, stop one, or toggle localhost ⇄ LAN with
b. - Localhost or your LAN. By default the server binds
127.0.0.1(only this machine). Switch it to your local network (artifact_bind: lan, or pressbin/artifact) and it binds0.0.0.0with a shareable LAN URL — open your artifact on your phone or another device. (LAN means anyone on the network can view it — there's no auth.) Every preview shares one browser origin, so a page you preview can read and stop your other previews: preview pages you trust. - It persists. The list is saved, so after you restart
dgcthe server tries to reuse the same port with your artifacts intact (set the preferred port withartifact_port, turn off relaunch withartifact_autostart). Artifacts saved by an older DGC get new, unguessable ids the first time this version starts, so an old?a=a1link opens the newest preview, and they are served in the project-root way described below. - What gets served. The agent serves a page: an
.html/.htmfile, an image, an.svgor a.pdf, or a folder holding one — not a.md,.jsonor.txtfile on its own, and never a page inside a dot-folder. Dot-files and dot-folders (.env,.git,.dgc), key and credential files (*.pem,id_rsa,credentials.json,token.json, data files named likesecretorpassword), and symlinks that point outside the artifact's folder are never served, and there are no folder listings. - A page in its own folder (e.g.
artifacts/<name>/) is served as a whole site, except server-side source, config, databases, logs and backups (.py,.ts,.jsx,.yaml,.toml,.sqlite,.log,.bak…): those load only when one of its pages links to them, so a PyScriptmain.pyor a sql.js database works and an unlinked file does not. - A page in a project root is served with only the web files it links to (HTML, CSS, JS, JSON, images, fonts, media), found through its HTML attributes, its CSS, and the quoted file names in its scripts — resolved from the script and from the page, as the browser does. A project root is the project folder, your home folder or a personal folder in it (Downloads, Documents…), or any folder holding a project file (
.git,package.json,pyproject.toml,Makefile,requirements.txt,AGENTS.md…); a project nested inside a site folder is treated the same way. Manifests likepackage.json, build config likevite.config.js, other file types and the rest of the project never load, and neither do files whose names a script builds at runtime — put a multi-file site in its own folder. - Only your own addresses. The server answers to
localhost,127.0.0.1, this machine's LAN address and name in LAN mode, andartifact_hostname— any other Host is refused, so a web page cannot read artifacts through DNS rebinding. If you open previews through a forwarded or proxied name (a Codespaces*.app.github.devURL, a reverse proxy, a MagicDNS name), setartifact_hostnameto it. Stopping a preview from the browser needs a token that only the DGC artifacts page (the bar with the dropdown) carries, so another website cannot stop your previews.
Artifacts are built with DGC's own design language (the dgc-design skill) so the frontend looks polished by default. They stay on this machine unless you explicitly confirm LAN sharing; plan previews always stay private.