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")]
13 pub endpoint: String,
14 #[arg(long = "token-secret")]
16 pub token: Option<String>,
17}
18
19pub async fn run(args: Args) -> Result<(), Error> {
20 let mut client = Client::connect(&args.endpoint)?;
21 if let Some(t) = args.token.as_deref() {
22 client = client.with_token(t);
23 }
24 let response = client.capabilities().await?;
25 output::emit("capabilities", &response)
26}