Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Bun.argv
console.log(Bun.argv);
bun run cli.ts --flag1 --flag2 value
[ '/path/to/bun', '/path/to/cli.ts', '--flag1', '--flag2', 'value' ]
argv
util.parseArgs
import { parseArgs } from "util"; const { values, positionals } = parseArgs({ args: Bun.argv, options: { flag1: { type: "boolean", }, flag2: { type: "string", }, }, strict: true, allowPositionals: true, }); console.log(values); console.log(positionals);
{ flag1: true, flag2: "value", } [ "/path/to/bun", "/path/to/cli.ts" ]