use std::path::PathBuf;
use clap::{Parser, Subcommand};
use crate::logs::LogsArgs;
use crate::output::OutputMode;
#[derive(Debug, Parser)]
#[command(
name = "ddog",
version,
about = "Datadog CLI for humans and agents",
long_about = "Query Datadog logs (and more, later) from the terminal.\n\nGlobal auth is resolved from CLI flags > environment > profile > defaults."
)]
pub struct Cli {
#[arg(long, env = "DD_API_KEY", global = true, hide_env_values = true)]
pub api_key: Option<String>,
#[arg(long, env = "DD_APP_KEY", global = true, hide_env_values = true)]
pub app_key: Option<String>,
#[arg(long, env = "DD_SITE", global = true)]
pub site: Option<String>,
#[arg(long, env = "DD_PROFILE", global = true)]
pub profile: Option<String>,
#[arg(long, env = "DD_CONFIG", global = true)]
pub config: Option<PathBuf>,
#[arg(short, long, env = "DD_OUTPUT", global = true)]
pub output: Option<String>,
#[arg(short, long, action = clap::ArgAction::Count, global = true)]
pub verbose: u8,
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub enum Command {
Logs(LogsArgs),
}
pub struct Ctx {
pub client: dd_api::Client,
pub output: OutputMode,
}