This commit is contained in:
2025-06-06 02:14:35 +09:00
parent 02dd69840d
commit a9dca2fe38
33 changed files with 2141 additions and 9 deletions

View File

@ -7,6 +7,9 @@ mod generator;
mod markdown;
mod template;
mod config;
mod ai;
mod atproto;
mod mcp;
#[derive(Parser)]
#[command(name = "ailog")]
@ -47,6 +50,15 @@ enum Commands {
},
/// Clean build artifacts
Clean,
/// Start MCP server for ai.gpt integration
Mcp {
/// Port to serve MCP on
#[arg(short, long, default_value = "8002")]
port: u16,
/// Path to the blog directory
#[arg(default_value = ".")]
path: PathBuf,
},
}
#[tokio::main]
@ -69,6 +81,11 @@ async fn main() -> Result<()> {
Commands::Clean => {
commands::clean::execute().await?;
}
Commands::Mcp { port, path } => {
use crate::mcp::McpServer;
let server = McpServer::new(path);
server.serve(port).await?;
}
}
Ok(())