pub struct Cli {Show 19 fields
pub config: Option<String>,
pub agent_card: Option<String>,
pub endpoint: Option<String>,
pub base_url: String,
pub transport: Vec<Binding>,
pub a2a_version: Option<String>,
pub bearer: Option<String>,
pub api_key: Option<String>,
pub svc_params: Vec<HeaderArg>,
pub insecure: bool,
pub debug: bool,
pub tenant: Option<String>,
pub output: OutputFormat,
pub compact: bool,
pub async_mode: bool,
pub wait: bool,
pub poll_interval: Duration,
pub timeout: Duration,
pub command: Command,
}Fields§
§config: Option<String>Load configuration from an explicit .env file in place of the local .env (found by walking up from the working directory). Real environment variables still take precedence over it (§6.5).
agent_card: Option<String>The agent to talk to, as an Agent Card reference (§7.2): a bare host
or origin (the well-known path is appended), a full card URL (used
as-is), or a local file path (file://… or a plain path).
endpoint: Option<String>Connect straight to an agent interface URL, skipping Agent Card resolution (§7.2). MUST be used with exactly one –transport, since there is no card to name the binding. Mutually exclusive with –agent-card.
base_url: StringDeprecated alias for the bare-origin form of –agent-card, kept so
pre-#178 invocations keep working. Hidden: --agent-card is the
flag the specification defines.
transport: Vec<Binding>Client transport preference, repeatable and ordered (highest first):
e.g. --transport jsonrpc --transport rest. Overrides the agent
card’s own preference order; a binding the card doesn’t offer is
skipped.
a2a_version: Option<String>Bearer token attached to the agent-card fetch and client calls. Protocol version to signal to the server on every request (§13.2). Absent this flag the version is negotiated down to the highest one both a2acli and the agent’s selected interface declare. Must be 1.x: A2A reads an empty or pre-1.0 value as 0.3.
bearer: Option<String>§api_key: Option<String>API key attached to the agent-card fetch and client calls (as an
X-API-Key header — a2acli does not yet read the agent card’s
declared security scheme to place it elsewhere per A2A §4.5.2).
svc_params: Vec<HeaderArg>Add an A2A service parameter (a transport-level key-value pair, e.g.
a header or gRPC metadata) — general-purpose, not authentication-
specific. Distinct from --metadata, which travels in the request
payload.
insecure: boolDisable TLS certificate verification for the negotiated transport. Development only — always prints a warning, and never disables verification silently.
debug: boolVerbose diagnostics to stderr: the outcome of each call plus the raw protocol messages exchanged on the wire — request and response bodies, and each streamed event (§7.2). Never includes credential material (bearer token, API key, or any –svc-param value): header names stay visible so their attachment can be confirmed, but values are replaced, and that redaction cannot be defeated by this or any other verbosity flag.
tenant: Option<String>Optional tenant forwarded to A2A requests that support it. Overrides the routing tenant the selected Agent Card interface may itself declare (A2A §8.3.2); omit this to use the interface’s own value, if it has one.
output: OutputFormatOutput format: human-readable text (default) or the protocol’s own
json types. Cardinality (one document vs. JSONL) follows --stream,
not this flag (§11.3).
compact: boolWith -o json (and no --stream), emit compact JSON instead of
pretty-printed JSON. Has no effect on -o text or on --stream
JSONL, which is always one compact object per line regardless of
this flag (§11.3).
async_mode: boolDo not wait: return the task identifiers immediately instead of blocking until the task reaches a terminal or interrupted state (the default).
Note: the spec lists --return-immediately as an OPTIONAL alias for
this flag, but that name is already this CLI’s flag for the distinct
protocol-level SendMessageConfiguration.return_immediately (a
request to the agent to return early on queued work, not a
client-side “don’t poll” instruction) — so it is deliberately not
reused here to avoid conflating the two.
wait: boolExplicitly block until the task reaches a terminal or interrupted state.
This is already the default for send; on task get it turns the
one-shot read into a poll loop.
poll_interval: DurationDelay between polls while waiting for a task to settle (e.g. “2s”, “500ms”).
timeout: DurationOverall time budget for a blocking wait before reporting a timeout (e.g. “30s”, “2m”).
command: CommandTrait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
impl Eq for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
impl StructuralPartialEq for Cli
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnsafeUnpin for Cli
impl UnwindSafe for Cli
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request