Skip to content

contextcraft.Config

Python
Config(secrets: SecretPolicy = SecretPolicy(), analysis_workers: int = 0, budget_tokens: int = 16000, focus_query: str = '', focus_files: tuple[str, ...] = (), output_format: OutputFormat = 'markdown', tokenizer_encoding: Encoding = 'cl100k_base', max_tier: Level = 'full', max_file_size_bytes: int = 16 * 1024 * 1024, respect_gitignore: bool = True, include_hidden: bool = True, use_default_excludes: bool = True, exclude_patterns: tuple[str, ...] = (), include_directories: tuple[str, ...] = ()) -> None

Immutable analysis and generation settings shared with the native engine.

Use dataclasses.replace to change a request. Path collections are tuples, and format, encoding, tier, and secret mode use lowercase string values.

Attributes:

contextcraft.Config.analysis_workers

Python
analysis_workers: int = 0

contextcraft.Config.budget_tokens

Python
budget_tokens: int = 16000

contextcraft.Config.exclude_patterns

Python
exclude_patterns: tuple[str, ...] = ()

contextcraft.Config.focus_files

Python
focus_files: tuple[str, ...] = ()

contextcraft.Config.focus_query

Python
focus_query: str = ''

contextcraft.Config.include_directories

Python
include_directories: tuple[str, ...] = ()

contextcraft.Config.include_hidden

Python
include_hidden: bool = True

contextcraft.Config.max_file_size_bytes

Python
max_file_size_bytes: int = 16 * 1024 * 1024

contextcraft.Config.max_tier

Python
max_tier: Level = 'full'

contextcraft.Config.output_format

Python
output_format: OutputFormat = 'markdown'

contextcraft.Config.respect_gitignore

Python
respect_gitignore: bool = True

contextcraft.Config.secrets

Python
secrets: SecretPolicy = field(default_factory=SecretPolicy)

contextcraft.Config.tokenizer_encoding

Python
tokenizer_encoding: Encoding = 'cl100k_base'

contextcraft.Config.use_default_excludes

Python
use_default_excludes: bool = True