danielmiessler.fabric/cli
github-actions[bot] 2331d011c1
Some checks failed
Go Build / Run tests (push) Has been cancelled
Update Version File and Create Tag / update-version (push) Has been cancelled
Update version to v1.4.134 and commit
2025-02-11 22:23:42 +00:00
..
cli.go Add the ability to grab YouTube video transcript with timestamps 2025-02-07 15:25:22 +01:00
cli_test.go feat: plugins arch., new setup procedure 2024-10-19 13:09:37 +02:00
example.yaml Fix: Issue with the custom message and added example config file. 2024-12-16 20:44:05 +11:00
flags.go Update version to v1.4.134 and commit 2025-02-11 22:23:42 +00:00
flags_test.go Update version to v1.4.122 and commit 2024-12-14 15:02:50 +00:00
output.go feat: write tools output also to output file if defined; fix XouTube transcript ' character 2024-10-30 13:50:52 +01:00
output_test.go feat: plugins arch., new setup procedure 2024-10-19 13:09:58 +02:00
README.md Fix: Issue with the custom message and added example config file. 2024-12-16 20:44:05 +11: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"