MCPcopy Index your code
hub / github.com/mattallty/Caporal.js

github.com/mattallty/Caporal.js @v3.1.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.1.5 ↗ · + Follow
332 symbols 927 edges 115 files 69 documented · 21% 24 cross-repo links updated 2y agov3.1.5 · 2023-08-28★ 3,44921 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img src="https://github.com/mattallty/Caporal.js/blob/6a8bd68b454ff6327df310d290ee453e0efc087b/assets/caporal.svg?raw=true" width="437" height="127">

Caporal

A full-featured framework for building command line applications (cli) with node.js, including help generation, colored output, verbosity control, custom logger, coercion and casting, typos suggestions, and auto-complete for bash/zsh/fish.

Install

Simply add Caporal as a dependency:

$ npm install @caporal/core

# Or if you are using yarn (https://yarnpkg.com/lang/en/)
$ yarn add caporal @caporal/core

Documentation

Checkout our website https://caporal.io for docs.

License

MIT License, see LICENSE file. Copyright (c) 2017-present Matthias ETIENNE.

Extension points exported contracts — how you extend this code

Logger (Interface)
(no doc)
src/types.ts
Suggestion (Interface)
(no doc)
src/utils/suggest.ts
ArgsValidationResult (Interface)
(no doc)
src/argument/validate.ts
CompletionItem (Interface)
(no doc)
src/autocomplete/types.ts
ValidationErrorParameters (Interface)
(no doc)
src/error/validation.ts
CustomizedHelpOpts (Interface)
(no doc)
src/help/types.ts
OptionsValidationResult (Interface)
(no doc)
src/option/validate.ts
FunctionValidator (Interface)
(no doc)
src/types.ts

Core symbols most depended-on inside this repo

argument
called by 101
src/command/index.ts
action
called by 63
src/command/index.ts
command
called by 58
src/command/index.ts
option
called by 58
src/command/index.ts
run
called by 58
src/command/index.ts
validateWithCaporal
called by 56
src/validator/caporal.ts
parseLine
called by 27
src/parser/index.ts
action
called by 26
src/program/index.ts

Shape

Function 152
Method 110
Class 34
Interface 34
Enum 2

Languages

TypeScript100%

Modules by API surface

src/parser/index.ts41 symbols
src/program/index.ts39 symbols
src/types.ts32 symbols
src/command/index.ts29 symbols
src/option/index.ts18 symbols
src/autocomplete/index.ts13 symbols
src/option/utils.ts12 symbols
src/validator/utils.ts10 symbols
src/argument/validate.ts10 symbols
src/utils/suggest.ts6 symbols
src/help/utils.ts6 symbols
src/help/index.ts6 symbols

Dependencies from manifests, versioned

@caporal/corefile:../ · 1×
@octokit/rest20.0.1 · 1×
@semantic-release/changelog6.0.3 · 1×
@semantic-release/exec6.0.3 · 1×
@semantic-release/git10.0.1 · 1×
@tsconfig/node1616.1.1 · 1×
@types/glob8.1.0 · 1×
@types/lodash4.14.197 · 1×
@types/node20.5.6 · 1×
@types/tabtab3.0.2 · 1×
@types/wrap-ansi8.0.1 · 1×
@typescript-eslint/eslint-plugin6.4.1 · 1×

For agents

$ claude mcp add Caporal.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact