Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agentmail-cli"
version = "1.10.0"
version = "1.10.1"
edition = "2021"
description = "Command-line interface for the AgentMail API. Send, receive, reply, and manage threaded email conversations from your terminal."
license = "MIT"
Expand Down Expand Up @@ -53,7 +53,7 @@
clap = { version = "4", features = ["derive", "string", "env"] }
clap_complete = "4"
clap_mangen = "0.2"
hmac = "0.12"

Check warning on line 56 in Cargo.toml

View workflow job for this annotation

GitHub Actions / test

unused dependency `hmac`

Check warning on line 56 in Cargo.toml

View workflow job for this annotation

GitHub Actions / compile

unused dependency `hmac`

Check warning on line 56 in Cargo.toml

View workflow job for this annotation

GitHub Actions / check

unused dependency `hmac`
dotenvy = "0.15"
futures-util = "0.3"
httpdate = "1"
Expand Down Expand Up @@ -143,8 +143,8 @@
lto = "thin"

[build-dependencies]
serde = "1"

Check warning on line 146 in Cargo.toml

View workflow job for this annotation

GitHub Actions / test

unused build dependency `serde`

Check warning on line 146 in Cargo.toml

View workflow job for this annotation

GitHub Actions / compile

unused build dependency `serde`

Check warning on line 146 in Cargo.toml

View workflow job for this annotation

GitHub Actions / check

unused build dependency `serde`
serde_yaml = "0.9.34"

Check warning on line 147 in Cargo.toml

View workflow job for this annotation

GitHub Actions / test

unused build dependency `serde_yaml`

Check warning on line 147 in Cargo.toml

View workflow job for this annotation

GitHub Actions / compile

unused build dependency `serde_yaml`

Check warning on line 147 in Cargo.toml

View workflow job for this annotation

GitHub Actions / check

unused build dependency `serde_yaml`

[dev-dependencies]
serial_test = "3.4.0"
Expand Down
13 changes: 12 additions & 1 deletion cli/agentmail/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
//! Types are available via `agentmail_sdk::api::*`.

use fern_cli_sdk::app::CliApp;
use fern_cli_sdk::auth::TokenPasteLoginFlow;

/// Where `agentmail auth login` sends people to get an API key.
const API_KEYS_URL: &str = "https://console.agentmail.to/dashboard/api-keys";

/// Register custom commands on the CLI app builder.
///
Expand Down Expand Up @@ -41,5 +45,12 @@ pub fn register(app: CliApp) -> CliApp {
// Ok(())
// }),
// );
app

// AgentMail authenticates with API keys; there is no OAuth flow to run.
// Without a declared flow, bare `agentmail auth login` fails with
// "No login flow declared for scheme `BearerAuth`". A paste flow makes it
// prompt for a key and say where to get one. It adds no request-time
// provider, so main.rs's BearerAuth binding (AGENTMAIL_API_KEY, then the
// keyring) is untouched.
app.login_flow(TokenPasteLoginFlow::new("BearerAuth").token_paste_url(API_KEYS_URL))
}
Loading