pub mod init;
pub mod output;
use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(
name = "ares-server",
author = "Dirmacs <build@dirmacs.com>",
version,
about = "A.R.E.S - Agentic Retrieval Enhanced Server",
long_about = "A production-grade agentic chatbot server with multi-provider LLM support,\n\
tool calling, RAG (Retrieval Augmented Generation), and MCP integration.\n\n\
Run without arguments to start the server, or use 'init' to scaffold a new project.",
after_help = "EXAMPLES:\n \
ares-server init # Scaffold a new A.R.E.S project\n \
ares-server init --minimal # Scaffold with minimal configuration\n \
ares-server # Start the server (requires ares.toml)\n \
ares-server --config my.toml # Use a custom config file"
)]
pub struct Cli {
#[arg(short, long, default_value = "ares.toml", global = true)]
pub config: PathBuf,
#[arg(short, long, global = true)]
pub verbose: bool,
#[arg(long, global = true)]
pub no_color: bool,
#[arg(long, global = true)]
pub mcp: bool,
#[command(subcommand)]
pub command: Option<Commands>,
}
#[derive(Subcommand, Debug)]
pub enum Commands {
Init {
#[arg(default_value = ".")]
path: PathBuf,
#[arg(short, long)]
force: bool,
#[arg(short, long)]
minimal: bool,
#[arg(long)]
no_examples: bool,
#[arg(long, default_value = "ollama")]
provider: String,
#[arg(long, default_value = "127.0.0.1")]
host: String,
#[arg(long, default_value = "3000")]
port: u16,
},
Config {
#[arg(short = 'f', long)]
full: bool,
#[arg(long)]
validate: bool,
},
#[command(subcommand)]
Agent(AgentCommands),
}
#[derive(Subcommand, Debug)]
pub enum AgentCommands {
List,
Show {
name: String,
},
}
impl Cli {
pub fn parse_args() -> Self {
Self::parse()
}
}