Repository navigation
refactor(#131): extract CLI structs and logging into dedicated modules - #298
Merged
Merged
Conversation
Extract CLI argument definitions (clap structs/enums) into cli.rs and logging setup into logging.rs. main.rs reduced from 449 to ~100 lines. - cli.rs: Cli struct, Commands enum, TagCommands, NamespaceCommands, AgingCommands, SupportedShell - logging.rs: init() with console + daily rotating file appender - main.rs: entry point only (parse, logging, config, dispatch) - All crate::X imports updated to crate::cli::X in command modules - logging.rs: create log dir if missing, fallback to temp instead of cwd - Added .cora.yaml config (pre-commit hook installed) Also adds .cora/ to .gitignore (local Cora cache directory).
| /// Delete all memories with this tag | ||
| #[arg(long)] | ||
| tag: Option<String>, | ||
| /// Delete all cold (not accessed in 30+ days) memories |
|
|
||
| /// Initialize logging. Returns a guard that must stay alive for the | ||
| /// file writer to continue flushing. | ||
| pub fn init(verbose: bool) -> Box<dyn std::any::Any + Send> { |
| let log_dir = dirs::home_dir() | ||
| .map(|h| h.join(".uteke")) | ||
| .filter(|d| d.is_dir() || std::fs::create_dir_all(d).is_ok()) | ||
| .unwrap_or_else(|| { |
🔍 Cora AI Code Review❌ Blocked — critical issues found. 🔴 Error (3)
Review powered by cora-cli · BYOK · MIT |
ajianaz
added a commit
that referenced
this pull request
Aug 13, 2026
#298) Extract CLI argument definitions (clap structs/enums) into cli.rs and logging setup into logging.rs. main.rs reduced from 449 to ~100 lines. - cli.rs: Cli struct, Commands enum, TagCommands, NamespaceCommands, AgingCommands, SupportedShell - logging.rs: init() with console + daily rotating file appender - main.rs: entry point only (parse, logging, config, dispatch) - All crate::X imports updated to crate::cli::X in command modules - logging.rs: create log dir if missing, fallback to temp instead of cwd - Added .cora.yaml config (pre-commit hook installed) Also adds .cora/ to .gitignore (local Cora cache directory).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract CLI argument definitions into
cli.rsand logging setup intologging.rs. main.rs reduced from 449 to ~100 lines.Also adds
.cora.yamlconfig with pre-commit hook (Cora v0.5.0).Closes #131