You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the project configuration file project.toml must exist somewhere on the system when bibra is run (see the config PR #75). A user must get the projects.toml from the repository or write it from scratch. Notably when installing bibra from PyPI the projects.toml.example file is not obtained together with bibra itself.
Claude Sonnet 4.6 gave these options how this could be remediated:
This is the pattern used by tools like git, poetry, ruff, etc.
Pros: Excellent UX — zero manual file hunting; the file is self-documenting. Cons: Slightly more code; users still need to edit the file after init.
Option 3 — Bundle a default config inside the package
Ship a minimal projects.toml as a package data file (e.g. bibra/data/projects.toml) and fall back to it when no user config is found, using importlib.resources:
Pros: Zero user action required; app always starts. Cons: The bundled default is necessarily generic (only dummy backend works out of the box); real backends still need user configuration.
Option 4 — Graceful degradation (no config = dummy-only mode)
Instead of raising ConfigFileNotFoundError when no file is found, fall back to a built-in minimal registry containing only the dummy backend. The app starts and is usable; a warning is printed.
Pros: Best "it just works" experience for first-time users. Cons: Could be confusing if a user accidentally deletes their config and doesn't notice.
Recommended Combination
The most robust and user-friendly approach combines Options 1 + 2 + 4:
flowchart TD
A[bibra starts] --> B{--config or BIBRA_CONFIG?}
B -- yes --> C[Load that file]
B -- no --> D{./projects.toml exists?}
D -- yes --> C
D -- no --> E{"~/.config/bibra/projects.toml exists?"}
E -- yes --> C
E -- no --> F["Warn: no config found\nFall back to dummy-only mode"]
F --> G["Suggest: run 'bibra init'"]
Loading
The bibra init command scaffolds the config at ~/.config/bibra/projects.toml from the bundled projects.toml.example, so a new user's workflow becomes:
Currently the project configuration file
project.tomlmust exist somewhere on the system when bibra is run (see the config PR #75). A user must get the projects.toml from the repository or write it from scratch. Notably when installing bibra from PyPI theprojects.toml.examplefile is not obtained together with bibra itself.Claude Sonnet 4.6 gave these options how this could be remediated: