[{"data":1,"prerenderedAt":1087},["ShallowReactive",2],{"navigation_docs":3,"-guides-operations":270,"-guides-operations-surround":1082},[4,28,51,110,243],{"title":5,"path":6,"stem":7,"children":8},"Get started","\u002Fget-started","1.get-started",[9,12,16,20,24],{"title":10,"path":6,"stem":11},"Overview","1.get-started\u002Findex",{"title":13,"path":14,"stem":15},"Why Kraft","\u002Fget-started\u002Fwhy-kraft","1.get-started\u002F0.why-kraft",{"title":17,"path":18,"stem":19},"Install","\u002Fget-started\u002Finstall","1.get-started\u002F1.install",{"title":21,"path":22,"stem":23},"Your first work item","\u002Fget-started\u002Ffirst-work-item","1.get-started\u002F2.first-work-item",{"title":25,"path":26,"stem":27},"Troubleshooting and FAQ","\u002Fget-started\u002Ftroubleshooting","1.get-started\u002F3.troubleshooting",{"title":29,"path":30,"stem":31,"children":32},"Concepts","\u002Fconcepts","2.concepts",[33,35,39,43,47],{"title":10,"path":30,"stem":34},"2.concepts\u002Findex",{"title":36,"path":37,"stem":38},"Vocabulary","\u002Fconcepts\u002Fvocabulary","2.concepts\u002F1.vocabulary",{"title":40,"path":41,"stem":42},"How a work item runs","\u002Fconcepts\u002Fhow-a-work-item-runs","2.concepts\u002F2.how-a-work-item-runs",{"title":44,"path":45,"stem":46},"Caps and budgets","\u002Fconcepts\u002Fcaps-and-budgets","2.concepts\u002F3.caps-and-budgets",{"title":48,"path":49,"stem":50},"Why a permission gate","\u002Fconcepts\u002Fpermission-gate","2.concepts\u002F4.permission-gate",{"title":52,"path":53,"stem":54,"children":55},"Guides","\u002Fguides","3.guides",[56,58,62,66,70,74,78,82,86,90,94,98,102,106],{"title":10,"path":53,"stem":57},"3.guides\u002Findex",{"title":59,"path":60,"stem":61},"Use Kraft from your agent","\u002Fguides\u002Fagent-integration","3.guides\u002F01.agent-integration",{"title":63,"path":64,"stem":65},"Kraft Lite","\u002Fguides\u002Fkraft-lite","3.guides\u002F02.kraft-lite",{"title":67,"path":68,"stem":69},"Remote access","\u002Fguides\u002Fremote-access","3.guides\u002F03.remote-access",{"title":71,"path":72,"stem":73},"Add or override a harness","\u002Fguides\u002Fadding-a-harness","3.guides\u002F04.adding-a-harness",{"title":75,"path":76,"stem":77},"Schedule or webhook work","\u002Fguides\u002Fschedule-and-webhook-work","3.guides\u002F05.schedule-and-webhook-work",{"title":79,"path":80,"stem":81},"Add a security review or a gate reviewer","\u002Fguides\u002Fadd-review-agents","3.guides\u002F06.add-review-agents",{"title":83,"path":84,"stem":85},"Kraft for VS Code","\u002Fguides\u002Fvscode","3.guides\u002F07.vscode",{"title":87,"path":88,"stem":89},"Reviewing a change","\u002Fguides\u002Freview-a-change","3.guides\u002F08.review-a-change",{"title":91,"path":92,"stem":93},"Write your own chain","\u002Fguides\u002Fwrite-your-own-chain","3.guides\u002F09.write-your-own-chain",{"title":95,"path":96,"stem":97},"Switch a harness","\u002Fguides\u002Fswitch-harness","3.guides\u002F10.switch-harness",{"title":99,"path":100,"stem":101},"Upgrade your templates","\u002Fguides\u002Fupgrading-templates","3.guides\u002F11.upgrading-templates",{"title":103,"path":104,"stem":105},"Operations","\u002Fguides\u002Foperations","3.guides\u002F12.operations",{"title":107,"path":108,"stem":109},"Worker Kit","\u002Fguides\u002Fworker-kit","3.guides\u002F13.worker-kit",{"title":111,"path":112,"stem":113,"children":114},"Reference","\u002Freference","4.reference",[115,117,139,183,201,205,227,231,235,239],{"title":10,"path":112,"stem":116},"4.reference\u002Findex",{"title":118,"path":119,"stem":120,"children":121},"CLI","\u002Freference\u002Fcli","4.reference\u002F1.cli\u002Findex",[122,123,127,131,135],{"title":10,"path":119,"stem":120},{"title":124,"path":125,"stem":126},"Item verbs","\u002Freference\u002Fcli\u002Fitem","4.reference\u002F1.cli\u002F2.item",{"title":128,"path":129,"stem":130},"View verbs","\u002Freference\u002Fcli\u002Fview","4.reference\u002F1.cli\u002F3.view",{"title":132,"path":133,"stem":134},"Repo verbs","\u002Freference\u002Fcli\u002Frepo","4.reference\u002F1.cli\u002F4.repo",{"title":136,"path":137,"stem":138},"Admin verbs","\u002Freference\u002Fcli\u002Fadmin","4.reference\u002F1.cli\u002F5.admin",{"title":140,"path":141,"stem":142,"children":143},"Configuration","\u002Freference\u002Fconfiguration","4.reference\u002F2.configuration\u002Findex",[144,145,155,159,163,167,171,175,179],{"title":10,"path":141,"stem":142},{"title":146,"path":147,"stem":148,"children":149},"Repos","\u002Freference\u002Fconfiguration\u002Frepos","4.reference\u002F2.configuration\u002F2.repos\u002Findex",[150,151],{"title":10,"path":147,"stem":148},{"title":152,"path":153,"stem":154},"Workspaces","\u002Freference\u002Fconfiguration\u002Frepos\u002Fworkspaces","4.reference\u002F2.configuration\u002F2.repos\u002F3.workspaces",{"title":156,"path":157,"stem":158},"Policy","\u002Freference\u002Fconfiguration\u002Fpolicy","4.reference\u002F2.configuration\u002F3.policy",{"title":160,"path":161,"stem":162},"Library and chains","\u002Freference\u002Fconfiguration\u002Flibrary-and-chains","4.reference\u002F2.configuration\u002F4.library-and-chains",{"title":164,"path":165,"stem":166},"Harnesses file","\u002Freference\u002Fconfiguration\u002Fharnesses-file","4.reference\u002F2.configuration\u002F5.harnesses-file",{"title":168,"path":169,"stem":170},"Access","\u002Freference\u002Fconfiguration\u002Faccess","4.reference\u002F2.configuration\u002F6.access",{"title":172,"path":173,"stem":174},"Intake","\u002Freference\u002Fconfiguration\u002Fintake","4.reference\u002F2.configuration\u002F7.intake",{"title":176,"path":177,"stem":178},"Sandbox host","\u002Freference\u002Fconfiguration\u002Fsandbox","4.reference\u002F2.configuration\u002F8.sandbox",{"title":180,"path":181,"stem":182},"Environment variables","\u002Freference\u002Fconfiguration\u002Fenvironment-variables","4.reference\u002F2.configuration\u002F9.environment-variables",{"title":184,"path":185,"stem":186,"children":187},"Chain nodes","\u002Freference\u002Fchain-nodes","4.reference\u002F3.chain-nodes\u002Findex",[188,189,193,197],{"title":10,"path":185,"stem":186},{"title":190,"path":191,"stem":192},"Subprocess tasks","\u002Freference\u002Fchain-nodes\u002Fsubprocess-tasks","4.reference\u002F3.chain-nodes\u002F2.subprocess-tasks",{"title":194,"path":195,"stem":196},"Fix loop and judge","\u002Freference\u002Fchain-nodes\u002Ffix-loop","4.reference\u002F3.chain-nodes\u002F3.fix-loop",{"title":198,"path":199,"stem":200},"Result file","\u002Freference\u002Fchain-nodes\u002Fresult-file","4.reference\u002F3.chain-nodes\u002F4.result-file",{"title":202,"path":203,"stem":204},"Permission gate","\u002Freference\u002Fpermissions","4.reference\u002F4.permissions",{"title":206,"path":207,"stem":208,"children":209},"Agent harnesses","\u002Freference\u002Fharnesses","4.reference\u002F5.harnesses\u002Findex",[210,211,215,219,223],{"title":10,"path":207,"stem":208},{"title":212,"path":213,"stem":214},"Unattended runs","\u002Freference\u002Fharnesses\u002Funattended-runs","4.reference\u002F5.harnesses\u002F2.unattended-runs",{"title":216,"path":217,"stem":218},"Agent profiles","\u002Freference\u002Fharnesses\u002Fagent-profiles","4.reference\u002F5.harnesses\u002F3.agent-profiles",{"title":220,"path":221,"stem":222},"Harness files","\u002Freference\u002Fharnesses\u002Fharness-files","4.reference\u002F5.harnesses\u002F4.harness-files",{"title":224,"path":225,"stem":226},"Fallback and escalation","\u002Freference\u002Fharnesses\u002Ffallback-and-escalation","4.reference\u002F5.harnesses\u002F5.fallback-and-escalation",{"title":228,"path":229,"stem":230},"Inbound triggers","\u002Freference\u002Ftriggers","4.reference\u002F6.triggers",{"title":232,"path":233,"stem":234},"HTTP API","\u002Freference\u002Fhttp-api","4.reference\u002F7.http-api",{"title":236,"path":237,"stem":238},"MCP tools","\u002Freference\u002Fmcp-tools","4.reference\u002F8.mcp-tools",{"title":240,"path":241,"stem":242},"Events","\u002Freference\u002Fevents","4.reference\u002F9.events",{"title":244,"path":245,"stem":246,"children":247},"Project","\u002Fproject","5.project",[248,250,254,258,262,266],{"title":10,"path":245,"stem":249},"5.project\u002Findex",{"title":251,"path":252,"stem":253},"Architecture","\u002Fproject\u002Farchitecture","5.project\u002F1.architecture",{"title":255,"path":256,"stem":257},"Contributing","\u002Fproject\u002Fcontributing","5.project\u002F2.contributing",{"title":259,"path":260,"stem":261},"Security","\u002Fproject\u002Fsecurity","5.project\u002F3.security",{"title":263,"path":264,"stem":265},"Data and privacy","\u002Fproject\u002Fdata-and-privacy","5.project\u002F4.data-and-privacy",{"title":267,"path":268,"stem":269},"Status and support","\u002Fproject\u002Fstatus-and-support","5.project\u002F5.status-and-support",{"id":271,"title":272,"body":273,"description":1075,"extension":1076,"links":1077,"meta":1078,"navigation":1079,"path":104,"seo":1080,"stem":105,"__hash__":1081},"docs\u002F3.guides\u002F12.operations.md","Operate a Kraft server",{"type":274,"value":275,"toc":1062},"minimark",[276,280,285,340,344,358,361,400,403,443,454,465,478,483,502,509,513,519,566,569,626,632,636,643,646,693,703,713,716,735,739,742,748,781,802,828,837,842,876,888,892,895,917,932,982,985,988,1002,1006,1029,1039,1043,1058],[277,278,279],"p",{},"The day-to-day care of a Kraft install: backups, logs, disk space, a second\ninstance, and running Kraft as a service.",[281,282,284],"h2",{"id":283},"before-you-start","Before you start",[286,287,288,314,320],"ul",{},[289,290,291,292,296,297,300,301,304,305,308,309,313],"li",{},"Everything below lives under ",[293,294,295],"code",{},"$KRAFT_HOME",", which is ",[293,298,299],{},"~\u002F.kraft"," unless you\nset it. ",[293,302,303],{},"run\u002F"," holds the state, ",[293,306,307],{},"templates\u002F"," holds the config. See\n",[310,311,263],"a",{"href":312},"\u002Fproject\u002Fdata-and-privacy#secrets-and-state"," for what each\nfile holds.",[289,315,316,317,319],{},"The commands assume the default home. Put your own path in place of\n",[293,318,299],{}," if you moved it.",[289,321,322,323,327,328,331,332,335,336,339],{},"If Kraft runs as a ",[310,324,326],{"href":325},"#run-kraft-as-a-service","service",", ",[293,329,330],{},"kraft admin stop","\ndoes not keep it stopped: the service manager starts it again. Where a step\nsays to stop the server, run ",[293,333,334],{},"kraft admin uninstall-service"," instead, and\n",[293,337,338],{},"kraft admin install-service"," when you are done.",[281,341,343],{"id":342},"back-up-the-database","Back up the database",[277,345,346,349,350,353,354,357],{},[293,347,348],{},"run\u002Forchestrator.db"," holds every work item, event, session and review\nthread. Kraft runs SQLite in WAL mode, so recent writes can sit in\n",[293,351,352],{},"orchestrator.db-wal"," beside it. Copying ",[293,355,356],{},"orchestrator.db"," alone while the\nserver runs can give you a copy that is missing them, or one that does not\nopen.",[277,359,360],{},"Use SQLite's online backup, which is safe while the server runs:",[362,363,368],"pre",{"className":364,"code":365,"language":366,"meta":367,"style":367},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","sqlite3 ~\u002F.kraft\u002Frun\u002Forchestrator.db \".backup '$HOME\u002Fkraft-backup.db'\"\n","bash","",[293,369,370],{"__ignoreMap":367},[371,372,375,379,383,387,390,394,397],"span",{"class":373,"line":374},"line",1,[371,376,378],{"class":377},"sBMFI","sqlite3",[371,380,382],{"class":381},"sfazB"," ~\u002F.kraft\u002Frun\u002Forchestrator.db",[371,384,386],{"class":385},"sMK4o"," \"",[371,388,389],{"class":381},".backup '",[371,391,393],{"class":392},"sTEyZ","$HOME",[371,395,396],{"class":381},"\u002Fkraft-backup.db'",[371,398,399],{"class":385},"\"\n",[277,401,402],{},"Or stop the server first, then copy the file:",[362,404,406],{"className":364,"code":405,"language":366,"meta":367,"style":367},"kraft admin stop\ncp ~\u002F.kraft\u002Frun\u002Forchestrator.db ~\u002Fkraft-backup.db\nkraft admin start --detach\n",[293,407,408,419,430],{"__ignoreMap":367},[371,409,410,413,416],{"class":373,"line":374},[371,411,412],{"class":377},"kraft",[371,414,415],{"class":381}," admin",[371,417,418],{"class":381}," stop\n",[371,420,422,425,427],{"class":373,"line":421},2,[371,423,424],{"class":377},"cp",[371,426,382],{"class":381},[371,428,429],{"class":381}," ~\u002Fkraft-backup.db\n",[371,431,433,435,437,440],{"class":373,"line":432},3,[371,434,412],{"class":377},[371,436,415],{"class":381},[371,438,439],{"class":381}," start",[371,441,442],{"class":381}," --detach\n",[277,444,445,446,448,449,453],{},"Back up ",[293,447,307],{}," too. It is your config, and it is small. See\n",[310,450,452],{"href":451},"\u002Fguides\u002Fupgrading-templates#keep-your-templates-in-git","Keep your templates in git",".",[277,455,456,457,460,461,464],{},"You do not need to back up ",[293,458,459],{},"run\u002Findex.db",". It is the search index, and\n",[293,462,463],{},"kraft admin reindex"," rebuilds it.",[277,466,467,468,470,471,473,474,477],{},"To restore, stop the server, put the backup in place as\n",[293,469,348],{},", delete any ",[293,472,352],{}," and\n",[293,475,476],{},"orchestrator.db-shm"," beside it, and start the server again.",[479,480,482],"h3",{"id":481},"verify-the-backup","Verify the backup",[362,484,486],{"className":364,"code":485,"language":366,"meta":367,"style":367},"sqlite3 ~\u002Fkraft-backup.db \"PRAGMA integrity_check; SELECT count(*) FROM work_items;\"\n",[293,487,488],{"__ignoreMap":367},[371,489,490,492,495,497,500],{"class":373,"line":374},[371,491,378],{"class":377},[371,493,494],{"class":381}," ~\u002Fkraft-backup.db",[371,496,386],{"class":385},[371,498,499],{"class":381},"PRAGMA integrity_check; SELECT count(*) FROM work_items;",[371,501,399],{"class":385},[277,503,504,505,508],{},"It prints ",[293,506,507],{},"ok",", then the number of work items.",[281,510,512],{"id":511},"find-the-logs","Find the logs",[277,514,515,516,453],{},"All logs are in ",[293,517,518],{},"run\u002Flogs\u002F",[520,521,522,535],"table",{},[523,524,525],"thead",{},[526,527,528,532],"tr",{},[529,530,531],"th",{},"File",[529,533,534],{},"Holds",[536,537,538,556],"tbody",{},[526,539,540,546],{},[541,542,543],"td",{},[293,544,545],{},"server.log",[541,547,548,549,551,552,555],{},"The server's own output: startup, shutdown and its reason, errors. A foreground ",[293,550,412],{}," writes here as well as to the terminal. Kraft moves it to ",[293,553,554],{},"server.log.1"," at start once it passes about 8 MB, replacing the last one.",[526,557,558,563],{},[541,559,560],{},[293,561,562],{},"\u003Csession id>.log",[541,564,565],{},"One worker session: everything an agent or command printed. Kraft never deletes these.",[277,567,568],{},"Read a session's log through Kraft rather than by file name:",[362,570,572],{"className":364,"code":571,"language":366,"meta":367,"style":367},"kraft view logs ID                    # the item's latest session\nkraft view logs ID --session SESSION  # one session\nkraft view logs ID -f                 # follow a running session\n",[293,573,574,591,610],{"__ignoreMap":367},[371,575,576,578,581,584,587],{"class":373,"line":374},[371,577,412],{"class":377},[371,579,580],{"class":381}," view",[371,582,583],{"class":381}," logs",[371,585,586],{"class":381}," ID",[371,588,590],{"class":589},"sHwdD","                    # the item's latest session\n",[371,592,593,595,597,599,601,604,607],{"class":373,"line":421},[371,594,412],{"class":377},[371,596,580],{"class":381},[371,598,583],{"class":381},[371,600,586],{"class":381},[371,602,603],{"class":381}," --session",[371,605,606],{"class":381}," SESSION",[371,608,609],{"class":589},"  # one session\n",[371,611,612,614,616,618,620,623],{"class":373,"line":432},[371,613,412],{"class":377},[371,615,580],{"class":381},[371,617,583],{"class":381},[371,619,586],{"class":381},[371,621,622],{"class":381}," -f",[371,624,625],{"class":589},"                 # follow a running session\n",[277,627,628,631],{},[293,629,630],{},"kraft view events ID --type worker_session_created --json"," lists the item's\nsession ids.",[281,633,635],{"id":634},"reclaim-disk-space","Reclaim disk space",[277,637,638,639,642],{},"Each work item gets a git worktree in ",[293,640,641],{},"run\u002Fworktrees\u002F\u003Citem id>\u002F",", a full\ncheckout of its repo, plus any dependencies its setup command installed. That\nadds up.",[277,644,645],{},"A worktree is removed when the item is abandoned or archived:",[286,647,648,659,673],{},[289,649,650,654,655,658],{},[651,652,653],"strong",{},"Abandon"," a work item you no longer want: ",[293,656,657],{},"kraft item abandon ID --yes",".\nIt removes the worktree and deletes the item's local branch. It destroys\nuncommitted work.",[289,660,661,664,665,668,669,672],{},[651,662,663],{},"Archive"," a completed or abandoned item from the board's Done group, or\nwith ",[293,666,667],{},"POST \u002Fapi\u002Fwork-items\u002FID\u002Farchive",". It removes the worktree, the local\nbranch and the attachment copies in ",[293,670,671],{},"run\u002Fattachments\u002F",", and keeps the\nitem's record.",[289,674,675,678,679,682,683,686,687,690,691,453],{},[651,676,677],{},"Auto-archive."," ",[293,680,681],{},"archive.after_days"," in ",[293,684,685],{},"policy.yaml"," archives completed\nand abandoned items that old. The shipped file sets ",[293,688,689],{},"30",". Lower it to\nreclaim space sooner. See ",[310,692,156],{"href":157},[277,694,695,698,699,702],{},[293,696,697],{},"kraft item complete"," and ",[293,700,701],{},"kraft item cancel"," keep the worktree until the\nitem is archived.",[277,704,705,706,708,709,712],{},"Session logs in ",[293,707,518],{}," and result files in ",[293,710,711],{},"run\u002Fresults\u002F"," stay after\narchiving. Delete old ones by hand if they grow, with the server stopped.",[277,714,715],{},"To see what uses space:",[362,717,719],{"className":364,"code":718,"language":366,"meta":367,"style":367},"du -sh ~\u002F.kraft\u002Frun\u002F*\n",[293,720,721],{"__ignoreMap":367},[371,722,723,726,729,732],{"class":373,"line":374},[371,724,725],{"class":377},"du",[371,727,728],{"class":381}," -sh",[371,730,731],{"class":381}," ~\u002F.kraft\u002Frun\u002F",[371,733,734],{"class":392},"*\n",[281,736,738],{"id":737},"run-two-instances","Run two instances",[277,740,741],{},"Two instances need separate homes and separate ports. A second server on the\nsame port refuses to start and names the one already there.",[277,743,744,745,747],{},"Start the second instance once on a free port. The first start seeds its\n",[293,746,307],{},":",[362,749,751],{"className":364,"code":750,"language":366,"meta":367,"style":367},"KRAFT_HOME=~\u002Fkraft-staging KRAFT_PORT=8766 kraft admin start --detach\n",[293,752,753],{"__ignoreMap":367},[371,754,755,758,761,764,767,769,772,775,777,779],{"class":373,"line":374},[371,756,757],{"class":392},"KRAFT_HOME",[371,759,760],{"class":385},"=",[371,762,763],{"class":381},"~\u002Fkraft-staging",[371,765,766],{"class":392}," KRAFT_PORT",[371,768,760],{"class":385},[371,770,771],{"class":381},"8766",[371,773,774],{"class":377}," kraft",[371,776,415],{"class":381},[371,778,439],{"class":381},[371,780,442],{"class":381},[277,782,783,784,787,788,790,791,794,795,797,798,801],{},"Then write the port into that home's ",[293,785,786],{},"access.yaml",", so the server and the\n",[293,789,412],{}," command find it without ",[293,792,793],{},"KRAFT_PORT",". A port given only as ",[293,796,793],{},"\nor ",[293,799,800],{},"--port"," is not saved, and every other command would still dial 8765:",[362,803,805],{"className":364,"code":804,"language":366,"meta":367,"style":367},"printf 'port: 8766\\n' >> ~\u002Fkraft-staging\u002Ftemplates\u002Faccess.yaml\n",[293,806,807],{"__ignoreMap":367},[371,808,809,813,816,819,822,825],{"class":373,"line":374},[371,810,812],{"class":811},"s2Zo4","printf",[371,814,815],{"class":385}," '",[371,817,818],{"class":381},"port: 8766\\n",[371,820,821],{"class":385},"'",[371,823,824],{"class":385}," >>",[371,826,827],{"class":381}," ~\u002Fkraft-staging\u002Ftemplates\u002Faccess.yaml\n",[277,829,830,831,833,834,836],{},"Create ",[293,832,307],{}," only this way. Kraft seeds a home only when ",[293,835,307],{},"\ndoes not exist yet, so a directory you made by hand stays empty.",[277,838,839,840,747],{},"Run every command for that instance with the same ",[293,841,757],{},[362,843,845],{"className":364,"code":844,"language":366,"meta":367,"style":367},"KRAFT_HOME=~\u002Fkraft-staging kraft view list\nKRAFT_HOME=~\u002Fkraft-staging kraft admin stop\n",[293,846,847,862],{"__ignoreMap":367},[371,848,849,851,853,855,857,859],{"class":373,"line":374},[371,850,757],{"class":392},[371,852,760],{"class":385},[371,854,763],{"class":381},[371,856,774],{"class":377},[371,858,580],{"class":381},[371,860,861],{"class":381}," list\n",[371,863,864,866,868,870,872,874],{"class":373,"line":421},[371,865,757],{"class":392},[371,867,760],{"class":385},[371,869,763],{"class":381},[371,871,774],{"class":377},[371,873,415],{"class":381},[371,875,418],{"class":381},[277,877,878,879,881,882,884,885,887],{},"Workers inherit their instance's ",[293,880,757],{},", so their own ",[293,883,412],{}," calls\nreach the instance that started them. An agent you run yourself reaches the\ninstance its environment names, so start it with the same ",[293,886,757],{}," to use\nthe second one.",[281,889,891],{"id":890},"run-kraft-as-a-service","Run Kraft as a service",[277,893,894],{},"A service starts Kraft at login and restarts it if it exits:",[362,896,898],{"className":364,"code":897,"language":366,"meta":367,"style":367},"kraft admin stop\nkraft admin install-service\n",[293,899,900,908],{"__ignoreMap":367},[371,901,902,904,906],{"class":373,"line":374},[371,903,412],{"class":377},[371,905,415],{"class":381},[371,907,418],{"class":381},[371,909,910,912,914],{"class":373,"line":421},[371,911,412],{"class":377},[371,913,415],{"class":381},[371,915,916],{"class":381}," install-service\n",[277,918,919,920,923,924,927,928,931],{},"On macOS this writes a launchd agent,\n",[293,921,922],{},"~\u002FLibrary\u002FLaunchAgents\u002Fcom.kraft.daemon.plist",", and loads it. On Linux it\nwrites a systemd user unit, ",[293,925,926],{},"~\u002F.config\u002Fsystemd\u002Fuser\u002Fkraft.service",", and enables\nit. ",[293,929,930],{},"install-service"," refuses while a server is running, so stop it first.",[277,933,934,935,937,938,941,942,327,944,327,947,950,951,327,954,698,957,959,960,327,963,327,966,969,970,972,973,975,976,978,979,981],{},"The service gets the environment of the shell you ran ",[293,936,930],{}," from:\n",[293,939,940],{},"PATH",", and ",[293,943,757],{},[293,945,946],{},"KRAFT_RUN_DIR",[293,948,949],{},"KRAFT_TEMPLATES_DIR",",\n",[293,952,953],{},"KRAFT_SKILLS_DIR",[293,955,956],{},"KRAFT_HOST",[293,958,793],{}," when set. Run it from a shell\nwhere ",[293,961,962],{},"claude",[293,964,965],{},"git",[293,967,968],{},"gh"," and your other tools are on ",[293,971,940],{},". To pick up a\nchanged ",[293,974,940],{}," later, run ",[293,977,334],{},", then\n",[293,980,930],{}," again.",[277,983,984],{},"There is one service per user. Its launchd label and systemd unit name are\nfixed, so run a second instance by hand.",[277,986,987],{},"To remove it:",[362,989,991],{"className":364,"code":990,"language":366,"meta":367,"style":367},"kraft admin uninstall-service\n",[293,992,993],{"__ignoreMap":367},[371,994,995,997,999],{"class":373,"line":374},[371,996,412],{"class":377},[371,998,415],{"class":381},[371,1000,1001],{"class":381}," uninstall-service\n",[479,1003,1005],{"id":1004},"verify-the-service","Verify the service",[362,1007,1009],{"className":364,"code":1008,"language":366,"meta":367,"style":367},"kraft admin restart\nkraft admin health\n",[293,1010,1011,1020],{"__ignoreMap":367},[371,1012,1013,1015,1017],{"class":373,"line":374},[371,1014,412],{"class":377},[371,1016,415],{"class":381},[371,1018,1019],{"class":381}," restart\n",[371,1021,1022,1024,1026],{"class":373,"line":421},[371,1023,412],{"class":377},[371,1025,415],{"class":381},[371,1027,1028],{"class":381}," health\n",[277,1030,1031,1034,1035,1038],{},[293,1032,1033],{},"restart"," goes through the service manager when a service is installed.\n",[293,1036,1037],{},"health"," exits 0 once the server is back.",[281,1040,1042],{"id":1041},"related","Related",[286,1044,1045,1049,1053],{},[289,1046,1047],{},[310,1048,180],{"href":181},[289,1050,1051],{},[310,1052,136],{"href":137},[289,1054,1055],{},[310,1056,1057],{"href":26},"Troubleshooting",[1059,1060,1061],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":367,"searchDepth":421,"depth":421,"links":1063},[1064,1065,1068,1069,1070,1071,1074],{"id":283,"depth":421,"text":284},{"id":342,"depth":421,"text":343,"children":1066},[1067],{"id":481,"depth":432,"text":482},{"id":511,"depth":421,"text":512},{"id":634,"depth":421,"text":635},{"id":737,"depth":421,"text":738},{"id":890,"depth":421,"text":891,"children":1072},[1073],{"id":1004,"depth":432,"text":1005},{"id":1041,"depth":421,"text":1042},"Back up Kraft's database, find its logs, reclaim worktree disk space, run two instances side by side, and run Kraft as a service.","md",null,{},{"title":103},{"title":272,"description":1075},"QiebhdaweWazgZowE6X_dedLWqiNE-xVV9nrrsGWY9U",[1083,1085],{"title":99,"path":100,"stem":101,"description":1084,"children":-1},"Pick up new shipped chains, library tasks and policy after a Kraft upgrade, without losing your own edits.",{"title":107,"path":108,"stem":109,"description":1086,"children":-1},"Build a Docker Sandbox Kit for Kraft's Claude workers, push it to your registry, and run a repository's sandbox from it, pinned by digest.",1790824507533]