Class: ClaudeMemory::Commands::Initializers::ProjectInitializer
- Inherits:
-
Object
- Object
- ClaudeMemory::Commands::Initializers::ProjectInitializer
- Defined in:
- lib/claude_memory/commands/initializers/project_initializer.rb
Overview
Orchestrates project-local ClaudeMemory initialization
Instance Method Summary collapse
-
#initialize(stdout, stderr, stdin) ⇒ ProjectInitializer
constructor
A new instance of ProjectInitializer.
- #initialize_memory ⇒ Object
Constructor Details
#initialize(stdout, stderr, stdin) ⇒ ProjectInitializer
Returns a new instance of ProjectInitializer.
10 11 12 13 14 |
# File 'lib/claude_memory/commands/initializers/project_initializer.rb', line 10 def initialize(stdout, stderr, stdin) @stdout = stdout @stderr = stderr @stdin = stdin end |
Instance Method Details
#initialize_memory ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/claude_memory/commands/initializers/project_initializer.rb', line 16 def initialize_memory @stdout.puts "Initializing ClaudeMemory (project-local)...\n\n" if plugin_mode? @stdout.puts "(Plugin mode detected — hooks, MCP, and output style managed by plugin)\n\n" end # Check for existing hooks and offer options unless plugin_mode? hooks_config = HooksConfigurator.new(@stdout) if hooks_config.has_claude_memory_hooks?(".claude/settings.json") handle_existing_hooks(hooks_config) return 0 if @skip_initialization end end ensure_databases ensure_directories unless plugin_mode? configure_hooks unless @skip_hooks configure_mcp install_output_style end configure_memory_instructions 0 end |