[{"data":1,"prerenderedAt":745},["ShallowReactive",2],{"footer-links":3,"content-\u002Fconfiguration":12},[4,9],{"path":5,"title":6,"type":7,"isExternal":8},"https:\u002F\u002Fgithub.com\u002Fahumandev\u002Fautocode","GitHub","link",true,{"path":10,"title":11,"type":7,"isExternal":8},"https:\u002F\u002Fwww.npmjs.com\u002F@ahumandev\u002Fautocode","NPM",{"id":13,"title":14,"body":15,"description":25,"extension":740,"meta":741,"navigation":8,"path":742,"seo":743,"stem":21,"__hash__":744},"content\u002Fconfiguration.md","Configuration",{"type":16,"value":17,"toc":734},"minimark",[18,22,26,31,95,99,282,303,306,501,504,515,519,571,581,585,592,702,718,730],[19,20,14],"h1",{"id":21},"configuration",[23,24,25],"p",{},"AutoCode reads optional JSONC configuration from global OpenCode configuration first, then from project locations. Later candidates override earlier candidates, so local worktree or directory settings can replace global defaults without copying the whole file.",[27,28,30],"h3",{"id":29},"configuration-locations","Configuration locations",[32,33,34,50],"table",{},[35,36,37],"thead",{},[38,39,40,44,47],"tr",{},[41,42,43],"th",{},"Precedence",[41,45,46],{},"Location",[41,48,49],{},"Behaviour",[51,52,53,68,82],"tbody",{},[38,54,55,59,65],{},[56,57,58],"td",{},"1",[56,60,61],{},[62,63,64],"code",{},"~\u002F.config\u002Fopencode\u002Fautocode.jsonc",[56,66,67],{},"Global defaults are considered first.",[38,69,70,73,79],{},[56,71,72],{},"2",[56,74,75,78],{},[62,76,77],{},".opencode\u002Fautocode.jsonc"," in the OpenCode worktree",[56,80,81],{},"Project or worktree settings override matching global values.",[38,83,84,87,92],{},[56,85,86],{},"3",[56,88,89,91],{},[62,90,77],{}," in the active directory, when different from the worktree",[56,93,94],{},"Directory-specific settings override matching worktree and global values.",[27,96,98],{"id":97},"configuration-keys","Configuration keys",[32,100,101,117],{},[35,102,103],{},[38,104,105,108,111,114],{},[41,106,107],{},"Key",[41,109,110],{},"Type",[41,112,113],{},"Description",[41,115,116],{},"Default",[51,118,119,139,169,184,198,226,253,267],{},[38,120,121,126,129,136],{},[56,122,123],{},[62,124,125],{},"autocode.tier",[56,127,128],{},"string",[56,130,131,132,135],{},"Selects a named tier set from ",[62,133,134],{},"autocode.tiers",".",[56,137,138],{},"No selected set.",[38,140,141,145,148,166],{},[56,142,143],{},[62,144,134],{},[56,146,147],{},"object",[56,149,150,151,154,155,154,158,161,162,165],{},"Either a direct map of ",[62,152,153],{},"cheap",", ",[62,156,157],{},"fast",[62,159,160],{},"balanced",", and ",[62,163,164],{},"smart"," tier settings, or a map of named tier sets containing those tiers.",[56,167,168],{},"No overrides.",[38,170,171,176,178,181],{},[56,172,173],{},[62,174,175],{},"autocode.tiers.\u003Ctier>.model",[56,177,128],{},[56,179,180],{},"Optional model override for a tier.",[56,182,183],{},"Uses the agent or OpenCode default when omitted.",[38,185,186,191,193,196],{},[56,187,188],{},[62,189,190],{},"autocode.tiers.\u003Ctier>.variant",[56,192,128],{},[56,194,195],{},"Optional variant override for a tier.",[56,197,183],{},[38,199,200,205,208,221],{},[56,201,202],{},[62,203,204],{},"permission.external_directory",[56,206,207],{},"object or string",[56,209,210,211,154,214,217,218,135],{},"Path-pattern permissions for external-directory access. Values are ",[62,212,213],{},"allow",[62,215,216],{},"ask",", or ",[62,219,220],{},"deny",[56,222,223],{},[62,224,225],{},"{}",[38,227,228,233,235,250],{},[56,229,230],{},[62,231,232],{},"autocode.sandbox.sync_method",[56,234,128],{},[56,236,237,238,154,241,154,244,161,247,135],{},"Sandbox sync strategy. Valid values are ",[62,239,240],{},"auto",[62,242,243],{},"overlayfs",[62,245,246],{},"reflink",[62,248,249],{},"copy",[56,251,252],{},"Unset.",[38,254,255,260,262,265],{},[56,256,257],{},[62,258,259],{},"autocode.sandbox.distro.cache_path",[56,261,128],{},[56,263,264],{},"Optional sandbox distribution cache path.",[56,266,252],{},[38,268,269,274,277,280],{},[56,270,271],{},[62,272,273],{},"autocode.sandbox.distro.expire",[56,275,276],{},"string or number",[56,278,279],{},"Optional sandbox distribution expiry value.",[56,281,252],{},[23,283,284,285,154,287,154,289,161,291,293,294,296,297,300,301,135],{},"Recognised model tiers are ",[62,286,153],{},[62,288,157],{},[62,290,160],{},[62,292,164],{},". The ",[62,295,153],{}," tier is also used as the ",[62,298,299],{},"small_model"," fallback for OpenCode title generation and compaction when OpenCode has no explicit ",[62,302,299],{},[23,304,305],{},"For example:",[307,308,313],"pre",{"className":309,"code":310,"language":311,"meta":312,"style":312},"language-jsonc shiki shiki-themes github-light github-dark","{\n  \"autocode\": {\n    \"tier\": \"go\",\n    \"tiers\": {\n      \"go\": {\n        \"smart\":    { \"model\": \"opencode-go\u002Fglm-5.2\", \"variant\": \"high\" },\n        \"balanced\": { \"model\": \"opencode-go\u002Fminimax-m3\", \"variant\": \"medium\" },\n        \"fast\":     { \"model\": \"opencode\u002Fdeepseek-v4-flash-free\", \"variant\": \"low\" },\n        \"cheap\":    { \"model\": \"opencode\u002Fdeepseek-v4-flash-free\", \"variant\": \"low\" }\n      },\n      \"openai\": {\n        \"smart\":    { \"model\": \"openai\u002Fgpt-5.5\", \"variant\": \"high\" },\n        \"balanced\": { \"model\": \"openai\u002Fgpt-5.4\", \"variant\": \"medium\" },\n        \"fast\":     { \"model\": \"openai\u002Fgpt-5.3-spark\", \"variant\": \"low\" },\n        \"cheap\":    { \"model\": \"openai\u002Fgpt-5.4-mini\", \"variant\": \"low\" }\n      },\n      \"zai\": {\n        \"smart\":    { \"model\": \"zai\u002Fglm-5.2\", \"variant\": \"high\" },\n        \"balanced\": { \"model\": \"zai\u002Fglm-5.2\", \"variant\": \"medium\" },\n        \"fast\":     { \"model\": \"zai\u002Fglm-5-turbo\", \"variant\": \"low\" },\n        \"cheap\":    { \"model\": \"zai\u002Fglm-4.7\", \"variant\": \"low\" }\n      }\n    }\n  },\n  \"permission\": {\n    \"external_directory\": {\n      \"\u002Ftmp\u002Fsafe\u002F**\": \"allow\",\n      \"\u002Ftmp\u002Fsafe\u002Fspecific\": \"deny\"\n    }\n  }\n}\n","jsonc","",[62,314,315,323,329,335,341,347,353,359,365,371,377,383,389,395,401,407,412,418,424,430,436,442,448,454,460,466,472,478,484,489,495],{"__ignoreMap":312},[316,317,320],"span",{"class":318,"line":319},"line",1,[316,321,322],{},"{\n",[316,324,326],{"class":318,"line":325},2,[316,327,328],{},"  \"autocode\": {\n",[316,330,332],{"class":318,"line":331},3,[316,333,334],{},"    \"tier\": \"go\",\n",[316,336,338],{"class":318,"line":337},4,[316,339,340],{},"    \"tiers\": {\n",[316,342,344],{"class":318,"line":343},5,[316,345,346],{},"      \"go\": {\n",[316,348,350],{"class":318,"line":349},6,[316,351,352],{},"        \"smart\":    { \"model\": \"opencode-go\u002Fglm-5.2\", \"variant\": \"high\" },\n",[316,354,356],{"class":318,"line":355},7,[316,357,358],{},"        \"balanced\": { \"model\": \"opencode-go\u002Fminimax-m3\", \"variant\": \"medium\" },\n",[316,360,362],{"class":318,"line":361},8,[316,363,364],{},"        \"fast\":     { \"model\": \"opencode\u002Fdeepseek-v4-flash-free\", \"variant\": \"low\" },\n",[316,366,368],{"class":318,"line":367},9,[316,369,370],{},"        \"cheap\":    { \"model\": \"opencode\u002Fdeepseek-v4-flash-free\", \"variant\": \"low\" }\n",[316,372,374],{"class":318,"line":373},10,[316,375,376],{},"      },\n",[316,378,380],{"class":318,"line":379},11,[316,381,382],{},"      \"openai\": {\n",[316,384,386],{"class":318,"line":385},12,[316,387,388],{},"        \"smart\":    { \"model\": \"openai\u002Fgpt-5.5\", \"variant\": \"high\" },\n",[316,390,392],{"class":318,"line":391},13,[316,393,394],{},"        \"balanced\": { \"model\": \"openai\u002Fgpt-5.4\", \"variant\": \"medium\" },\n",[316,396,398],{"class":318,"line":397},14,[316,399,400],{},"        \"fast\":     { \"model\": \"openai\u002Fgpt-5.3-spark\", \"variant\": \"low\" },\n",[316,402,404],{"class":318,"line":403},15,[316,405,406],{},"        \"cheap\":    { \"model\": \"openai\u002Fgpt-5.4-mini\", \"variant\": \"low\" }\n",[316,408,410],{"class":318,"line":409},16,[316,411,376],{},[316,413,415],{"class":318,"line":414},17,[316,416,417],{},"      \"zai\": {\n",[316,419,421],{"class":318,"line":420},18,[316,422,423],{},"        \"smart\":    { \"model\": \"zai\u002Fglm-5.2\", \"variant\": \"high\" },\n",[316,425,427],{"class":318,"line":426},19,[316,428,429],{},"        \"balanced\": { \"model\": \"zai\u002Fglm-5.2\", \"variant\": \"medium\" },\n",[316,431,433],{"class":318,"line":432},20,[316,434,435],{},"        \"fast\":     { \"model\": \"zai\u002Fglm-5-turbo\", \"variant\": \"low\" },\n",[316,437,439],{"class":318,"line":438},21,[316,440,441],{},"        \"cheap\":    { \"model\": \"zai\u002Fglm-4.7\", \"variant\": \"low\" }\n",[316,443,445],{"class":318,"line":444},22,[316,446,447],{},"      }\n",[316,449,451],{"class":318,"line":450},23,[316,452,453],{},"    }\n",[316,455,457],{"class":318,"line":456},24,[316,458,459],{},"  },\n",[316,461,463],{"class":318,"line":462},25,[316,464,465],{},"  \"permission\": {\n",[316,467,469],{"class":318,"line":468},26,[316,470,471],{},"    \"external_directory\": {\n",[316,473,475],{"class":318,"line":474},27,[316,476,477],{},"      \"\u002Ftmp\u002Fsafe\u002F**\": \"allow\",\n",[316,479,481],{"class":318,"line":480},28,[316,482,483],{},"      \"\u002Ftmp\u002Fsafe\u002Fspecific\": \"deny\"\n",[316,485,487],{"class":318,"line":486},29,[316,488,453],{},[316,490,492],{"class":318,"line":491},30,[316,493,494],{},"  }\n",[316,496,498],{"class":318,"line":497},31,[316,499,500],{},"}\n",[23,502,503],{},"OpenCode applies a last-matching-rule-wins model to external-directory permissions. Place broad defaults first and more specific overrides later.",[23,505,506,507,514],{},"See ",[508,509,513],"a",{"href":510,"rel":511},"https:\u002F\u002Fopencode.ai\u002Fdocs\u002Fgo#endpoints",[512],"nofollow","OpenCode Go documentation"," for supported model names.",[27,516,518],{"id":517},"database-environment-variables","Database environment variables",[32,520,521,532],{},[35,522,523],{},[38,524,525,528,530],{},[41,526,527],{},"Variable pattern",[41,529,113],{},[41,531,116],{},[51,533,534,547,559],{},[38,535,536,541,544],{},[56,537,538],{},[62,539,540],{},"AUTOCODE_DB_{db_key}_CONNECTION",[56,542,543],{},"Required connection string for one configured database target. Supported formats determine the adapter automatically.",[56,545,546],{},"None.",[38,548,549,554,557],{},[56,550,551],{},[62,552,553],{},"AUTOCODE_DB_{db_key}_USERNAME",[56,555,556],{},"Optional username supplied alongside the connection when needed.",[56,558,252],{},[38,560,561,566,569],{},[56,562,563],{},[62,564,565],{},"AUTOCODE_DB_{db_key}_PASSWORD",[56,567,568],{},"Optional password supplied alongside the connection when needed.",[56,570,252],{},[23,572,573,574,577,578,580],{},"Replace ",[62,575,576],{},"{db_key}"," with letters, digits, or underscores. Environment lookup is case-insensitive. Then instruct agent to use your chosen ",[62,579,576],{}," to access your DB.",[27,582,584],{"id":583},"ssh-tool-suite","SSH tool suite",[23,586,587,588,591],{},"Configure each SSH target with ",[62,589,590],{},"{ssh_key}"," environment variables:",[32,593,594,604],{},[35,595,596],{},[38,597,598,600,602],{},[41,599,527],{},[41,601,113],{},[41,603,116],{},[51,605,606,618,639,651,663,678,690],{},[38,607,608,613,616],{},[56,609,610],{},[62,611,612],{},"AUTOCODE_SSH_{ssh_key}_HOST",[56,614,615],{},"Required SSH hostname or IP address for one target.",[56,617,546],{},[38,619,620,625,634],{},[56,621,622],{},[62,623,624],{},"AUTOCODE_SSH_{ssh_key}_PORT",[56,626,627,628,630,631,135],{},"Optional SSH port. Valid range is ",[62,629,58],{}," to ",[62,632,633],{},"65535",[56,635,636,135],{},[62,637,638],{},"22",[38,640,641,646,649],{},[56,642,643],{},[62,644,645],{},"AUTOCODE_SSH_{ssh_key}_KEYFILE",[56,647,648],{},"Optional private key file path.",[56,650,252],{},[38,652,653,658,661],{},[56,654,655],{},[62,656,657],{},"AUTOCODE_SSH_{ssh_key}_KEYPASS",[56,659,660],{},"Optional private key passphrase.",[56,662,252],{},[38,664,665,670,673],{},[56,666,667],{},[62,668,669],{},"AUTOCODE_SSH_{ssh_key}_USERNAME",[56,671,672],{},"Optional SSH username.",[56,674,675,135],{},[62,676,677],{},"root",[38,679,680,685,688],{},[56,681,682],{},[62,683,684],{},"AUTOCODE_SSH_{ssh_key}_PASSWORD",[56,686,687],{},"Optional SSH password.",[56,689,252],{},[38,691,692,697,700],{},[56,693,694],{},[62,695,696],{},"AUTOCODE_SSH_{ssh_key}_AGENT",[56,698,699],{},"Optional SSH agent socket or path.",[56,701,252],{},[23,703,704,706,707,710,711,714,715,717],{},[62,705,612],{}," must contain only a hostname or IP address. AutoCode does not parse ",[62,708,709],{},"host:port"," values from ",[62,712,713],{},"HOST","; set ",[62,716,624],{}," when a target uses a non-default port.",[23,719,720,721,723,724,726,727,729],{},"Keyfile auth has precedence. A nonexistent or unreadable keyfile falls back to password. ",[62,722,696],{}," is used only when there is no readable ",[62,725,645],{}," and no ",[62,728,684],{},". Idle SSH connections can be reused for 5 minutes. Remote glob\u002Fgrep\u002Fpatch\u002Fedit\u002Fwrite mirror local tool intent where practical, not exact parity.",[731,732,733],"style",{},"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);}",{"title":312,"searchDepth":325,"depth":325,"links":735},[736,737,738,739],{"id":29,"depth":331,"text":30},{"id":97,"depth":331,"text":98},{"id":517,"depth":331,"text":518},{"id":583,"depth":331,"text":584},"md",{},"\u002Fconfiguration",{"title":14,"description":25},"zrFBv7PqBrUKEuC_yuCgRsZIaN79dYDSlVkd-K0ksGI",1784015220742]