[{"data":1,"prerenderedAt":624},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fextending":3},{"id":4,"title":5,"body":6,"description":16,"extension":618,"meta":619,"navigation":406,"path":620,"seo":621,"stem":622,"__hash__":623},"docs\u002Fdocs\u002Fv2\u002Fextending\u002Findex.md","Your Config",{"type":7,"value":8,"toc":608},"minimark",[9,13,17,25,30,33,134,152,155,159,166,239,250,256,260,263,355,362,369,373,376,413,471,480,488,492,498,505,511,514,523,527,530,538,541,545,552,563,567,577,586,595,604],[10,11,5],"h1",{"id":12},"your-config",[14,15,16],"p",{},"The TUI is yours to shape. Add commands, bind keys, build your own palettes, hook the\nlifecycle — in TypeScript, fully typed, with no build step and no imports.",[14,18,19,20,24],{},"Configuration lives with ",[21,22,23],"strong",{},"you",", not with your agents. An agent is portable: it carries\nits own modules, prompts and tools wherever it runs. How your terminal behaves is a\ndifferent thing entirely — it belongs to the person at the keyboard, and it follows you\nacross every agent you run.",[26,27,29],"h2",{"id":28},"where-it-lives","Where it lives",[14,31,32],{},"Your profile is a real directory, and everything in it is a real file.",[34,35,40],"pre",{"className":36,"code":37,"language":38,"meta":39,"style":39},"language-bash shiki shiki-themes dark-plus","~\u002F.axon\u002Fprofiles\u002F\u003Cyour-email>\u002F\n├── main.ts             # your config — commands, keys, palettes\n├── profile.config.ts   # which extensions load\n├── plugins\u002F            # lifecycle hooks; every file here loads automatically\n├── extensions\u002F         # appears when you install one\n├── agents\u002F             # your agent projects\n├── .axon\u002F              # generated types — never edit\n└── store\u002F              # credentials, history, settings — written by Axon\n","bash","",[41,42,43,52,67,78,89,100,111,122],"code",{"__ignoreMap":39},[44,45,48],"span",{"class":46,"line":47},"line",1,[44,49,51],{"class":50},"sTNBD","~\u002F.axon\u002Fprofiles\u002F\u003Cyour-email>\u002F\n",[44,53,55,59,63],{"class":46,"line":54},2,[44,56,58],{"class":57},"sCudf","├──",[44,60,62],{"class":61},"sKc5r"," main.ts",[44,64,66],{"class":65},"sOLPB","             # your config — commands, keys, palettes\n",[44,68,70,72,75],{"class":46,"line":69},3,[44,71,58],{"class":57},[44,73,74],{"class":61}," profile.config.ts",[44,76,77],{"class":65},"   # which extensions load\n",[44,79,81,83,86],{"class":46,"line":80},4,[44,82,58],{"class":57},[44,84,85],{"class":61}," plugins\u002F",[44,87,88],{"class":65},"            # lifecycle hooks; every file here loads automatically\n",[44,90,92,94,97],{"class":46,"line":91},5,[44,93,58],{"class":57},[44,95,96],{"class":61}," extensions\u002F",[44,98,99],{"class":65},"         # appears when you install one\n",[44,101,103,105,108],{"class":46,"line":102},6,[44,104,58],{"class":57},[44,106,107],{"class":61}," agents\u002F",[44,109,110],{"class":65},"             # your agent projects\n",[44,112,114,116,119],{"class":46,"line":113},7,[44,115,58],{"class":57},[44,117,118],{"class":61}," .axon\u002F",[44,120,121],{"class":65},"              # generated types — never edit\n",[44,123,125,128,131],{"class":46,"line":124},8,[44,126,127],{"class":57},"└──",[44,129,130],{"class":61}," store\u002F",[44,132,133],{"class":65},"              # credentials, history, settings — written by Axon\n",[14,135,136,137,139,140,143,144,147,148,151],{},"The split is deliberate. Everything at the top level is written by ",[21,138,23],{},". Everything\nunder ",[41,141,142],{},"store\u002F"," is written by ",[21,145,146],{},"Axon"," and is not meant to be edited by hand. ",[41,149,150],{},".axon\u002F"," is\nregenerated on every launch.",[14,153,154],{},"Axon creates this on first run. If a file is missing it is written; if you have edited\none, it is left exactly as you wrote it.",[26,156,158],{"id":157},"your-first-command","Your first command",[14,160,161,162,165],{},"Open ",[41,163,164],{},"main.ts"," and add:",[34,167,171],{"className":168,"code":169,"language":170,"meta":39,"style":39},"language-ts shiki shiki-themes dark-plus","commands.register(\"hello\", async () => {\n    tui.info(\"hello from my config\")\n}, { description: \"Say hello\" })\n","ts",[41,172,173,207,225],{"__ignoreMap":39},[44,174,175,179,182,185,188,191,194,198,201,204],{"class":46,"line":47},[44,176,178],{"class":177},"s3F5K","commands",[44,180,181],{"class":50},".",[44,183,184],{"class":57},"register",[44,186,187],{"class":50},"(",[44,189,190],{"class":61},"\"hello\"",[44,192,193],{"class":50},", ",[44,195,197],{"class":196},"scz_3","async",[44,199,200],{"class":50}," () ",[44,202,203],{"class":196},"=>",[44,205,206],{"class":50}," {\n",[44,208,209,212,214,217,219,222],{"class":46,"line":54},[44,210,211],{"class":177},"    tui",[44,213,181],{"class":50},[44,215,216],{"class":57},"info",[44,218,187],{"class":50},[44,220,221],{"class":61},"\"hello from my config\"",[44,223,224],{"class":50},")\n",[44,226,227,230,233,236],{"class":46,"line":69},[44,228,229],{"class":50},"}, { ",[44,231,232],{"class":177},"description:",[44,234,235],{"class":61}," \"Say hello\"",[44,237,238],{"class":50}," })\n",[14,240,241,242,245,246,249],{},"Restart Axon, press ",[41,243,244],{},":",", and type ",[41,247,248],{},"hello",". Your command sits in the palette beside the\nbuilt-in ones, with your description, tab-completion and all.",[14,251,252,253,255],{},"That is the whole loop. No imports, no wrapper, no build step — ",[41,254,178],{}," is a global,\nthe file runs on launch, and registering is a side effect of it running.",[26,257,259],{"id":258},"everything-is-typed","Everything is typed",[14,261,262],{},"Seven globals are available in every file in your profile:",[264,265,266,279],"table",{},[267,268,269],"thead",{},[270,271,272,276],"tr",{},[273,274,275],"th",{},"Global",[273,277,278],{},"What it controls",[280,281,282,293,303,315,325,335,345],"tbody",{},[270,283,284,290],{},[285,286,287],"td",{},[41,288,289],{},"tui",[285,291,292],{},"The terminal — navigation, messages, lifecycle hooks, quit",[270,294,295,300],{},[285,296,297],{},[41,298,299],{},"palette",[285,301,302],{},"Your own palettes, and asking the user a question",[270,304,305,309],{},[285,306,307],{},[41,308,178],{},[285,310,311,312,314],{},"The ",[41,313,244],{}," command tree",[270,316,317,322],{},[285,318,319],{},[41,320,321],{},"keys",[285,323,324],{},"Key chords",[270,326,327,332],{},[285,328,329],{},[41,330,331],{},"mode",[285,333,334],{},"Mode switching",[270,336,337,342],{},[285,338,339],{},[41,340,341],{},"input",[285,343,344],{},"The message box",[270,346,347,352],{},[285,348,349],{},[41,350,351],{},"agents",[285,353,354],{},"Agent instances — spawn, focus, stop, send",[14,356,357,358,361],{},"They are ambient: there is nothing to import, and your editor autocompletes all of them.\nType ",[41,359,360],{},"commands."," and see. That is the intended way to explore the API — the types are the\nreference, and they are always current.",[14,363,364,365,368],{},"Axon writes those declarations into ",[41,366,367],{},".axon\u002Ftypes\u002F"," every time it launches, so an upgrade\nthat adds a verb makes it available in your editor without you doing anything.",[26,370,372],{"id":371},"splitting-it-up","Splitting it up",[14,374,375],{},"A config grows. Split it whenever you like — an import is all it takes:",[34,377,379],{"className":168,"code":378,"language":170,"meta":39,"style":39},"\u002F\u002F main.ts\nimport \".\u002Fkeybindings\"\nimport \".\u002Fcommands\"\n\n\u002F\u002F ...anything else you want here\n",[41,380,381,386,395,402,408],{"__ignoreMap":39},[44,382,383],{"class":46,"line":47},[44,384,385],{"class":65},"\u002F\u002F main.ts\n",[44,387,388,392],{"class":46,"line":54},[44,389,391],{"class":390},"sYbnZ","import",[44,393,394],{"class":61}," \".\u002Fkeybindings\"\n",[44,396,397,399],{"class":46,"line":69},[44,398,391],{"class":390},[44,400,401],{"class":61}," \".\u002Fcommands\"\n",[44,403,404],{"class":46,"line":80},[44,405,407],{"emptyLinePlaceholder":406},true,"\n",[44,409,410],{"class":46,"line":91},[44,411,412],{"class":65},"\u002F\u002F ...anything else you want here\n",[34,414,416],{"className":168,"code":415,"language":170,"meta":39,"style":39},"\u002F\u002F keybindings.ts — no export, no wrapper\nkeys.register(\"ctrl+p\", async () => {\n    await palette.open(\"files\")\n})\n",[41,417,418,423,446,466],{"__ignoreMap":39},[44,419,420],{"class":46,"line":47},[44,421,422],{"class":65},"\u002F\u002F keybindings.ts — no export, no wrapper\n",[44,424,425,427,429,431,433,436,438,440,442,444],{"class":46,"line":54},[44,426,321],{"class":177},[44,428,181],{"class":50},[44,430,184],{"class":57},[44,432,187],{"class":50},[44,434,435],{"class":61},"\"ctrl+p\"",[44,437,193],{"class":50},[44,439,197],{"class":196},[44,441,200],{"class":50},[44,443,203],{"class":196},[44,445,206],{"class":50},[44,447,448,451,454,456,459,461,464],{"class":46,"line":69},[44,449,450],{"class":390},"    await",[44,452,453],{"class":177}," palette",[44,455,181],{"class":50},[44,457,458],{"class":57},"open",[44,460,187],{"class":50},[44,462,463],{"class":61},"\"files\"",[44,465,224],{"class":50},[44,467,468],{"class":46,"line":80},[44,469,470],{"class":50},"})\n",[14,472,473,474,477,478,181],{},"Importing the file ",[21,475,476],{},"is"," loading it. The registrations happen as the module body runs,\nexactly as they do in ",[41,479,164],{},[14,481,482,483,181],{},"Files load in the order you import them, which matters when two things want the same\nname — see ",[484,485,487],"a",{"href":486},"\u002Fdocs\u002Fv2\u002Fextending\u002Fcommands-and-keys","Commands & Keys",[26,489,491],{"id":490},"reloading","Reloading",[14,493,494,497],{},[21,495,496],{},"Save the file."," That is the whole loop — Axon watches your profile and\nreloads on write, so the moment your editor saves, the config is live: new\ncommands appear in the palette, rebound keys fire, renamed things stop existing,\na changed theme repaints.",[14,499,500,501,504],{},"Installing and uninstalling work the same way. ",[41,502,503],{},"axon install @cody\u002Fember-theme","\nwrites to your profile, and a running terminal picks it up without being told.",[14,506,507,510],{},[41,508,509],{},":reload"," does the same thing on demand, for when you want it explicitly.",[14,512,513],{},"Every registration from the previous load is undone first, so a command you\nrenamed disappears rather than lingering beside its replacement. If a palette or\na question is open when you reload, it closes: the definition behind it is about\nto be replaced.",[14,515,516,518,519,522],{},[41,517,509],{}," is your CONFIG. ",[41,520,521],{},":reboot"," is the running agent. They are different\nthings, and neither disturbs the other.",[26,524,526],{"id":525},"when-something-breaks","When something breaks",[14,528,529],{},"Your config is code, so it can throw. When it does, Axon tells you: the error appears in\nthe chat view with a code, the file, and your own error message.",[34,531,536],{"className":532,"code":534,"language":535},[533],"language-text","AX-EXT-008: main.ts Failed to Load\nYour profile's main.ts threw while being evaluated. Anything it registered before\nthe error survives; everything after it did not run. Plugins and extensions still load.\n","text",[41,537,534],{"__ignoreMap":39},[14,539,540],{},"A broken config never costs you the terminal — you get the working terminal you need in\norder to go fix it. Containment is per file: one bad plugin disables itself, its siblings\nkeep working, and everything a file registered before it threw stays registered.",[26,542,544],{"id":543},"what-this-is-not","What this is not",[14,546,547,548,551],{},"This layer is for ",[21,549,550],{},"workflow design"," — the shape of your terminal. It is deliberately\nnot a place to build agent behaviour.",[14,553,554,555,558,559,181],{},"You can drive a conversation from here: spawn an agent, send it a message, stop it. You\ncannot read what it says back. ",[41,556,557],{},"agents.send()"," returns nothing, on purpose — reacting to\nwhat a model produced is an agent's job, and Axon has a first-class way to build that.\nSee ",[484,560,562],{"href":561},"\u002Fdocs\u002Fv2\u002Fcognets","Cognets",[26,564,566],{"id":565},"whats-next","What's next",[14,568,569,573,574,576],{},[21,570,571],{},[484,572,487],{"href":486}," — the ",[41,575,244],{}," tree, key chords,\nand what happens when two things want the same name.",[14,578,579,585],{},[21,580,581],{},[484,582,584],{"href":583},"\u002Fdocs\u002Fv2\u002Fextending\u002Fpalettes","Palettes"," — your own filterable, tabbed lists, and\nasking the user a question.",[14,587,588,594],{},[21,589,590],{},[484,591,593],{"href":592},"\u002Fdocs\u002Fv2\u002Fextending\u002Fplugins","Plugins & Hooks"," — running code when something happens.",[14,596,597,603],{},[21,598,599],{},[484,600,602],{"href":601},"\u002Fdocs\u002Fv2\u002Fextending\u002Fextensions","Extensions"," — packaging your config so someone else\ncan install it.",[605,606,607],"style",{},"html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}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 pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}",{"title":39,"searchDepth":54,"depth":54,"links":609},[610,611,612,613,614,615,616,617],{"id":28,"depth":54,"text":29},{"id":157,"depth":54,"text":158},{"id":258,"depth":54,"text":259},{"id":371,"depth":54,"text":372},{"id":490,"depth":54,"text":491},{"id":525,"depth":54,"text":526},{"id":543,"depth":54,"text":544},{"id":565,"depth":54,"text":566},"md",{},"\u002Fdocs\u002Fv2\u002Fextending",{"title":5,"description":16},"docs\u002Fv2\u002Fextending\u002Findex","p66acXwKFwirfT1pxjoV9uo3YN-24cdRZvLW1fVJORg",1786520846934]