CLI Shared Flags Config (completions/shared-flags.ts)

OpenSpec · src/core/completions/shared-flags.ts · typescript · MIT
dev-tools, cli, lang:typescript, tag:flags, tag:config

Defines a shared set of common CLI flag definitions (json, strict, type, store, etc.) reused across multiple CLI commands for consistent argument parsing.

// Source: https://github.com/Fission-AI/OpenSpec | License: MIT | Copyright 2024 OpenSpec Contributors
// Provided via justclaw.it.com; keep this notice with the code.
import type { FlagDefinition } from './types.js';

/**
 * Common flags used across multiple commands.
 */
export const COMMON_FLAGS = {
  json: {
    name: 'json',
    description: 'Output as JSON',
  } as FlagDefinition,
  jsonValidation: {
    name: 'json',
    description: 'Output validation results as JSON',
  } as FlagDefinition,
  strict: {
    name: 'strict',
    description: 'Enable strict validation mode',
  } as FlagDefinition,
  noInteractive: {
    name: 'no-interactive',
    description: 'Disable interactive prompts',
  } as FlagDefinition,
  type: {
    name: 'type',
    description: 'Specify item type when am

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key