[{"data":1,"prerenderedAt":474,"buildId":475},["ShallowReactive",2],{"docs-surround:\u002Fdocs\u002Fcontributing\u002Fbuild-from-source":3,"docs:\u002Fdocs\u002Fcontributing\u002Fbuild-from-source":9,"i-lucide:copy":364,"i-lucide:menu":369,"i-lucide:search":371,"navigation":373,"source":463},[4,8],{"title":5,"path":6,"stem":7,"children":-1},"Command line","\u002Fdocs\u002Freference\u002Fcommand-line","docs\u002F4.reference\u002F2.command-line",null,{"id":10,"title":11,"body":12,"description":356,"extension":357,"meta":358,"navigation":359,"path":360,"seo":361,"stem":362,"__hash__":363},"docs\u002Fdocs\u002F5.contributing\u002F1.build-from-source.md","Build from source",{"type":13,"value":14,"toc":345},"minimark",[15,25,30,79,82,86,89,92,102,109,113,119,148,156,159,165,169,183,208,213,220,224,234,240,244,250,253,257,281,285,311,326],[16,17,18,19,24],"p",{},"This page is for people who change zerohead. To use it, ",[20,21,23],"a",{"href":22},"\u002Fdocs\u002Fget-started\u002Finstall","install it",".",[26,27,29],"h2",{"id":28},"what-to-install","What to install",[31,32,33,53,63,69],"ul",{},[34,35,36,40,41,47,48,52],"li",{},[37,38,39],"strong",{},"Rust",", through ",[20,42,46],{"href":43,"rel":44},"https:\u002F\u002Frustup.rs",[45],"nofollow","rustup",". The repository pins its Rust version in ",[49,50,51],"code",{},"rust-toolchain.toml",", and rustup installs it on the first build.",[34,54,55,58,59,62],{},[37,56,57],{},"Node 24"," and ",[37,60,61],{},"pnpm",". They build the web app.",[34,64,65,68],{},[37,66,67],{},"git",". Company memory is a git repository for each company. Creating a company does not need git. The first use of memory does.",[34,70,71,74,75,24],{},[37,72,73],{},"An agent's command-line tool",", such as Claude Code. See ",[20,76,78],{"href":77},"\u002Fdocs\u002Fagents\u002Fclaude-code","Agents",[16,80,81],{},"The server is one native program. It builds for Windows, macOS and Linux. Its tests pass in CI on all three, but it has not been run by hand on Windows or macOS.",[26,83,85],{"id":84},"build","Build",[87,88],"clone-command",{},[16,90,91],{},"Run these from the repository root:",[93,94,100],"pre",{"className":95,"code":97,"language":98,"meta":99},[96],"language-sh","pnpm --dir web install\npnpm --dir web build\ncargo build --workspace\n","sh","",[49,101,97],{"__ignoreMap":99},[16,103,104,105,108],{},"The web app goes to ",[49,106,107],{},"web\u002Fdist",". A program built this way serves it from there; only a release build carries it inside.",[26,110,112],{"id":111},"start-the-server","Start the server",[93,114,117],{"className":115,"code":116,"language":98,"meta":99},[96],"cargo run -p zerohead -- serve\n",[49,118,116],{"__ignoreMap":99},[16,120,121,122,125,126,129,130,132,133,136,137,139,140,143,144,147],{},"By default the server listens on ",[49,123,124],{},"127.0.0.1"," at port ",[49,127,128],{},"4747",". Start it from the repository root. It looks for the built app in ",[49,131,107],{}," under the folder you start it from, and serves a small placeholder page when it finds none. Use ",[49,134,135],{},"ZEROHEAD_WEB_DIR"," to point it elsewhere. If an installed zerohead already uses port ",[49,138,128],{},", add ",[49,141,142],{},"--port"," with another port, and ",[49,145,146],{},"--home"," with another data folder.",[16,149,150,151,155],{},"The settings are environment variables and flags. ",[20,152,154],{"href":153},"\u002Fdocs\u002Freference\u002Fsettings","Settings"," lists them all.",[16,157,158],{},"To see whether a server is running:",[93,160,163],{"className":161,"code":162,"language":98,"meta":99},[96],"cargo run -p zerohead -- status\n",[49,164,162],{"__ignoreMap":99},[26,166,168],{"id":167},"where-the-data-lives","Where the data lives",[16,170,171,172,175,176,178,179,182],{},"zerohead keeps everything in one data folder. Set it with ",[49,173,174],{},"ZEROHEAD_HOME"," or ",[49,177,146],{},". Otherwise it is a folder called ",[49,180,181],{},"zerohead"," in your platform's data folder:",[31,184,185,196,202],{},[34,186,187,188,191,192,195],{},"Linux: ",[49,189,190],{},"~\u002F.local\u002Fshare"," (or ",[49,193,194],{},"$XDG_DATA_HOME",")",[34,197,198,199],{},"macOS: ",[49,200,201],{},"~\u002FLibrary\u002FApplication Support",[34,203,204,205],{},"Windows: ",[49,206,207],{},"%LOCALAPPDATA%",[16,209,210,211,24],{},"An installed zerohead and one you build share it unless you give one of them ",[49,212,146],{},[16,214,215,216,219],{},"Inside it, ",[49,217,218],{},"instance.sqlite"," holds the install. Each company has its own folder with a SQLite file, a memory repository and its run logs.",[26,221,223],{"id":222},"work-on-the-web-app","Work on the web app",[16,225,226,227,58,230,233],{},"While you change the app, run its dev server. It proxies the server's ",[49,228,229],{},"\u002Fws",[49,231,232],{},"\u002Fapi"," routes:",[93,235,238],{"className":236,"code":237,"language":98,"meta":99},[96],"pnpm --dir web dev\n",[49,239,237],{"__ignoreMap":99},[26,241,243],{"id":242},"check-your-build","Check your build",[93,245,248],{"className":246,"code":247,"language":98,"meta":99},[96],"cargo test --workspace\npnpm --dir web typecheck && pnpm --dir web test\n",[49,249,247],{"__ignoreMap":99},[16,251,252],{},"The tests never start a real agent. They use a test agent that ships in the repository.",[26,254,256],{"id":255},"run-connect-yourself","Run Connect yourself",[16,258,259,260,263,264,267,268,271,272,275,276,280],{},"The Connect service (accounts and the relay) is in the ",[49,261,262],{},"connect\u002F"," folder and runs on Cloudflare Workers. ",[49,265,266],{},"connect\u002FREADME.md"," has the steps to run it on your own machine, where it listens on ",[49,269,270],{},"http:\u002F\u002F127.0.0.1:8787",". Link a server to it with ",[49,273,274],{},"cargo run -p zerohead -- connect --url http:\u002F\u002F127.0.0.1:8787","; ",[20,277,279],{"href":278},"\u002Fdocs\u002Fusing-zerohead\u002Fremote-access","Remote access"," describes the rest.",[26,282,284],{"id":283},"make-a-release","Make a release",[16,286,287,288,291,292,295,296,299,300,303,304,307,308,24],{},"A release is made by a pull request that changes one number. Change ",[49,289,290],{},"version"," in ",[49,293,294],{},"Cargo.toml",", run ",[49,297,298],{},"cargo update --workspace"," so that ",[49,301,302],{},"Cargo.lock"," follows, and commit both. When that pull request is merged, the release workflow (",[49,305,306],{},".github\u002Fworkflows\u002Frelease.yml",") does the rest: it tags the commit, builds the release, uploads it and writes the release notes. This website deploys by itself whenever a change to it reaches ",[49,309,310],{},"main",[16,312,313,314,317,318,321,322,325],{},"The tests run on your machine before you open a pull request (",[49,315,316],{},"cargo test --workspace",", ",[49,319,320],{},"pnpm --dir web test","). Pull requests on GitHub only check that everything formats, lints, type-checks and builds; the full test run on Windows, macOS and Linux is the ",[37,323,324],{},"Tests"," workflow, started by hand.",[16,327,328,329,332,333,336,337,340,341,344],{},"To try the same on your own machine: ",[49,330,331],{},"scripts\u002Frelease-linux.sh \u003Cfolder>"," builds the release for Linux x86_64: the web app, then a static program (musl) with the web app inside (the ",[49,334,335],{},"embedded-web"," feature), packed with its SHA-256 and the ",[49,338,339],{},"latest"," file the install command reads. It uploads nothing. ",[49,342,343],{},"scripts\u002Ftest-install.sh \u003Cfolder>"," runs the install command against it, without touching your own install.",{"title":99,"searchDepth":346,"depth":346,"links":347},2,[348,349,350,351,352,353,354,355],{"id":28,"depth":346,"text":29},{"id":84,"depth":346,"text":85},{"id":111,"depth":346,"text":112},{"id":167,"depth":346,"text":168},{"id":222,"depth":346,"text":223},{"id":242,"depth":346,"text":243},{"id":255,"depth":346,"text":256},{"id":283,"depth":346,"text":284},"For people changing zerohead. What to install, how to build the server and the web app, and how a release is made.","md",{},true,"\u002Fdocs\u002Fcontributing\u002Fbuild-from-source",{"title":11,"description":356},"docs\u002F5.contributing\u002F1.build-from-source","DYyRTQQzfW47LgsOC_W8oTvt0_QnyoodzcCmBsKFeLU",{"left":365,"top":365,"width":366,"height":366,"rotate":365,"vFlip":367,"hFlip":367,"body":368},0,24,false,"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fg>",{"left":365,"top":365,"width":366,"height":366,"rotate":365,"vFlip":367,"hFlip":367,"body":370},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":365,"top":365,"width":366,"height":366,"rotate":365,"vFlip":367,"hFlip":367,"body":372},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"m21 21l-4.34-4.34\"\u002F>\u003Ccircle cx=\"11\" cy=\"11\" r=\"8\"\u002F>\u003C\u002Fg>",[374],{"title":375,"path":376,"stem":377,"children":378,"page":367},"Docs","\u002Fdocs","docs",[379,395,422,449,457],{"title":380,"path":381,"stem":382,"children":383,"page":367},"Get started","\u002Fdocs\u002Fget-started","docs\u002F1.get-started",[384,387,391],{"title":385,"path":22,"stem":386},"Install","docs\u002F1.get-started\u002F1.install",{"title":388,"path":389,"stem":390},"Pair a browser","\u002Fdocs\u002Fget-started\u002Fpair-a-browser","docs\u002F1.get-started\u002F2.pair-a-browser",{"title":392,"path":393,"stem":394},"Your first task","\u002Fdocs\u002Fget-started\u002Fyour-first-task","docs\u002F1.get-started\u002F3.your-first-task",{"title":396,"path":397,"stem":398,"children":399,"page":367},"Using zerohead","\u002Fdocs\u002Fusing-zerohead","docs\u002F2.using-zerohead",[400,404,408,412,416,420],{"title":401,"path":402,"stem":403},"Companies and agents","\u002Fdocs\u002Fusing-zerohead\u002Fcompanies-and-agents","docs\u002F2.using-zerohead\u002F1.companies-and-agents",{"title":405,"path":406,"stem":407},"Tasks and runs","\u002Fdocs\u002Fusing-zerohead\u002Ftasks-and-runs","docs\u002F2.using-zerohead\u002F2.tasks-and-runs",{"title":409,"path":410,"stem":411},"Company memory","\u002Fdocs\u002Fusing-zerohead\u002Fcompany-memory","docs\u002F2.using-zerohead\u002F3.company-memory",{"title":413,"path":414,"stem":415},"Budgets and approvals","\u002Fdocs\u002Fusing-zerohead\u002Fbudgets-and-approvals","docs\u002F2.using-zerohead\u002F4.budgets-and-approvals",{"title":417,"path":418,"stem":419},"Connectors","\u002Fdocs\u002Fusing-zerohead\u002Fconnectors","docs\u002F2.using-zerohead\u002F5.connectors",{"title":279,"path":278,"stem":421},"docs\u002F2.using-zerohead\u002F6.remote-access",{"title":78,"path":423,"stem":424,"children":425,"page":367},"\u002Fdocs\u002Fagents","docs\u002F3.agents",[426,429,433,437,441,445],{"title":427,"path":77,"stem":428},"Claude Code","docs\u002F3.agents\u002F1.claude-code",{"title":430,"path":431,"stem":432},"Codex","\u002Fdocs\u002Fagents\u002Fcodex","docs\u002F3.agents\u002F2.codex",{"title":434,"path":435,"stem":436},"OpenCode","\u002Fdocs\u002Fagents\u002Fopencode","docs\u002F3.agents\u002F3.opencode",{"title":438,"path":439,"stem":440},"Pi","\u002Fdocs\u002Fagents\u002Fpi","docs\u002F3.agents\u002F4.pi",{"title":442,"path":443,"stem":444},"Cursor","\u002Fdocs\u002Fagents\u002Fcursor","docs\u002F3.agents\u002F5.cursor",{"title":446,"path":447,"stem":448},"Scripts and HTTP","\u002Fdocs\u002Fagents\u002Fscripts-and-http","docs\u002F3.agents\u002F6.scripts-and-http",{"title":450,"path":451,"stem":452,"children":453,"page":367},"Reference","\u002Fdocs\u002Freference","docs\u002F4.reference",[454,456],{"title":154,"path":153,"stem":455},"docs\u002F4.reference\u002F1.settings",{"title":5,"path":6,"stem":7},{"title":458,"path":459,"stem":460,"children":461,"page":367},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F5.contributing",[462],{"title":11,"path":360,"stem":362},{"id":464,"clone":8,"description":465,"docsNotice":466,"extension":467,"meta":468,"status":469,"stem":472,"__hash__":473},"source\u002Fsource\u002Fprivate.yml","Run a company of AI agents on your own computer. The source will be published under MIT.","The source is not public yet. It will be published under MIT. The pages under Contributing describe working on it once it is.","yml",{},{"lead":470,"text":471},"Early.","The source is not public yet. It will be published under MIT.","source\u002Fprivate","ZIRSRgoDOBHkU54QRPpdRltyFcq_DTWub-4p70w1DaY",1796109414252,"515e4a29-51e4-43d8-b774-a8b94f7dc369"]