CLI Reference
memories init
Initialize memories for the current project or globally.
memories init [options]Initialize the memories database and optionally set up the current project. If run inside a git repository, the project is automatically detected from the origin remote URL.
Options
| Option | Description |
|---|---|
-g, --global | Initialize global memories (user-wide, not project-specific) |
-r, --rule <rule> | Add an initial rule (can be repeated) |
Examples
Initialize in the current project:
memories initInitialize with starter rules:
memories init --rule "Use TypeScript strict mode" --rule "Prefer pnpm"Initialize global memories:
memories init --globalBehavior
- Creates the SQLite database at
~/.config/memories/local.dbif it doesn't exist - Runs any pending schema migrations
- If inside a git repo, detects and registers the project identity
- Adds any initial rules provided via
--rule - Prints a quick-start guide with next steps