memories.sh
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

OptionDescription
-g, --globalInitialize global memories (user-wide, not project-specific)
-r, --rule <rule>Add an initial rule (can be repeated)

Examples

Initialize in the current project:

memories init

Initialize with starter rules:

memories init --rule "Use TypeScript strict mode" --rule "Prefer pnpm"

Initialize global memories:

memories init --global

Behavior

  1. Creates the SQLite database at ~/.config/memories/local.db if it doesn't exist
  2. Runs any pending schema migrations
  3. If inside a git repo, detects and registers the project identity
  4. Adds any initial rules provided via --rule
  5. Prints a quick-start guide with next steps