- Added version number to about text: 'Simple memory storage for Claude with MCP (v0.2.0)' - Added version to long_about as well - Now --help shows version clearly Users can verify version from both: aigpt --version aigpt --help
51 lines
1.2 KiB
Rust
51 lines
1.2 KiB
Rust
use anyhow::Result;
|
|
use clap::{Parser, Subcommand};
|
|
use std::path::PathBuf;
|
|
|
|
pub mod memory;
|
|
pub mod mcp;
|
|
|
|
use memory::MemoryManager;
|
|
use mcp::BaseMCPServer;
|
|
|
|
#[derive(Parser)]
|
|
#[command(name = "aigpt")]
|
|
#[command(version)]
|
|
#[command(about = "Simple memory storage for Claude with MCP (v0.2.0)")]
|
|
#[command(long_about = "AI memory system with psychological priority scoring and game-style results!\nVersion: 0.2.0")]
|
|
struct Cli {
|
|
#[command(subcommand)]
|
|
command: Commands,
|
|
}
|
|
|
|
#[derive(Subcommand)]
|
|
enum Commands {
|
|
/// Start MCP server
|
|
Server,
|
|
/// Start MCP server (alias for server)
|
|
Serve,
|
|
/// Import ChatGPT conversations
|
|
Import {
|
|
/// Path to conversations.json file
|
|
file: PathBuf,
|
|
},
|
|
}
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<()> {
|
|
let cli = Cli::parse();
|
|
|
|
match cli.command {
|
|
Commands::Server | Commands::Serve => {
|
|
let mut server = BaseMCPServer::new().await?;
|
|
server.run().await?;
|
|
}
|
|
Commands::Import { file } => {
|
|
let mut memory_manager = MemoryManager::new().await?;
|
|
memory_manager.import_chatgpt_conversations(&file).await?;
|
|
println!("Import completed successfully");
|
|
}
|
|
}
|
|
|
|
Ok(())
|
|
} |