Skip to content

Commit 116fe31

Browse files
GokhanKabarclaude
andcommitted
refactor: merge memo-core and memo-hooks into memo-agent
Eliminate the three-crate structure. Move store logic into memo-cli/src/store.rs and hooks logic into memo-cli/src/hooks.rs. Single crate, single publish, no version synchronization needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 13588ec commit 116fe31

8 files changed

Lines changed: 13 additions & 58 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["memo-core", "memo-hooks", "memo-cli"]
2+
members = ["memo-cli"]
33
resolver = "2"
44

55
[workspace.package]

memo-cli/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ name = "memo"
1414
path = "src/main.rs"
1515

1616
[dependencies]
17-
memo-core = { path = "../memo-core", version = "0.1.5" }
18-
memo-hooks = { path = "../memo-hooks", version = "0.1.5" }
1917
clap = { workspace = true }
2018
anyhow = { workspace = true }
19+
serde = { workspace = true }
2120
serde_json = { workspace = true }
2221
chrono = { workspace = true }
2322
colored = { workspace = true }
23+
rusqlite = { workspace = true }
24+
sha2 = { workspace = true }
25+
dirs = { workspace = true }
2426

2527
[dev-dependencies]
2628
tempfile = "3"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anyhow::Result;
22
use chrono::{DateTime, Utc};
3-
use memo_core::{Entry, Store};
3+
use crate::store::{Entry, Store};
44
use std::fs;
55
use std::path::Path;
66

memo-cli/src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
mod store;
2+
mod hooks;
3+
14
use anyhow::{Context, Result};
25
use clap::{Parser, Subcommand, ValueEnum};
36
use colored::Colorize;
4-
use memo_core::{Entry, Store, db_path_for, inject_marker_path};
5-
use memo_hooks::{inject_all, setup, write_to_claude_md, write_to_copilot_instructions, write_to_cursor_rules, write_to_vscode, write_to_windsurf_rules, InjectBlock};
7+
use store::{Entry, Store, db_path_for, inject_marker_path};
8+
use hooks::{inject_all, setup, write_to_claude_md, write_to_copilot_instructions, write_to_cursor_rules, write_to_vscode, write_to_windsurf_rules, InjectBlock};
69
use std::io::Read;
710
use std::path::{Path, PathBuf};
811

@@ -810,7 +813,7 @@ fn main() -> Result<()> {
810813
}
811814

812815
Command::Bootstrap { limit, yes } => {
813-
let commits = memo_core::git_log(&dir, limit);
816+
let commits = store::git_log(&dir, limit);
814817
if commits.is_empty() {
815818
println!("no git history found in this directory");
816819
return Ok(());

memo-core/Cargo.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

memo-hooks/Cargo.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)