@@ -58,6 +58,59 @@ export default {
5858 'TypeAlias' ,
5959 ] ,
6060 lightHighlightTheme : 'vitesse-light' ,
61+ // llms.txt configuration
62+ // llmsTxtDeclarations: Auto-generation doesn't work with kind-dir router
63+ // for single-entry-point projects. Use empty array to disable.
64+ // See: https://github.com/boneskull/typedoc-plugin-llms-txt
65+ llmsTxtDeclarations : [ ] ,
66+ llmsTxtHeader : {
67+ description :
68+ 'A TypeScript-first CLI argument parser wrapping Node.js util.parseArgs() with full type inference and zero runtime dependencies.' ,
69+ features : [
70+ 'Combinator-style fluent API: `bargs("app").globals(opts).command("cmd", pos, handler)`' ,
71+ 'Full type inference: options and positionals are strongly typed without manual annotations' ,
72+ 'Option builders: `opt.string()`, `opt.boolean()`, `opt.number()`, `opt.enum()`, `opt.array()`, `opt.count()`' ,
73+ 'Positional builders: `pos.string()`, `pos.number()`, `pos.enum()`, `pos.variadic()`' ,
74+ 'Transforms: `map()` to transform results, `merge()` to combine parsers, `camelCaseValues()` for key conversion' ,
75+ 'Built-in help generation with ANSI theming and terminal hyperlink support' ,
76+ 'Zero runtime dependencies - only wraps Node.js built-in util.parseArgs()' ,
77+ ] ,
78+ } ,
79+ llmsTxtQuickReference : `// Simple CLI with options
80+ import { bargs, opt } from '@boneskull/bargs';
81+
82+ const result = await bargs('greeter', { version: '1.0.0' })
83+ .options(opt.options({
84+ name: opt.string({ description: 'Name to greet', default: 'World' }),
85+ excited: opt.boolean({ aliases: ['e'], description: 'Add excitement' }),
86+ }))
87+ .parseAsync();
88+
89+ console.log(\`Hello, \${result.values.name}\${result.values.excited ? '!' : '.'}\`);
90+
91+ // Command-based CLI with positionals
92+ import { bargs, opt, pos } from '@boneskull/bargs';
93+
94+ await bargs('tasks', { version: '1.0.0' })
95+ .globals(opt.options({
96+ verbose: opt.boolean({ aliases: ['v'] }),
97+ }))
98+ .command('add', pos.positionals(
99+ pos.string({ name: 'task', required: true }),
100+ ), ({ positionals }) => console.log(\`Added: \${positionals[0]}\`))
101+ .command('list', undefined, () => console.log('Listing tasks...'))
102+ .parseAsync();
103+
104+ // Type-safe enum options
105+ opt.enum({ values: ['debug', 'info', 'warn', 'error'], default: 'info' })
106+
107+ // Variadic positionals (collects remaining args)
108+ pos.variadic({ name: 'files' })` ,
109+ llmsTxtSections : {
110+ About : { displayName : 'About' , order : 3 } ,
111+ Guides : { displayName : 'Docs' , order : 1 } ,
112+ Reference : { displayName : 'Reference' , order : 2 } ,
113+ } ,
61114 markdownLinkExternal : true ,
62115 name : 'BARGS' ,
63116 navigation : {
@@ -73,6 +126,7 @@ export default {
73126 'typedoc-plugin-mdn-links' ,
74127 'typedoc-plugin-extras' ,
75128 '@boneskull/typedoc-plugin-mermaid' ,
129+ 'typedoc-plugin-llms-txt' ,
76130 ] ,
77131 preserveWatchOutput : true ,
78132 router : 'kind-dir' ,
0 commit comments