Something went wrong. Try again.
An IMAP+SMTP gateway for less urgent communications with LLMs
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546//! CLI: subcommand + path to the config file.
use std::path::PathBuf;
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]#[command( name = "posthorn", version, about = "Email pen-pal daemon for slow LLMs")]pub struct Args { /// Path to the TOML config file. #[arg( short, long, global = true, default_value = "config.toml", env = "POSTHORN_CONFIG" )] pub config: PathBuf,
#[command(subcommand)] pub command: Option<Command>,}
#[derive(Debug, Subcommand)]pub enum Command { /// Run the SMTP + IMAP servers and dispatch LLM jobs to child processes. Serve, /// Process a single LLM job by id and exit. Intended to be spawned by the /// `serve` dispatcher, one child per job. Worker { /// The llm_jobs.id to process. #[arg(long)] job_id: i32, },}
impl Default for Command { fn default() -> Self { Command::Serve }}