Skip to content

Commit c6ee99c

Browse files
committed
feat: add standalone a2acli CLI
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
1 parent b917b76 commit c6ee99c

File tree

11 files changed

+3050
-37
lines changed

11 files changed

+3050
-37
lines changed

Cargo.lock

Lines changed: 93 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ members = [
66
"a2a-pb",
77
"a2a-grpc",
88
"a2a-slimrpc",
9+
"a2acli",
910
"examples/helloworld",
1011
]
1112
resolver = "2"

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The workspace supports:
2929
| `a2a-pb` | Protobuf schema, generated types, ProtoJSON-capable generated types, and native <-> protobuf conversion helpers |
3030
| `a2a-grpc` | gRPC client and server bindings built on `tonic` |
3131
| `a2a-slimrpc` | SLIMRPC client and server bindings built on `slim_bindings` |
32+
| `a2acli` | Standalone A2A client CLI, published as `agntcy-a2acli`, for inspecting agent cards, sending messages, managing tasks, and handling push configs |
3233
| `examples/helloworld` | Minimal runnable example agent |
3334

3435
## Supported Bindings
@@ -101,6 +102,30 @@ When the example starts, the following endpoints are available:
101102
The example does not start a gRPC server, but the `a2a-grpc` crate provides the
102103
client and server bindings needed to add one.
103104

105+
## Running The A2A CLI
106+
107+
The workspace includes a standalone CLI client built on `a2a-client`. It
108+
resolves the public agent card from a base URL, negotiates JSON-RPC or
109+
HTTP+JSON, prints responses as JSON, and manages task push notification
110+
configs.
111+
112+
```sh
113+
cargo run --bin a2acli -- card
114+
cargo run --bin a2acli -- send "hello from rust"
115+
cargo run --bin a2acli -- stream "hello from rust"
116+
cargo run --bin a2acli -- list-tasks
117+
cargo run --bin a2acli -- push-config list task-123
118+
```
119+
120+
By default the CLI targets `http://localhost:3000`, which matches the bundled
121+
hello world server. Override the target with `--base-url https://host` for any
122+
compatible A2A server, use `--binding jsonrpc` or `--binding http-json` to pin
123+
transport selection, and pass `--bearer-token` or repeated `--header Name:Value`
124+
arguments when the server requires authentication.
125+
126+
Install from the workspace with `cargo install --path a2acli`, or from crates.io
127+
after release with `cargo install agntcy-a2acli`.
128+
104129
## Depending On The Workspace
105130

106131
Until the crates are published, depend on them directly from Git:
@@ -132,6 +157,7 @@ Typical usage is:
132157
- `a2a-pb/`: protobuf schema and conversion layer
133158
- `a2a-grpc/`: tonic-based bindings
134159
- `a2a-slimrpc/`: SLIMRPC bindings
160+
- `a2acli/`: standalone A2A client CLI and published binary package
135161
- `examples/helloworld/`: runnable sample agent
136162

137163
## Contributing

0 commit comments

Comments
 (0)