Debian Codegraph @

cli/publish-spec/src/program.ts

raw symbols SCIP
1 import { Command } from "commander";
2 import { run } from "./run.js";
3 import packageJSON from "./package.js";
4
5 const program = new Command()
6 .name(packageJSON.name)
7 .version(packageJSON.version)
8 .description("Publish a spec to fig teams");
9
10 program
11 .option("-i, --interactive", "Publish a spec interactively")
12 .option("-t, --token <string>", "A fig token")
13 .option("--team <string>", "Set the namespace of the published spec")
14 .option("-n, --name <string>", "Set the name of the published spec")
15 .option("-p, --spec-path <path>", "The local path of the spec to publish")
16 .option("-b, --binary-path <path>", "The path of the binary to run to generate the spec")
17 .option(
18 "-s, --subcommand-name <string>",
19 "The subcommand of the binary used to generate the spec"
20 )
21 .option(
22 "--is-script",
23 "The spec is a local script and will only be loaded when referenced in a fig/config.json file."
24 )
25 .option("-f, --framework <string>", "Framework used to build the CLI")
26 .action(run);
27
28 export { program };