@getargvio/commander
v0.1.0
Published
Auto-instruments a commander command tree with @getargvio/argvio CLI usage telemetry
Maintainers
Readme
@getargvio/commander
Auto-instruments a commander
command tree with
@getargvio/argvio
CLI usage telemetry.
Install
npm install @getargvio/commandercommander is a peer dependency — bring your own (>=12.0.0).
Usage
import { Command } from 'commander'
import { instrument } from '@getargvio/commander'
const program = new Command()
program.name('mycli').version('1.4.0')
// ... add commands as usual ...
const { client } = instrument(program, process.env.MYCLI_ARGVIO_KEY ?? '', '1.4.0')
await program.parseAsync()
await client.shutdown(3000)See docs/commander-integration.md for
exactly what's captured automatically, the exitOverride() requirement,
and why --help/--version are treated as control flow rather than
errors.
License
MIT — see LICENSE.
