Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvHome = "BRAINJAR_HOME" ConfigFile = "config.yaml" DBFile = "brainjar.db" )
View Source
const ConfigSchemaVersion = 1
ConfigSchemaVersion is bumped when the on-disk YAML schema changes in a non-backwards-compatible way. `Load` refuses to read unknown versions.
View Source
const DefaultPlatform = "claude"
DefaultPlatform is the adapter used when a workspace is initialized without an explicit choice. Kept here (rather than imported from internal/platform) so pkg/config stays dependency-free.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the absolute path to the config file inside home.
func IsNotExist ¶
IsNotExist reports whether err indicates the config file is missing.
func ResolveHome ¶
ResolveHome returns the brainjar home directory.
Precedence, highest wins:
- homeFlag (the --home flag value, empty if unset)
- $BRAINJAR_HOME
- $HOME/.brainjar
Types ¶
type Config ¶
type Config struct {
// SchemaVersion is the config file's schema version. Set by `init`.
SchemaVersion int `yaml:"schema_version" koanf:"schema_version"`
// WorkspaceID is the stable UUID of the workspace this home directory
// is bound to. Set by `init`. Names can drift; IDs don't.
WorkspaceID string `yaml:"workspace_id" koanf:"workspace_id"`
// Platform is the slug of the agent-runtime adapter used by
// `brainjar sync` and `brainjar hooks *`. Defaults to "claude".
Platform string `yaml:"platform" koanf:"platform"`
}
Config is the on-disk CLI configuration. One instance per home dir.
Click to show internal directories.
Click to hide internal directories.