cli

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package cli ports config.ts's buildOptions()/parseArgv() — the yargs flag definitions — onto cobra.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(cmd *cobra.Command, f *Flags)

BindFlags registers all graphql-codegen flags on the given command and returns a *Flags populated when the command is parsed.

func Finalize

func Finalize(cmd *cobra.Command, f *Flags)

Finalize resolves tri-state flags after parse. Call once in the command's RunE before reading Flags.

Types

type Flags

type Flags struct {
	Config                    string
	Watch                     bool
	WatchGlobs                []string
	Require                   []string
	Overwrite                 bool
	Project                   string
	Silent                    bool
	ErrorsOnly                bool
	Profile                   bool
	Check                     bool
	Verbose                   bool
	Debug                     bool
	IgnoreNoDocuments         bool
	EmitLegacyCommonJSImports *bool
	ImportExtension           string
	Cwd                       string
	// contains filtered or unexported fields
}

Flags carries the parsed CLI flags (mirrors YamlCliFlags in config.ts).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL