sqlew v5.1.0 is out. This release consolidates SQLite databases into a single shared file under the user's home directory, enabling seamless knowledge sharing across git worktrees. It also migrates the global config to an XDG Base Directory-compliant path.
What Changed
Unified SQLite Database
Starting with v5.1.0, the SQLite database is stored in a shared location under the user's home directory.
~/.config/sqlew/sqlew-shared.db
sqlew identifies data by project name and git repository information, so multiple projects coexist safely within a single database file. When working in a git worktree branch, knowledge from the same repository is immediately accessible β no config changes required.
XDG-Compliant Global Config
The global config file has moved to an XDG Base Directory-compliant path.
~/.config/sqlew/config.toml
API key files for the SaaS backend are also stored under this directory. Existing config and API key files are automatically migrated to the new path when sqlew starts, so no manual action is needed in most cases.
If you have custom settings such as a modified default DB connection, verify that your paths have been correctly carried over after the migration.
How to Update
If you installed sqlew globally via npm, run:
npm update -g sqlew
After updating, launching sqlew will automatically:
- Consolidate per-project SQLite databases into
sqlew-shared.db - Move legacy config and API key files to the XDG-compliant path
Migration Notes
Explicitly Configured Databases Are Not Merged
If a project's .sqlew/config.toml explicitly sets [database].name, that database is excluded from automatic consolidation. This preserves intentional setups such as team-shared databases.
Backup of Original Databases
After consolidation, the original database file in each project is renamed to .sqlew/sqlew.db.migrated. If you need to revert β for example, to restore a team-shared database β follow these steps:
- Rename
.sqlew/sqlew.db.migratedback to.sqlew/sqlew.db - Add the following to
.sqlew/config.toml:
[database]
name = ".sqlew/sqlew.db"
Project-Level Config Still Takes Priority
The global config serves as the default, but if a project has its own .sqlew/config.toml, that config takes precedence. This allows per-project DB connection switching and other customizations.
Summary
The v5.1.0 changes are a quality-of-life upgrade for everyday sqlew usage. For developers who rely on git worktree, the reduction in configuration overhead is significant. Try it now with npm update -g sqlew.



