1pub mod init;
7pub mod output;
8
9use clap::{Parser, Subcommand};
10use std::path::PathBuf;
11
12#[derive(Parser, Debug)]
17#[command(
18 name = "ares-server",
19 author = "Dirmacs <build@dirmacs.com>",
20 version,
21 about = "A.R.E.S - Agentic Retrieval Enhanced Server",
22 long_about = "A production-grade agentic chatbot server with multi-provider LLM support,\n\
23 tool calling, RAG (Retrieval Augmented Generation), and MCP integration.\n\n\
24 Run without arguments to start the server, or use 'init' to scaffold a new project.",
25 after_help = "EXAMPLES:\n \
26 ares-server init # Scaffold a new A.R.E.S project\n \
27 ares-server init --minimal # Scaffold with minimal configuration\n \
28 ares-server # Start the server (requires ares.toml)\n \
29 ares-server --config my.toml # Use a custom config file"
30)]
31pub struct Cli {
32 #[arg(short, long, default_value = "ares.toml", global = true)]
34 pub config: PathBuf,
35
36 #[arg(short, long, global = true)]
38 pub verbose: bool,
39
40 #[arg(long, global = true)]
42 pub no_color: bool,
43
44 #[command(subcommand)]
46 pub command: Option<Commands>,
47}
48
49#[derive(Subcommand, Debug)]
51pub enum Commands {
52 Init {
57 #[arg(default_value = ".")]
59 path: PathBuf,
60
61 #[arg(short, long)]
63 force: bool,
64
65 #[arg(short, long)]
67 minimal: bool,
68
69 #[arg(long)]
71 no_examples: bool,
72
73 #[arg(long, default_value = "ollama")]
75 provider: String,
76
77 #[arg(long, default_value = "127.0.0.1")]
79 host: String,
80
81 #[arg(long, default_value = "3000")]
83 port: u16,
84 },
85
86 Config {
88 #[arg(short = 'f', long)]
90 full: bool,
91
92 #[arg(long)]
94 validate: bool,
95 },
96
97 #[command(subcommand)]
99 Agent(AgentCommands),
100}
101
102#[derive(Subcommand, Debug)]
104pub enum AgentCommands {
105 List,
107
108 Show {
110 name: String,
112 },
113}
114
115impl Cli {
116 pub fn parse_args() -> Self {
118 Self::parse()
119 }
120}