danielmiessler.fabric/internal/cli
Kayvan Sylvan 134171de7e modernize ./...
/Users/kayvan/src/fabric/internal/plugins/ai/codex/errors.go:61:5: errors.As can be simplified using AsType[*openaiapi.Error]
/Users/kayvan/src/fabric/internal/cli/flags.go:126:2: NumField/Field loop can simplified using Type.Fields iteration
/Users/kayvan/src/fabric/internal/cli/help.go:145:2: NumField/Field loop can simplified using Type.Fields iteration
/Users/kayvan/src/fabric/internal/cli/help.go:225:2: NumField/Field loop can simplified using Type.Fields iteration
/Users/kayvan/src/fabric/internal/i18n/i18n.go:222:15: strings.Split call can be simplified using strings.Cut
2026-05-28 12:27:27 -07:00
..
chat.go refactor: propagate context.Context through Vendor interface methods 2026-03-25 16:09:10 -07:00
chat_test.go feat: add image generation compatibility warnings for unsupported models 2026-01-20 11:55:18 -08:00
cli.go fix(youtube): resolve tesseract CLI args, racy error handling, timestamp overflow, and import ordering 2026-03-24 14:04:20 -05:00
cli_test.go refactor: replace hardcoded error string with i18n translation lookup 2026-02-16 04:32:30 -08:00
configuration.go chore: update command handlers to return 'handled' boolean 2025-07-09 02:57:29 -07:00
example.yaml feat: add disable-responses-api flag for OpenAI compatibility 2025-07-17 10:47:35 -07:00
extensions.go chore: update command handlers to return 'handled' boolean 2025-07-09 02:57:29 -07:00
flags.go modernize ./... 2026-05-28 12:27:27 -07:00
flags_test.go feat: add Windows-style forward slash flag support to CLI argument parser 2025-09-10 06:30:20 -07:00
help.go modernize ./... 2026-05-28 12:27:27 -07:00
initialization.go feat: add comprehensive internationalization support with English and Spanish locales 2025-09-09 09:34:54 -07:00
listing.go feat: add --readpattern flag to print pattern contents to terminal 2026-04-15 00:43:16 -04:00
management.go chore: update command handlers to return 'handled' boolean 2025-07-09 02:57:29 -07:00
output.go refactor: optimize HTTP client reuse and simplify error formatting 2025-12-25 07:58:49 -08:00
output_test.go feat: ensure newline in CreateOutputFile and improve tests 2025-11-16 11:15:47 -08:00
README.md refactor: restructure project to align with standard Go layout 2025-07-08 22:47:17 -07:00
setup_server.go chore: update command handlers to return 'handled' boolean 2025-07-09 02:57:29 -07:00
tools.go refactor: replace fmt.Errorf("%s", ...) with errors.New() and normalize i18n strings 2026-02-21 15:48:01 -08:00
transcribe.go refactor: replace fmt.Errorf("%s", ...) with errors.New() and normalize i18n strings 2026-02-21 15:48:01 -08:00

YAML Configuration Support

Overview

Fabric now supports YAML configuration files for commonly used options. This allows users to persist settings and share configurations across multiple runs.

Usage

Use the --config flag to specify a YAML configuration file:

fabric --config ~/.config/fabric/config.yaml "Tell me about APIs"

Configuration Precedence

  1. CLI flags (highest priority)
  2. YAML config values
  3. Default values (lowest priority)

Supported Configuration Options

# Model selection
model: gpt-4
modelContextLength: 4096

# Model parameters
temperature: 0.7
topp: 0.9
presencepenalty: 0.0
frequencypenalty: 0.0
seed: 42

# Pattern selection
pattern: analyze  # Use pattern name or filename

# Feature flags
stream: true
raw: false

Rules and Behavior

  • Only long flag names are supported in YAML (e.g., temperature not -t)
  • CLI flags always override YAML values
  • Unknown YAML declarations are ignored
  • If a declaration appears multiple times in YAML, the last one wins
  • The order of YAML declarations doesn't matter

Type Conversions

The following string-to-type conversions are supported:

  • String to number: "42"42
  • String to float: "42.5"42.5
  • String to boolean: "true"true

Example Config

# ~/.config/fabric/config.yaml
model: gpt-4
temperature: 0.8
pattern: analyze
stream: true
topp: 0.95
presencepenalty: 0.1
frequencypenalty: 0.2

CLI Override Example

# Override temperature from config
fabric --config ~/.config/fabric/config.yaml --temperature 0.9 "Query"