[{"data":1,"prerenderedAt":802,"buildId":803},["ShallowReactive",2],{"docs:\u002Fintegrations\u002Fcli":3},{"page":4,"section":16,"document":17,"credits":10,"prev":798,"next":10},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"cli","\u002Fintegrations\u002Fcli","integrations\u002Fcli.md","Command line","Run glosslint from the terminal to check Markdown and MDX docs, test corpus examples, print a glossary, and explain terms.",null,[],"i-lucide-terminal","article",true,3,"integrations",{"nodes":18,"toc":790},[19,23,31,51,74,96,159,177,183,239,249,253,258,296,309,337,478,485,489,511,538,556,559,597,602,614,622,641,644,678,682,687,703,747,762,781],[20,21,22],"p",{},"Use the glosslint CLI to check files that ESLint does not read, such as Markdown and MDX docs, test your corpus examples in CI, export a Markdown glossary for coding agents, and look up terms from the terminal.",[24,25,30],"h2",{"id":26,"anchor":27},"config-discovery-and-flags",{"label":28,"icon":29},"Section titled \"Config discovery and flags\"","#","Config discovery and flags",[20,32,33,34,38,39,42,43,46,47,50],{},"Run ",[35,36,37],"code",{},"glosslint"," from the folder that holds ",[35,40,41],{},"glosslint.config.ts",", or point to another file with ",[35,44,45],{},"--config \u003Cpath>",". Without ",[35,48,49],{},"--config",", the CLI looks for these files in order:",[52,53,54,59,64,69],"ol",{},[55,56,57],"li",{},[35,58,41],{},[55,60,61],{},[35,62,63],{},"glosslint.config.mts",[55,65,66],{},[35,67,68],{},"glosslint.config.js",[55,70,71],{},[35,72,73],{},"glosslint.config.mjs",[20,75,76,77,79,80,83,84,87,88,91,92,95],{},"Every command accepts ",[35,78,45],{},". The ",[35,81,82],{},"check"," and ",[35,85,86],{},"test"," commands also accept ",[35,89,90],{},"--color",", which is on by default when writing to a terminal unless ",[35,93,94],{},"NO_COLOR"," is set.",[97,98,99,112],"table",{},[100,101,102],"thead",{},[103,104,105,109],"tr",{},[106,107,108],"th",{},"Command",[106,110,111],{},"What it does",[113,114,115,129,139,149],"tbody",{},[103,116,117,123],{},[118,119,120],"td",{},[35,121,122],{},"glosslint [check] [...paths]",[118,124,125,126,128],{},"Check Markdown and text files. ",[35,127,82],{}," is the default command.",[103,130,131,136],{},[118,132,133],{},[35,134,135],{},"glosslint test",[118,137,138],{},"Check every term's good and bad examples.",[103,140,141,146],{},[118,142,143],{},[35,144,145],{},"glosslint print [--format md|json]",[118,147,148],{},"Print the corpus as a Markdown glossary or as JSON.",[103,150,151,156],{},[118,152,153],{},[35,154,155],{},"glosslint explain \u003Cquery>",[118,157,158],{},"Show what the corpus says about a word or phrase.",[160,161,164],"github-callout",{"type":162,"title":163},"note","Note",[20,165,166,167,170,171,176],{},"There is no ",[35,168,169],{},"--fix",". The CLI only reports findings. To autofix spelling and casing in code and YAML locales, use ",[172,173,175],"a",{"href":174},"\u002Fintegrations\u002Feslint","ESLint",".",[24,178,182],{"id":179,"anchor":180},"exit-codes",{"label":181,"icon":29},"Section titled \"Exit codes\"","Exit codes",[97,184,185,195],{},[100,186,187],{},[103,188,189,192],{},[106,190,191],{},"Exit code",[106,193,194],{},"Meaning",[113,196,197,211,229],{},[103,198,199,204],{},[118,200,201],{},[35,202,203],{},"0",[118,205,206,207,210],{},"No findings, every example passes, or ",[35,208,209],{},"explain"," found a term.",[103,212,213,218],{},[118,214,215],{},[35,216,217],{},"1",[118,219,220,222,223,225,226,228],{},[35,221,82],{}," found something, a ",[35,224,86],{}," example failed, or ",[35,227,209],{}," found no term.",[103,230,231,236],{},[118,232,233],{},[35,234,235],{},"2",[118,237,238],{},"The config failed to load or is wrong, or the command line is wrong. The error goes to stderr.",[20,240,241,242,246,247,176],{},"See ",[172,243,245],{"href":244},"\u002Freference\u002Fconfig-errors","Config errors"," for every error code that causes exit code ",[35,248,235],{},[24,250,82],{"id":82,"anchor":251},{"label":252,"icon":29},"Section titled \"check\"",[20,254,255,257],{},[35,256,82],{}," is the default command. It reads files, folders, and glob patterns. With no path, it reads the current folder.",[20,259,260,261,263,264,267,268,271,272,275,276,83,279,282,283,286,287,290,291,295],{},"When given a folder, ",[35,262,82],{}," reads ",[35,265,266],{},".md",", ",[35,269,270],{},".mdx",", and ",[35,273,274],{},".txt"," files while skipping ",[35,277,278],{},"node_modules",[35,280,281],{},".git",". Pass ",[35,284,285],{},"--ext md,mdx"," to change which extensions it reads in folders. Pass ",[35,288,289],{},"--format json"," to print machine-readable output; see ",[172,292,294],{"href":293},"\u002Freference\u002Ffindings","Findings"," for the JSON schema.",[20,297,298,299,301,302,83,305,308],{},"In Markdown files, ",[35,300,82],{}," skips frontmatter, fenced and inline code, HTML comments and tags, link targets, and reference definitions. In MDX files, it also skips ",[35,303,304],{},"import",[35,306,307],{},"export"," lines. It reads headings as labels, each table cell on its own with the first row as headers, and paragraphs and list items as sentences.",[310,311,315],"pre",{"language":312,"frame":313,"class":314},"sh","terminal","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[35,316,318],{"class":317},"language-sh",[319,320,323,327,331,334],"span",{"class":321,"style":322},"line","display: inline",[319,324,326],{"style":325},"color:#953800;--shiki-dark:#FFA657","npx",[319,328,330],{"style":329},"color:#0A3069;--shiki-dark:#A5D6FF"," glosslint",[319,332,333],{"style":329}," check",[319,335,336],{"style":329}," docs\u002Fguide",[310,338,340],{"language":339,"class":314},"txt",[35,341,343,348,349,348,354,348,359,348,364,348,369,348,374,348,378,348,382,348,387,348,392,348,397,348,401,348,406,348,411,348,416,348,421,348,425,348,430,348,435,348,440,348,445,348,450,348,454,348,459,348,464,348,469,348,473],{"class":342},"language-txt",[319,344,345],{"class":321,"style":322},[319,346,347],{},"[GLOSSLINT_CASE] \"day pass\" in docs\u002Fguide\u002Fpasses.md:1:12","\n",[319,350,351],{"class":321,"style":322},[319,352,353],{},"├▶ fix: Change to \"Day Pass\": \"# Buying a Day Pass\"",[319,355,356],{"class":321,"style":322},[319,357,358],{},"╰▶ term: Day Pass",[319,360,361],{"class":321,"style":322},[319,362,363],{},"",[319,365,366],{"class":321,"style":322},[319,367,368],{},"[GLOSSLINT_CASE] \"Day Pass\" in docs\u002Fguide\u002Fpasses.md:3:7",[319,370,371],{"class":321,"style":322},[319,372,373],{},"├▶ fix: Change to \"day pass\": \"Buy a day pass at the kiosk, or pay with Apple pay in the app.\"",[319,375,376],{"class":321,"style":322},[319,377,358],{},[319,379,380],{"class":321,"style":322},[319,381,363],{},[319,383,384],{"class":321,"style":322},[319,385,386],{},"[GLOSSLINT_CASE] \"Apple pay\" in docs\u002Fguide\u002Fpasses.md:3:42",[319,388,389],{"class":321,"style":322},[319,390,391],{},"├▶ fix: Change to \"Apple Pay\": \"Buy a Day Pass at the kiosk, or pay with Apple Pay in the app.\"",[319,393,394],{"class":321,"style":322},[319,395,396],{},"╰▶ term: Apple Pay",[319,398,399],{"class":321,"style":322},[319,400,363],{},[319,402,403],{"class":321,"style":322},[319,404,405],{},"[GLOSSLINT_AVOID] \"Manned\" in docs\u002Fguide\u002Fpasses.md:4:1",[319,407,408],{"class":321,"style":322},[319,409,410],{},"├▶ why: It assumes the people on duty are men.",[319,412,413],{"class":321,"style":322},[319,414,415],{},"├▶ fix: Use \"Staffed\": \"Staffed stations sell passes from 7:00 to 19:00.\"",[319,417,418],{"class":321,"style":322},[319,419,420],{},"╰▶ term: staffed, having people on duty.",[319,422,423],{"class":321,"style":322},[319,424,363],{},[319,426,427],{"class":321,"style":322},[319,428,429],{},"[GLOSSLINT_AVOID] \"rack\" in docs\u002Fguide\u002Friding.md:3:56",[319,431,432],{"class":321,"style":322},[319,433,434],{},"├▶ why: Racks are unpowered.",[319,436,437],{"class":321,"style":322},[319,438,439],{},"├▶ fix: Use \"dock\": \"Unlock a bike at any station, then return it to a free dock when you finish.\"",[319,441,442],{"class":321,"style":322},[319,443,444],{},"├▶ term: Dock, a powered stand where one bike is locked.",[319,446,447],{"class":321,"style":322},[319,448,449],{},"╰▶ see: https:\u002F\u002Fexample.com\u002Fdocs\u002Fdocks",[319,451,452],{"class":321,"style":322},[319,453,363],{},[319,455,456],{"class":321,"style":322},[319,457,458],{},"[GLOSSLINT_TERM] \"e-bike\" in docs\u002Fguide\u002Friding.md:4:15",[319,460,461],{"class":321,"style":322},[319,462,463],{},"├▶ fix: Change to \"eBike\": \"Check out our eBike fleet if the hill feels long.\"",[319,465,466],{"class":321,"style":322},[319,467,468],{},"╰▶ term: eBike",[319,470,471],{"class":321,"style":322},[319,472,363],{},[319,474,475],{"class":321,"style":322},[319,476,477],{},"6 findings in 2 of 2 files.",[20,479,480,481,484],{},"The heading \"Buying a day pass\" is a label, so Day Pass takes Title Case there. In the next line it sits inside a sentence, so it takes lowercase. \"Check out our\" and \"roof rack\" are in ",[35,482,483],{},"allow",", and the CLI never reads the code block. Apple Pay comes from the tech preset and \"Manned\" from the inclusive preset.",[24,486,86],{"id":86,"anchor":487},{"label":488,"icon":29},"Section titled \"test\"",[20,490,491,493,494,497,498,502,503,506,507,510],{},[35,492,86],{}," checks every term's ",[35,495,496],{},"examples"," field, defined in ",[172,499,501],{"href":500},"\u002Fguide\u002Fterms","Defining terms",". Every ",[35,504,505],{},"good"," string must pass with no findings for that term, and every ",[35,508,509],{},"bad"," string must give a finding for that term. Run it in CI and after editing the corpus.",[310,512,513],{"language":312,"frame":313,"class":314},[35,514,515],{"class":317},[319,516,517,519,521,524,528,531,535],{"class":321,"style":322},[319,518,326],{"style":325},[319,520,330],{"style":329},[319,522,523],{"style":329}," test",[319,525,527],{"style":526},"color:#CF222E;--shiki-dark:#FF7B72"," |",[319,529,530],{"style":325}," tail",[319,532,534],{"style":533},"color:#0550AE;--shiki-dark:#79C0FF"," -n",[319,536,537],{"style":533}," 3",[310,539,540],{"language":339,"class":314},[35,541,542,348,547,348,551],{"class":342},[319,543,544],{"class":321,"style":322},[319,545,546],{},"✓ Dock                    1 good, 1 bad",[319,548,549],{"class":321,"style":322},[319,550,363],{},[319,552,553],{"class":321,"style":322},[319,554,555],{},"38 terms, 0 failing.",[20,557,558],{},"A failing term shows why it failed and what to change:",[310,560,561],{"language":339,"class":314},[35,562,563,348,568,348,573,348,578,348,583,348,588,348,592],{"class":342},[319,564,565],{"class":321,"style":322},[319,566,567],{},"✗ Dock  good example \"Return the bike to a dock bay\" was flagged:",[319,569,570],{"class":321,"style":322},[319,571,572],{},"        \"bay\" is an avoid word for Dock.",[319,574,575],{"class":321,"style":322},[319,576,577],{},"        └ narrow the avoid word or move the example",[319,579,580],{"class":321,"style":322},[319,581,582],{},"        bad example \"Return the bike to a station\" was not flagged.",[319,584,585],{"class":321,"style":322},[319,586,587],{},"        └ add the wording to \"avoid\" or fix the example",[319,589,590],{"class":321,"style":322},[319,591,363],{},[319,593,594],{"class":321,"style":322},[319,595,596],{},"1 term, 1 failing.",[24,598,599],{"id":599,"anchor":600},"print",{"label":601,"icon":29},"Section titled \"print\"",[20,603,604,606,607,609,610,613],{},[35,605,599],{}," writes the corpus as a Markdown glossary, with one section per term that says more than its spelling and one \"Spelling\" line for the rest. Pass ",[35,608,289],{}," to write ",[35,611,612],{},"{ terms, allow }"," instead.",[20,615,616,617,621],{},"Redirect the Markdown output to a file that coding agents read, as described in ",[172,618,620],{"href":619},"\u002Fguide\u002Fagents","Coding agents",":",[310,623,624],{"language":312,"frame":313,"class":314},[35,625,626],{"class":317},[319,627,628,630,632,635,638],{"class":321,"style":322},[319,629,326],{"style":325},[319,631,330],{"style":329},[319,633,634],{"style":329}," print",[319,636,637],{"style":526}," >",[319,639,640],{"style":329}," .agents\u002Fterms.md",[20,642,643],{},"The Dock section of that file:",[310,645,646],{"language":339,"class":314},[35,647,648,348,653,348,658,348,663,348,668,348,673],{"class":342},[319,649,650],{"class":321,"style":322},[319,651,652],{},"## Dock",[319,654,655],{"class":321,"style":322},[319,656,657],{},"A powered stand where one bike is locked.",[319,659,660],{"class":321,"style":322},[319,661,662],{},"- A station is a group of docks.",[319,664,665],{"class":321,"style":322},[319,666,667],{},"- Don't write: rack (racks are unpowered), bay.",[319,669,670],{"class":321,"style":322},[319,671,672],{},"- Good: \"Return the bike to any dock\". Bad: \"Return the bike to any rack\".",[319,674,675],{"class":321,"style":322},[319,676,677],{},"- See: [Docks](https:\u002F\u002Fexample.com\u002Fdocs\u002Fdocks).",[24,679,209],{"id":209,"anchor":680},{"label":681,"icon":29},"Section titled \"explain\"",[20,683,684,686],{},[35,685,209],{}," finds the term a word or phrase belongs to. The query may be the term itself, an abbreviation, a form, an avoid word, a misspelling, or a mention.",[310,688,689],{"language":312,"frame":313,"class":314},[35,690,691],{"class":317},[319,692,693,695,697,700],{"class":321,"style":322},[319,694,326],{"style":325},[319,696,330],{"style":329},[319,698,699],{"style":329}," explain",[319,701,702],{"style":329}," rack",[310,704,705],{"language":339,"class":314},[35,706,707,348,712,348,717,348,722,348,727,348,732,348,737,348,742],{"class":342},[319,708,709],{"class":321,"style":322},[319,710,711],{},"Dock",[319,713,714],{"class":321,"style":322},[319,715,716],{},"  \"rack\" is an avoid word for Dock. Racks are unpowered.",[319,718,719],{"class":321,"style":322},[319,720,721],{},"  A powered stand where one bike is locked.",[319,723,724],{"class":321,"style":322},[319,725,726],{},"  A station is a group of docks.",[319,728,729],{"class":321,"style":322},[319,730,731],{},"  Avoid: rack (racks are unpowered), bay.",[319,733,734],{"class":321,"style":322},[319,735,736],{},"  Good: \"Return the bike to any dock\". Bad: \"Return the bike to any rack\".",[319,738,739],{"class":321,"style":322},[319,740,741],{},"  See: Docks https:\u002F\u002Fexample.com\u002Fdocs\u002Fdocks",[319,743,744],{"class":321,"style":322},[319,745,746],{},"  Related: Station",[310,748,749],{"language":312,"frame":313,"class":314},[35,750,751],{"class":317},[319,752,753,755,757,759],{"class":321,"style":322},[319,754,326],{"style":325},[319,756,330],{"style":329},[319,758,699],{"style":329},[319,760,761],{"style":329}," e-bike",[310,763,764],{"language":339,"class":314},[35,765,766,348,771,348,776],{"class":342},[319,767,768],{"class":321,"style":322},[319,769,770],{},"eBike",[319,772,773],{"class":321,"style":322},[319,774,775],{},"  \"e-bike\" is spelled \"eBike\".",[319,777,778],{"class":321,"style":322},[319,779,780],{},"  Always written \"eBike\".",[20,782,783,784,787,788,176],{},"A word the corpus does not know prints ",[35,785,786],{},"No term in the corpus matches \"scooter\"."," and exits ",[35,789,217],{},[791,793,794,795,796,797],{"id":26,"depth":792,"text":30},2,{"id":179,"depth":792,"text":182},{"id":82,"depth":792,"text":82},{"id":86,"depth":792,"text":86},{"id":599,"depth":792,"text":599},{"id":209,"depth":792,"text":209},{"path":799,"title":800,"description":801},"\u002Fintegrations\u002Fx18n","x18n","Check source locale messages and hard-coded strings with the glosslint x18n plugin and export your corpus to x18n's glossary.",1795627930559,"94d466e2-147b-430f-b5f0-25c6a986e462"]