[{"data":1,"prerenderedAt":1971},["ShallowReactive",2],{"navigation_docs":3,"-docs-templates-spin-toml":145,"-docs-templates-spin-toml-surround":1966},[4,8,12,16,51,81,103],{"title":5,"path":6,"stem":7},"Introduction","\u002Fdocs\u002Fintroduction","docs\u002F1.introduction",{"title":9,"path":10,"stem":11},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F2.getting-started",{"title":13,"path":14,"stem":15},"Environment variables","\u002Fdocs\u002Fenvironment-variables","docs\u002F3.environment-variables",{"title":17,"icon":18,"path":19,"stem":20,"children":21,"page":50},"Guide","i-lucide-book-open","\u002Fdocs\u002Fguide","docs\u002F4.guide",[22,26,30,34,38,42,46],{"title":23,"path":24,"stem":25},"Scaffold a project","\u002Fdocs\u002Fguide\u002Fscaffold","docs\u002F4.guide\u002F1.scaffold",{"title":27,"path":28,"stem":29},"Pin and manage templates","\u002Fdocs\u002Fguide\u002Fpin","docs\u002F4.guide\u002F2.pin",{"title":31,"path":32,"stem":33},"Update pinned templates","\u002Fdocs\u002Fguide\u002Fupdating","docs\u002F4.guide\u002F3.updating",{"title":35,"path":36,"stem":37},"Find templates","\u002Fdocs\u002Fguide\u002Fsearch","docs\u002F4.guide\u002F4.search",{"title":39,"path":40,"stem":41},"Manage registries","\u002Fdocs\u002Fguide\u002Fregistry","docs\u002F4.guide\u002F5.registry",{"title":43,"path":44,"stem":45},"Troubleshooting","\u002Fdocs\u002Fguide\u002Ftroubleshooting","docs\u002F4.guide\u002F6.troubleshooting",{"title":47,"path":48,"stem":49},"Build your first template","\u002Fdocs\u002Fguide\u002Fcreate-template","docs\u002F4.guide\u002F7.create-template",false,{"title":52,"icon":53,"path":54,"stem":55,"children":56,"page":50},"Templates","i-lucide-layout-template","\u002Fdocs\u002Ftemplates","docs\u002F5.templates",[57,61,65,69,73,77],{"title":58,"path":59,"stem":60},"Template anatomy","\u002Fdocs\u002Ftemplates\u002Fanatomy","docs\u002F5.templates\u002F1.anatomy",{"title":62,"path":63,"stem":64},"Template params","\u002Fdocs\u002Ftemplates\u002Fparams","docs\u002F5.templates\u002F2.params",{"title":66,"path":67,"stem":68},"Template rendering","\u002Fdocs\u002Ftemplates\u002Ftemplate-rendering","docs\u002F5.templates\u002F3.template-rendering",{"title":70,"path":71,"stem":72},"Hooks","\u002Fdocs\u002Ftemplates\u002Fhooks","docs\u002F5.templates\u002F4.hooks",{"title":74,"path":75,"stem":76},"Publish a template","\u002Fdocs\u002Ftemplates\u002Fpublish","docs\u002F5.templates\u002F5.publish",{"title":78,"path":79,"stem":80},"spin.toml","\u002Fdocs\u002Ftemplates\u002Fspin-toml","docs\u002F5.templates\u002F6.spin-toml",{"title":82,"icon":83,"path":84,"stem":85,"children":86,"page":50},"Registries","i-lucide-database","\u002Fdocs\u002Fregistries","docs\u002F6.registries",[87,91,95,99],{"title":88,"path":89,"stem":90},"Registry anatomy","\u002Fdocs\u002Fregistries\u002Fanatomy","docs\u002F6.registries\u002F1.anatomy",{"title":92,"path":93,"stem":94},"Template metadata file","\u002Fdocs\u002Fregistries\u002Ftemplate-metadata","docs\u002F6.registries\u002F2.template-metadata",{"title":96,"path":97,"stem":98},"Run a registry","\u002Fdocs\u002Fregistries\u002Frun","docs\u002F6.registries\u002F3.run",{"title":100,"path":101,"stem":102},"registry.toml","\u002Fdocs\u002Fregistries\u002Fregistry-toml","docs\u002F6.registries\u002F4.registry-toml",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":50},"Commands","i-lucide-terminal","\u002Fdocs\u002Fcommands","docs\u002F7.commands",[109,113,117,121,125,129,133,137,141],{"title":110,"path":111,"stem":112},"spin new","\u002Fdocs\u002Fcommands\u002Fnew","docs\u002F7.commands\u002F1.new",{"title":114,"path":115,"stem":116},"spin add","\u002Fdocs\u002Fcommands\u002Fadd","docs\u002F7.commands\u002F2.add",{"title":118,"path":119,"stem":120},"spin list","\u002Fdocs\u002Fcommands\u002Flist","docs\u002F7.commands\u002F3.list",{"title":122,"path":123,"stem":124},"spin update","\u002Fdocs\u002Fcommands\u002Fupdate","docs\u002F7.commands\u002F4.update",{"title":126,"path":127,"stem":128},"spin remove","\u002Fdocs\u002Fcommands\u002Fremove","docs\u002F7.commands\u002F5.remove",{"title":130,"path":131,"stem":132},"spin search","\u002Fdocs\u002Fcommands\u002Fsearch","docs\u002F7.commands\u002F6.search",{"title":134,"path":135,"stem":136},"spin registry","\u002Fdocs\u002Fcommands\u002Fregistry","docs\u002F7.commands\u002F7.registry",{"title":138,"path":139,"stem":140},"spin init","\u002Fdocs\u002Fcommands\u002Finit","docs\u002F7.commands\u002F8.init",{"title":142,"path":143,"stem":144},"spin version","\u002Fdocs\u002Fcommands\u002Fversion","docs\u002F7.commands\u002F9.version",{"id":146,"title":78,"body":147,"description":1960,"extension":1961,"links":1962,"meta":1963,"navigation":238,"path":79,"seo":1964,"stem":80,"__hash__":1965},"docs\u002Fdocs\u002F5.templates\u002F6.spin-toml.md",{"type":148,"value":149,"toc":1943},"minimark",[150,155,327,343,347,514,520,523,577,582,591,858,863,913,917,1073,1087,1093,1175,1185,1212,1217,1224,1274,1284,1305,1331,1336,1344,1394,1401,1407,1411,1418,1450,1456,1469,1715,1724,1739,1743,1755,1759,1810,1813,1930,1934,1939],[151,152,154],"h2",{"id":153},"minimal-example","Minimal example",[156,157,162],"pre",{"className":158,"code":159,"language":160,"meta":161,"style":161},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","name = \"go-cli\"\ndescription = \"A minimal Go CLI\"\nlanguage = \"go\"\ntype = \"cli\"\n\n[params]\nproject_name = { type = \"text\", prompt = \"Project name\" }\n\n[[post]]\nrun = \"go mod init {{ .project_name }}\"\n","toml","",[163,164,165,188,203,218,233,240,253,295,300,312],"code",{"__ignoreMap":161},[166,167,170,174,178,181,185],"span",{"class":168,"line":169},"line",1,[166,171,173],{"class":172},"sTEyZ","name ",[166,175,177],{"class":176},"sMK4o","=",[166,179,180],{"class":176}," \"",[166,182,184],{"class":183},"sfazB","go-cli",[166,186,187],{"class":176},"\"\n",[166,189,191,194,196,198,201],{"class":168,"line":190},2,[166,192,193],{"class":172},"description ",[166,195,177],{"class":176},[166,197,180],{"class":176},[166,199,200],{"class":183},"A minimal Go CLI",[166,202,187],{"class":176},[166,204,206,209,211,213,216],{"class":168,"line":205},3,[166,207,208],{"class":172},"language ",[166,210,177],{"class":176},[166,212,180],{"class":176},[166,214,215],{"class":183},"go",[166,217,187],{"class":176},[166,219,221,224,226,228,231],{"class":168,"line":220},4,[166,222,223],{"class":172},"type ",[166,225,177],{"class":176},[166,227,180],{"class":176},[166,229,230],{"class":183},"cli",[166,232,187],{"class":176},[166,234,236],{"class":168,"line":235},5,[166,237,239],{"emptyLinePlaceholder":238},true,"\n",[166,241,243,246,250],{"class":168,"line":242},6,[166,244,245],{"class":176},"[",[166,247,249],{"class":248},"sBMFI","params",[166,251,252],{"class":176},"]\n",[166,254,256,259,261,264,267,269,271,274,277,280,283,285,287,290,292],{"class":168,"line":255},7,[166,257,258],{"class":172},"project_name ",[166,260,177],{"class":176},[166,262,263],{"class":176}," {",[166,265,266],{"class":172}," type ",[166,268,177],{"class":176},[166,270,180],{"class":176},[166,272,273],{"class":183},"text",[166,275,276],{"class":176},"\"",[166,278,279],{"class":176},",",[166,281,282],{"class":172}," prompt ",[166,284,177],{"class":176},[166,286,180],{"class":176},[166,288,289],{"class":183},"Project name",[166,291,276],{"class":176},[166,293,294],{"class":176}," }\n",[166,296,298],{"class":168,"line":297},8,[166,299,239],{"emptyLinePlaceholder":238},[166,301,303,306,309],{"class":168,"line":302},9,[166,304,305],{"class":176},"[[",[166,307,308],{"class":248},"post",[166,310,311],{"class":176},"]]\n",[166,313,315,318,320,322,325],{"class":168,"line":314},10,[166,316,317],{"class":172},"run ",[166,319,177],{"class":176},[166,321,180],{"class":176},[166,323,324],{"class":183},"go mod init {{ .project_name }}",[166,326,187],{"class":176},[328,329,330,331,334,335,337,338,342],"p",{},"The template also needs a ",[163,332,333],{},"_base\u002F"," directory next to ",[163,336,78],{}," (see ",[339,340,341],"a",{"href":59},"template anatomy",").",[151,344,346],{"id":345},"top-level-fields","Top-level fields",[348,349,350,366],"table",{},[351,352,353],"thead",{},[354,355,356,360,363],"tr",{},[357,358,359],"th",{},"Field",[357,361,362],{},"Required",[357,364,365],{},"Description",[367,368,369,387,400,422,442,458,470,486,502],"tbody",{},[354,370,371,377,380],{},[372,373,374],"td",{},[163,375,376],{},"name",[372,378,379],{},"yes",[372,381,382,383,386],{},"Template name. Used in messages and the ",[163,384,385],{},"--print-params"," output.",[354,388,389,394,397],{},[372,390,391],{},[163,392,393],{},"description",[372,395,396],{},"no",[372,398,399],{},"Short description shown in search results.",[354,401,402,407,409],{},[372,403,404],{},[163,405,406],{},"type",[372,408,396],{},[372,410,411,412,414,415,414,418,421],{},"Project shape, e.g. ",[163,413,230],{},", ",[163,416,417],{},"tui",[163,419,420],{},"lib",". Free-form; used in search.",[354,423,424,429,431],{},[372,425,426],{},[163,427,428],{},"language",[372,430,396],{},[372,432,433,434,414,436,414,439,421],{},"Primary language, e.g. ",[163,435,215],{},[163,437,438],{},"rust",[163,440,441],{},"ts",[354,443,444,449,451],{},[372,445,446],{},[163,447,448],{},"license",[372,450,396],{},[372,452,453,454,457],{},"License identifier, e.g. ",[163,455,456],{},"MIT",".",[354,459,460,465,467],{},[372,461,462],{},[163,463,464],{},"repository",[372,466,396],{},[372,468,469],{},"Source URL for the template.",[354,471,472,477,479],{},[372,473,474],{},[163,475,476],{},"min_spin_version",[372,478,396],{},[372,480,481,482,485],{},"Minimum spin CLI version required, e.g. ",[163,483,484],{},"0.2.0",". Emits a warning if the running spin is older.",[354,487,488,493,495],{},[372,489,490],{},[163,491,492],{},"tags",[372,494,396],{},[372,496,497,498,501],{},"Array of strings, e.g. ",[163,499,500],{},"[\"web\", \"api\"]",". Used in search.",[354,503,504,509,511],{},[372,505,506],{},[163,507,508],{},"exclude",[372,510,396],{},[372,512,513],{},"Array of glob patterns. Files whose rendered path matches are skipped.",[151,515,517],{"id":516},"author",[163,518,519],{},"[author]",[328,521,522],{},"Optional. Recognised fields:",[156,524,526],{"className":158,"code":525,"language":160,"meta":161,"style":161},"[author]\nname = \"Sam\"\nemail = \"sam@example.com\"\nurl = \"https:\u002F\u002Fsam.example.com\"\n",[163,527,528,536,549,563],{"__ignoreMap":161},[166,529,530,532,534],{"class":168,"line":169},[166,531,245],{"class":176},[166,533,516],{"class":248},[166,535,252],{"class":176},[166,537,538,540,542,544,547],{"class":168,"line":190},[166,539,173],{"class":172},[166,541,177],{"class":176},[166,543,180],{"class":176},[166,545,546],{"class":183},"Sam",[166,548,187],{"class":176},[166,550,551,554,556,558,561],{"class":168,"line":205},[166,552,553],{"class":172},"email ",[166,555,177],{"class":176},[166,557,180],{"class":176},[166,559,560],{"class":183},"sam@example.com",[166,562,187],{"class":176},[166,564,565,568,570,572,575],{"class":168,"line":220},[166,566,567],{"class":172},"url ",[166,569,177],{"class":176},[166,571,180],{"class":176},[166,573,574],{"class":183},"https:\u002F\u002Fsam.example.com",[166,576,187],{"class":176},[151,578,579],{"id":249},[163,580,581],{},"[params]",[328,583,584,585,587,588,590],{},"Each key becomes a question during ",[163,586,110],{},". The value is an inline table with at least a ",[163,589,406],{},":",[156,592,594],{"className":158,"code":593,"language":160,"meta":161,"style":161},"[params]\nproject_name = { type = \"text\", prompt = \"Project name\" }\nedition = { type = \"select\", options = [\"2021\", \"2024\"], default = \"2021\" }\nfeatures = { type = \"multiselect\", options = [\"http\", \"grpc\"], default = [\"http\"] }\nport = { type = \"number\", default = 8080, min = 1000, max = 65535 }\nprivate = { type = \"bool\", prompt = \"Make the repository private?\", default = false }\n",[163,595,596,604,636,698,761,813],{"__ignoreMap":161},[166,597,598,600,602],{"class":168,"line":169},[166,599,245],{"class":176},[166,601,249],{"class":248},[166,603,252],{"class":176},[166,605,606,608,610,612,614,616,618,620,622,624,626,628,630,632,634],{"class":168,"line":190},[166,607,258],{"class":172},[166,609,177],{"class":176},[166,611,263],{"class":176},[166,613,266],{"class":172},[166,615,177],{"class":176},[166,617,180],{"class":176},[166,619,273],{"class":183},[166,621,276],{"class":176},[166,623,279],{"class":176},[166,625,282],{"class":172},[166,627,177],{"class":176},[166,629,180],{"class":176},[166,631,289],{"class":183},[166,633,276],{"class":176},[166,635,294],{"class":176},[166,637,638,641,643,645,647,649,651,654,656,658,661,663,666,668,671,673,675,677,680,682,685,688,690,692,694,696],{"class":168,"line":205},[166,639,640],{"class":172},"edition ",[166,642,177],{"class":176},[166,644,263],{"class":176},[166,646,266],{"class":172},[166,648,177],{"class":176},[166,650,180],{"class":176},[166,652,653],{"class":183},"select",[166,655,276],{"class":176},[166,657,279],{"class":176},[166,659,660],{"class":172}," options ",[166,662,177],{"class":176},[166,664,665],{"class":176}," [",[166,667,276],{"class":176},[166,669,670],{"class":183},"2021",[166,672,276],{"class":176},[166,674,279],{"class":176},[166,676,180],{"class":176},[166,678,679],{"class":183},"2024",[166,681,276],{"class":176},[166,683,684],{"class":176},"],",[166,686,687],{"class":172}," default ",[166,689,177],{"class":176},[166,691,180],{"class":176},[166,693,670],{"class":183},[166,695,276],{"class":176},[166,697,294],{"class":176},[166,699,700,703,705,707,709,711,713,716,718,720,722,724,726,728,731,733,735,737,740,742,744,746,748,750,752,754,756,759],{"class":168,"line":220},[166,701,702],{"class":172},"features ",[166,704,177],{"class":176},[166,706,263],{"class":176},[166,708,266],{"class":172},[166,710,177],{"class":176},[166,712,180],{"class":176},[166,714,715],{"class":183},"multiselect",[166,717,276],{"class":176},[166,719,279],{"class":176},[166,721,660],{"class":172},[166,723,177],{"class":176},[166,725,665],{"class":176},[166,727,276],{"class":176},[166,729,730],{"class":183},"http",[166,732,276],{"class":176},[166,734,279],{"class":176},[166,736,180],{"class":176},[166,738,739],{"class":183},"grpc",[166,741,276],{"class":176},[166,743,684],{"class":176},[166,745,687],{"class":172},[166,747,177],{"class":176},[166,749,665],{"class":176},[166,751,276],{"class":176},[166,753,730],{"class":183},[166,755,276],{"class":176},[166,757,758],{"class":176},"]",[166,760,294],{"class":176},[166,762,763,766,768,770,772,774,776,779,781,783,785,787,791,793,796,798,801,803,806,808,811],{"class":168,"line":235},[166,764,765],{"class":172},"port ",[166,767,177],{"class":176},[166,769,263],{"class":176},[166,771,266],{"class":172},[166,773,177],{"class":176},[166,775,180],{"class":176},[166,777,778],{"class":183},"number",[166,780,276],{"class":176},[166,782,279],{"class":176},[166,784,687],{"class":172},[166,786,177],{"class":176},[166,788,790],{"class":789},"sbssI"," 8080",[166,792,279],{"class":176},[166,794,795],{"class":172}," min ",[166,797,177],{"class":176},[166,799,800],{"class":789}," 1000",[166,802,279],{"class":176},[166,804,805],{"class":172}," max ",[166,807,177],{"class":176},[166,809,810],{"class":789}," 65535",[166,812,294],{"class":176},[166,814,815,818,820,822,824,826,828,831,833,835,837,839,841,844,846,848,850,852,856],{"class":168,"line":242},[166,816,817],{"class":172},"private ",[166,819,177],{"class":176},[166,821,263],{"class":176},[166,823,266],{"class":172},[166,825,177],{"class":176},[166,827,180],{"class":176},[166,829,830],{"class":183},"bool",[166,832,276],{"class":176},[166,834,279],{"class":176},[166,836,282],{"class":172},[166,838,177],{"class":176},[166,840,180],{"class":176},[166,842,843],{"class":183},"Make the repository private?",[166,845,276],{"class":176},[166,847,279],{"class":176},[166,849,687],{"class":172},[166,851,177],{"class":176},[166,853,855],{"class":854},"sfNiH"," false",[166,857,294],{"class":176},[859,860,862],"h3",{"id":861},"common-fields","Common fields",[348,864,865,873],{},[351,866,867],{},[354,868,869,871],{},[357,870,359],{},[357,872,365],{},[367,874,875,887,901],{},[354,876,877,881],{},[372,878,879],{},[163,880,406],{},[372,882,883,884,886],{},"Param type (see below). Defaults to ",[163,885,273],{}," if omitted.",[354,888,889,894],{},[372,890,891],{},[163,892,893],{},"prompt",[372,895,896,897,900],{},"Question text. Defaults to the param name. May contain ",[163,898,899],{},"{{ }}"," templates (see below).",[354,902,903,908],{},[372,904,905],{},[163,906,907],{},"default",[372,909,910,911,900],{},"Default value. May contain ",[163,912,899],{},[859,914,916],{"id":915},"param-types","Param types",[348,918,919,932],{},[351,920,921],{},[354,922,923,926,929],{},[357,924,925],{},"Type",[357,927,928],{},"Stored as",[357,930,931],{},"Notes",[367,933,934,946,958,977,995,1013,1024,1036,1051],{},[354,935,936,940,943],{},[372,937,938],{},[163,939,273],{},[372,941,942],{},"string",[372,944,945],{},"Single-line input.",[354,947,948,953,955],{},[372,949,950],{},[163,951,952],{},"textarea",[372,954,942],{},[372,956,957],{},"Multi-line input.",[354,959,960,964,967],{},[372,961,962],{},[163,963,778],{},[372,965,966],{},"int",[372,968,969,972,973,976],{},[163,970,971],{},"min"," and ",[163,974,975],{},"max"," are optional.",[354,978,979,983,985],{},[372,980,981],{},[163,982,653],{},[372,984,942],{},[372,986,987,988,991,992,994],{},"Requires ",[163,989,990],{},"options",". ",[163,993,907],{}," must be one of the options.",[354,996,997,1001,1006],{},[372,998,999],{},[163,1000,715],{},[372,1002,1003],{},[163,1004,1005],{},"[]string",[372,1007,987,1008,991,1010,1012],{},[163,1009,990],{},[163,1011,907],{}," is an array.",[354,1014,1015,1019,1021],{},[372,1016,1017],{},[163,1018,830],{},[372,1020,830],{},[372,1022,1023],{},"Rendered as a yes\u002Fno confirm.",[354,1025,1026,1031,1033],{},[372,1027,1028],{},[163,1029,1030],{},"path",[372,1032,942],{},[372,1034,1035],{},"File picker. Use a file path.",[354,1037,1038,1043,1045],{},[372,1039,1040],{},[163,1041,1042],{},"secret",[372,1044,942],{},[372,1046,1047,1048,1050],{},"Hidden input. No ",[163,1049,907],{}," is shown.",[354,1052,1053,1057,1059],{},[372,1054,1055],{},[163,1056,448],{},[372,1058,942],{},[372,1060,1061,1062,1065,1066,1068,1069,457],{},"Select from bundled SPDX identifiers plus a \"None\" option. Automatically generates a ",[163,1063,1064],{},"LICENSE"," file at scaffold time with copyright holder and year substitution. Options are auto-filled only when omitted; providing your own ",[163,1067,990],{}," restricts the choice set. See ",[339,1070,1072],{"href":1071},"\u002Fdocs\u002Ftemplates\u002Ftemplate-rendering#supported-licenses","Supported licenses",[328,1074,1075,1076,991,1079,972,1081,1084,1085,457],{},"All values are available in templates as ",[163,1077,1078],{},"{{ .param_name }}",[163,1080,376],{},[163,1082,1083],{},"project_name"," are always injected from the project name supplied to ",[163,1086,110],{},[328,1088,1089,1090,1092],{},"Custom ",[163,1091,448],{}," options restrict the choice set:",[156,1094,1096],{"className":158,"code":1095,"language":160,"meta":161,"style":161},"[params]\nlicense = { type = \"license\", prompt = \"License\", options = [\"MIT\", \"Apache-2.0\"], default = \"MIT\" }\n",[163,1097,1098,1106],{"__ignoreMap":161},[166,1099,1100,1102,1104],{"class":168,"line":169},[166,1101,245],{"class":176},[166,1103,249],{"class":248},[166,1105,252],{"class":176},[166,1107,1108,1111,1113,1115,1117,1119,1121,1123,1125,1127,1129,1131,1133,1136,1138,1140,1142,1144,1146,1148,1150,1152,1154,1156,1159,1161,1163,1165,1167,1169,1171,1173],{"class":168,"line":190},[166,1109,1110],{"class":172},"license ",[166,1112,177],{"class":176},[166,1114,263],{"class":176},[166,1116,266],{"class":172},[166,1118,177],{"class":176},[166,1120,180],{"class":176},[166,1122,448],{"class":183},[166,1124,276],{"class":176},[166,1126,279],{"class":176},[166,1128,282],{"class":172},[166,1130,177],{"class":176},[166,1132,180],{"class":176},[166,1134,1135],{"class":183},"License",[166,1137,276],{"class":176},[166,1139,279],{"class":176},[166,1141,660],{"class":172},[166,1143,177],{"class":176},[166,1145,665],{"class":176},[166,1147,276],{"class":176},[166,1149,456],{"class":183},[166,1151,276],{"class":176},[166,1153,279],{"class":176},[166,1155,180],{"class":176},[166,1157,1158],{"class":183},"Apache-2.0",[166,1160,276],{"class":176},[166,1162,684],{"class":176},[166,1164,687],{"class":172},[166,1166,177],{"class":176},[166,1168,180],{"class":176},[166,1170,456],{"class":183},[166,1172,276],{"class":176},[166,1174,294],{"class":176},[328,1176,1177,1178,1180,1181,1184],{},"A value outside the custom options produces no ",[163,1179,1064],{}," file (no error), exactly like ",[163,1182,1183],{},"None"," or an unknown identifier.",[328,1186,1187,972,1189,1191,1192,1194,1195,414,1197,1199,1200,1203,1204,1207,1208,457],{},[163,1188,893],{},[163,1190,907],{}," may themselves contain ",[163,1193,899],{}," templates that\nreference ",[163,1196,376],{},[163,1198,1083],{},", or any ",[163,1201,1202],{},"--param"," value — for example\n",[163,1205,1206],{},"default = \"github.com\u002Fme\u002F{{ .project_name }}\"",". Only values known before\nthe form runs are available; a prompt or default cannot see another\nparam's answer. See\n",[339,1209,1211],{"href":1210},"\u002Fdocs\u002Ftemplates\u002Fparams#templated-prompts-and-defaults","Templated prompts and defaults",[151,1213,1214],{"id":156},[163,1215,1216],{},"[[pre]]",[328,1218,1219,1220,1223],{},"Pre-scaffold shell steps run in the generated project directory after params are resolved but before files are rendered or written. Each step is a ",[163,1221,1222],{},"run"," string rendered against the resolved values:",[156,1225,1227],{"className":158,"code":1226,"language":160,"meta":161,"style":161},"[[pre]]\nrun = \"mkdir -p {{ .project_name }}\u002Fcmd\"\n\n[[pre]]\nrun = \"go mod init {{ .project_name }}\"\n",[163,1228,1229,1237,1250,1254,1262],{"__ignoreMap":161},[166,1230,1231,1233,1235],{"class":168,"line":169},[166,1232,305],{"class":176},[166,1234,156],{"class":248},[166,1236,311],{"class":176},[166,1238,1239,1241,1243,1245,1248],{"class":168,"line":190},[166,1240,317],{"class":172},[166,1242,177],{"class":176},[166,1244,180],{"class":176},[166,1246,1247],{"class":183},"mkdir -p {{ .project_name }}\u002Fcmd",[166,1249,187],{"class":176},[166,1251,1252],{"class":168,"line":205},[166,1253,239],{"emptyLinePlaceholder":238},[166,1255,1256,1258,1260],{"class":168,"line":220},[166,1257,305],{"class":176},[166,1259,156],{"class":248},[166,1261,311],{"class":176},[166,1263,1264,1266,1268,1270,1272],{"class":168,"line":235},[166,1265,317],{"class":172},[166,1267,177],{"class":176},[166,1269,180],{"class":176},[166,1271,324],{"class":183},[166,1273,187],{"class":176},[328,1275,1276,1277,1279,1280,1283],{},"Steps run in order. If one fails, the hook stops and ",[163,1278,110],{}," returns the error before any files are written. The rendered command is run via ",[163,1281,1282],{},"sh -c"," in the project directory.",[328,1285,1286,1287,1289,1290,414,1293,1296,1297,1300,1301,1304],{},"Hook commands only support field access (",[163,1288,1078],{},"). Custom functions like ",[163,1291,1292],{},"upper",[163,1294,1295],{},"quote",", and ",[163,1298,1299],{},"snake_case"," are only available in ",[163,1302,1303],{},"_base\u002F*.tmpl"," file templates, not in hook commands. If you need a transformed value, use shell tools:",[156,1306,1308],{"className":158,"code":1307,"language":160,"meta":161,"style":161},"[[pre]]\nrun = \"echo {{ .project_name }} | tr '[:lower:]' '[:upper:]'\"\n",[163,1309,1310,1318],{"__ignoreMap":161},[166,1311,1312,1314,1316],{"class":168,"line":169},[166,1313,305],{"class":176},[166,1315,156],{"class":248},[166,1317,311],{"class":176},[166,1319,1320,1322,1324,1326,1329],{"class":168,"line":190},[166,1321,317],{"class":172},[166,1323,177],{"class":176},[166,1325,180],{"class":176},[166,1327,1328],{"class":183},"echo {{ .project_name }} | tr '[:lower:]' '[:upper:]'",[166,1330,187],{"class":176},[151,1332,1333],{"id":308},[163,1334,1335],{},"[[post]]",[328,1337,1338,1339,1341,1342,1223],{},"Post-scaffold shell steps run in the generated project directory, after files are written but before the output ",[163,1340,78],{}," is removed. Each step is a ",[163,1343,1222],{},[156,1345,1347],{"className":158,"code":1346,"language":160,"meta":161,"style":161},"[[post]]\nrun = \"go mod init {{ .project_name }}\"\n\n[[post]]\nrun = \"git init && git add -A && git commit -m 'initial'\"\n",[163,1348,1349,1357,1369,1373,1381],{"__ignoreMap":161},[166,1350,1351,1353,1355],{"class":168,"line":169},[166,1352,305],{"class":176},[166,1354,308],{"class":248},[166,1356,311],{"class":176},[166,1358,1359,1361,1363,1365,1367],{"class":168,"line":190},[166,1360,317],{"class":172},[166,1362,177],{"class":176},[166,1364,180],{"class":176},[166,1366,324],{"class":183},[166,1368,187],{"class":176},[166,1370,1371],{"class":168,"line":205},[166,1372,239],{"emptyLinePlaceholder":238},[166,1374,1375,1377,1379],{"class":168,"line":220},[166,1376,305],{"class":176},[166,1378,308],{"class":248},[166,1380,311],{"class":176},[166,1382,1383,1385,1387,1389,1392],{"class":168,"line":235},[166,1384,317],{"class":172},[166,1386,177],{"class":176},[166,1388,180],{"class":176},[166,1390,1391],{"class":183},"git init && git add -A && git commit -m 'initial'",[166,1393,187],{"class":176},[328,1395,1276,1396,1398,1399,1283],{},[163,1397,110],{}," returns the error. The rendered command is run via ",[163,1400,1282],{},[328,1402,1403,1404,1406],{},"Like ",[163,1405,1216],{},", post-hook commands only support field access. Use shell tools for transformations.",[151,1408,1409],{"id":508},[163,1410,508],{},[328,1412,1413,1414,1417],{},"Glob patterns matching the rendered relative path of files that should be omitted from the output. The ",[163,1415,1416],{},".tmpl"," extension is stripped before matching.",[156,1419,1421],{"className":158,"code":1420,"language":160,"meta":161,"style":161},"exclude = [\"*.draft.md\", \"docs\u002Finternal\u002F*\"]\n",[163,1422,1423],{"__ignoreMap":161},[166,1424,1425,1428,1430,1432,1434,1437,1439,1441,1443,1446,1448],{"class":168,"line":169},[166,1426,1427],{"class":172},"exclude ",[166,1429,177],{"class":176},[166,1431,665],{"class":176},[166,1433,276],{"class":176},[166,1435,1436],{"class":183},"*.draft.md",[166,1438,276],{"class":176},[166,1440,279],{"class":176},[166,1442,180],{"class":176},[166,1444,1445],{"class":183},"docs\u002Finternal\u002F*",[166,1447,276],{"class":176},[166,1449,252],{"class":176},[151,1451,1453],{"id":1452},"include",[163,1454,1455],{},"[[include]]",[328,1457,1458,1459,1461,1462,1465,1466,1468],{},"Positive conditional rules for including files or whole directories. Each rule has a ",[163,1460,1030],{}," glob and an optional ",[163,1463,1464],{},"if"," template rendered against the resolved values. When at least one ",[163,1467,1455],{}," rule exists, only files matching a true rule are copied or rendered. Files that do not match any rule are skipped, and directories with no matching rule are pruned entirely.",[156,1470,1472],{"className":158,"code":1471,"language":160,"meta":161,"style":161},"[params]\nci = { type = \"bool\", prompt = \"Include CI?\", default = true }\nfeatures = { type = \"multiselect\", options = [\"auth\", \"grpc\"], default = [] }\n\n[[include]]\npath = \".github\u002F**\"\nif = \"{{ .ci }}\"\n\n[[include]]\npath = \"auth\u002F**\"\nif = \"{{ has .features \\\"auth\\\" }}\"\n\n[[include]]\npath = \"grpc\u002F**\"\nif = \"{{ has .features \\\"grpc\\\" }}\"\n",[163,1473,1474,1482,1525,1577,1581,1589,1603,1617,1621,1629,1642,1666,1671,1680,1694],{"__ignoreMap":161},[166,1475,1476,1478,1480],{"class":168,"line":169},[166,1477,245],{"class":176},[166,1479,249],{"class":248},[166,1481,252],{"class":176},[166,1483,1484,1487,1489,1491,1493,1495,1497,1499,1501,1503,1505,1507,1509,1512,1514,1516,1518,1520,1523],{"class":168,"line":190},[166,1485,1486],{"class":172},"ci ",[166,1488,177],{"class":176},[166,1490,263],{"class":176},[166,1492,266],{"class":172},[166,1494,177],{"class":176},[166,1496,180],{"class":176},[166,1498,830],{"class":183},[166,1500,276],{"class":176},[166,1502,279],{"class":176},[166,1504,282],{"class":172},[166,1506,177],{"class":176},[166,1508,180],{"class":176},[166,1510,1511],{"class":183},"Include CI?",[166,1513,276],{"class":176},[166,1515,279],{"class":176},[166,1517,687],{"class":172},[166,1519,177],{"class":176},[166,1521,1522],{"class":854}," true",[166,1524,294],{"class":176},[166,1526,1527,1529,1531,1533,1535,1537,1539,1541,1543,1545,1547,1549,1551,1553,1556,1558,1560,1562,1564,1566,1568,1570,1572,1575],{"class":168,"line":205},[166,1528,702],{"class":172},[166,1530,177],{"class":176},[166,1532,263],{"class":176},[166,1534,266],{"class":172},[166,1536,177],{"class":176},[166,1538,180],{"class":176},[166,1540,715],{"class":183},[166,1542,276],{"class":176},[166,1544,279],{"class":176},[166,1546,660],{"class":172},[166,1548,177],{"class":176},[166,1550,665],{"class":176},[166,1552,276],{"class":176},[166,1554,1555],{"class":183},"auth",[166,1557,276],{"class":176},[166,1559,279],{"class":176},[166,1561,180],{"class":176},[166,1563,739],{"class":183},[166,1565,276],{"class":176},[166,1567,684],{"class":176},[166,1569,687],{"class":172},[166,1571,177],{"class":176},[166,1573,1574],{"class":176}," []",[166,1576,294],{"class":176},[166,1578,1579],{"class":168,"line":220},[166,1580,239],{"emptyLinePlaceholder":238},[166,1582,1583,1585,1587],{"class":168,"line":235},[166,1584,305],{"class":176},[166,1586,1452],{"class":248},[166,1588,311],{"class":176},[166,1590,1591,1594,1596,1598,1601],{"class":168,"line":242},[166,1592,1593],{"class":172},"path ",[166,1595,177],{"class":176},[166,1597,180],{"class":176},[166,1599,1600],{"class":183},".github\u002F**",[166,1602,187],{"class":176},[166,1604,1605,1608,1610,1612,1615],{"class":168,"line":255},[166,1606,1607],{"class":172},"if ",[166,1609,177],{"class":176},[166,1611,180],{"class":176},[166,1613,1614],{"class":183},"{{ .ci }}",[166,1616,187],{"class":176},[166,1618,1619],{"class":168,"line":297},[166,1620,239],{"emptyLinePlaceholder":238},[166,1622,1623,1625,1627],{"class":168,"line":302},[166,1624,305],{"class":176},[166,1626,1452],{"class":248},[166,1628,311],{"class":176},[166,1630,1631,1633,1635,1637,1640],{"class":168,"line":314},[166,1632,1593],{"class":172},[166,1634,177],{"class":176},[166,1636,180],{"class":176},[166,1638,1639],{"class":183},"auth\u002F**",[166,1641,187],{"class":176},[166,1643,1645,1647,1649,1651,1654,1657,1659,1661,1664],{"class":168,"line":1644},11,[166,1646,1607],{"class":172},[166,1648,177],{"class":176},[166,1650,180],{"class":176},[166,1652,1653],{"class":183},"{{ has .features ",[166,1655,1656],{"class":172},"\\\"",[166,1658,1555],{"class":183},[166,1660,1656],{"class":172},[166,1662,1663],{"class":183}," }}",[166,1665,187],{"class":176},[166,1667,1669],{"class":168,"line":1668},12,[166,1670,239],{"emptyLinePlaceholder":238},[166,1672,1674,1676,1678],{"class":168,"line":1673},13,[166,1675,305],{"class":176},[166,1677,1452],{"class":248},[166,1679,311],{"class":176},[166,1681,1683,1685,1687,1689,1692],{"class":168,"line":1682},14,[166,1684,1593],{"class":172},[166,1686,177],{"class":176},[166,1688,180],{"class":176},[166,1690,1691],{"class":183},"grpc\u002F**",[166,1693,187],{"class":176},[166,1695,1697,1699,1701,1703,1705,1707,1709,1711,1713],{"class":168,"line":1696},15,[166,1698,1607],{"class":172},[166,1700,177],{"class":176},[166,1702,180],{"class":176},[166,1704,1653],{"class":183},[166,1706,1656],{"class":172},[166,1708,739],{"class":183},[166,1710,1656],{"class":172},[166,1712,1663],{"class":183},[166,1714,187],{"class":176},[328,1716,1717,1718,1720,1721,1723],{},"A rule with an empty or omitted ",[163,1719,1464],{}," always includes matching paths. If no ",[163,1722,1455],{}," rules exist, all non-excluded files are included (backward compatible).",[328,1725,1726,1728,1729,1732,1733,1736,1737,457],{},[163,1727,1030],{}," supports ",[163,1730,1731],{},"*"," for a single segment and ",[163,1734,1735],{},"**"," for any number of segments, relative to ",[163,1738,333],{},[151,1740,1742],{"id":1741},"template-functions","Template functions",[328,1744,1745,1746,1748,1749,1752,1753,457],{},"Files in ",[163,1747,333],{}," are rendered with Go's ",[163,1750,1751],{},"text\u002Ftemplate",". For a full walkthrough with examples and common patterns see ",[339,1754,66],{"href":67},[859,1756,1758],{"id":1757},"available-in-file-templates","Available in file templates",[328,1760,1761,1762,414,1765,414,1768,414,1771,414,1774,414,1777,414,1780,414,1783,414,1786,414,1789,414,1792,414,1795,414,1798,414,1801,414,1804,414,1807,457],{},"Built-in Go functions: ",[163,1763,1764],{},"and",[163,1766,1767],{},"or",[163,1769,1770],{},"not",[163,1772,1773],{},"eq",[163,1775,1776],{},"ne",[163,1778,1779],{},"lt",[163,1781,1782],{},"le",[163,1784,1785],{},"gt",[163,1787,1788],{},"ge",[163,1790,1791],{},"len",[163,1793,1794],{},"index",[163,1796,1797],{},"slice",[163,1799,1800],{},"print",[163,1802,1803],{},"printf",[163,1805,1806],{},"println",[163,1808,1809],{},"call",[328,1811,1812],{},"spin helpers:",[348,1814,1815,1825],{},[351,1816,1817],{},[354,1818,1819,1822],{},[357,1820,1821],{},"Function",[357,1823,1824],{},"Result",[367,1826,1827,1842,1852,1862,1871,1888,1897,1911],{},[354,1828,1829,1839],{},[372,1830,1831,414,1833,414,1836],{},[163,1832,1292],{},[163,1834,1835],{},"lower",[163,1837,1838],{},"title",[372,1840,1841],{},"Case transforms",[354,1843,1844,1849],{},[372,1845,1846],{},[163,1847,1848],{},"trim",[372,1850,1851],{},"Trims whitespace",[354,1853,1854,1859],{},[372,1855,1856],{},[163,1857,1858],{},"join",[372,1860,1861],{},"Joins a slice with a separator",[354,1863,1864,1868],{},[372,1865,1866],{},[163,1867,907],{},[372,1869,1870],{},"Fallback when empty",[354,1872,1873,1880],{},[372,1874,1875,414,1877],{},[163,1876,1299],{},[163,1878,1879],{},"kebab",[372,1881,1882,414,1885],{},[163,1883,1884],{},"my_project",[163,1886,1887],{},"my-project",[354,1889,1890,1894],{},[372,1891,1892],{},[163,1893,1295],{},[372,1895,1896],{},"Shell-safe quoted string",[354,1898,1899,1904],{},[372,1900,1901],{},[163,1902,1903],{},"now",[372,1905,1906,1907,1910],{},"Current time (",[163,1908,1909],{},"now \"2006\"",")",[354,1912,1913,1927],{},[372,1914,1915,414,1918,414,1921,414,1924],{},[163,1916,1917],{},"contains",[163,1919,1920],{},"has",[163,1922,1923],{},"not_has",[163,1925,1926],{},"one_of",[372,1928,1929],{},"Membership checks",[859,1931,1933],{"id":1932},"available-in-hooks","Available in hooks",[328,1935,1286,1936,1938],{},[163,1937,1078],{},").\nNo custom functions or pipes. Use shell tools for transformations.",[1940,1941,1942],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":161,"searchDepth":190,"depth":190,"links":1944},[1945,1946,1947,1948,1952,1953,1954,1955,1956],{"id":153,"depth":190,"text":154},{"id":345,"depth":190,"text":346},{"id":516,"depth":190,"text":519},{"id":249,"depth":190,"text":581,"children":1949},[1950,1951],{"id":861,"depth":205,"text":862},{"id":915,"depth":205,"text":916},{"id":156,"depth":190,"text":1216},{"id":308,"depth":190,"text":1335},{"id":508,"depth":190,"text":508},{"id":1452,"depth":190,"text":1455},{"id":1741,"depth":190,"text":1742,"children":1957},[1958,1959],{"id":1757,"depth":205,"text":1758},{"id":1932,"depth":205,"text":1933},"spin.toml lives at the root of every template. It describes the template and tells spin new what questions to ask and what files to render.","md",null,{},{"title":78,"description":1960},"1DsFGISNHTWPvUZrxq94WLDUkCe4HWxQX4ApqKADyfE",[1967,1969],{"title":74,"path":75,"stem":76,"description":1968,"children":-1},"A template is a normal directory or Git repository. Publish it by making it available at a URL or local path that others can pass to spin new or spin add.",{"title":88,"path":89,"stem":90,"description":1970,"children":-1},"A registry is a collection of templates that spin search can read. It is a directory with registry.toml and a templates\u002F directory.",1787755180240]