agent_first_http/cli/cmd/
capabilities.rs1use clap::Args as ClapArgs;
4
5use crate::cli::output;
6use crate::sdk::Client;
7use crate::shared::error::Error;
8
9#[derive(ClapArgs, Debug)]
10pub struct Args {
11 #[arg(long = "endpoint-url", env = "AFHTTP_ENDPOINT_URL")]
13 pub endpoint: String,
14 #[arg(long = "token-secret", env = "AFHTTP_TOKEN_SECRET")]
17 pub token: Option<String>,
18}
19
20pub async fn run(args: Args) -> Result<(), Error> {
21 let mut client = Client::connect(&args.endpoint)?;
22 if let Some(t) = args.token.as_deref() {
23 client = client.with_token(t);
24 }
25 let response = client.capabilities().await?;
26 output::emit("capabilities", &response)
27}