@tencent-qqmail/agently-cli
v1.0.14
Published
Agent-first mail CLI for Agently
Readme
agently-cli
Agent-first mail CLI for Agently.
Install
npm install -g @tencent-qqmail/agently-cliAuthenticate
Log in with OAuth:
agently-cli auth login
agently-cli auth statusWorkspaces
Workspace isolation is enabled by default. When the CLI detects an AI agent,
that agent can use its own mailbox identity and credentials under
~/.agently-cli/agents/<agent>/. Existing credentials in the shared default
workspace remain usable: read commands fall back to default until the detected
agent runs agently-cli auth login, which creates its dedicated workspace.
Use AGENTLY_WORKSPACE=<name> to pin a command to a specific workspace. A name
that does not exist stays pinned and is treated as not logged in; auth login
creates it. AGENTLY_WORKSPACE=default explicitly selects the shared identity.
AGENTLY_CLI_CONFIG_DIR has higher priority and always uses the unpartitioned
default layout. AGENTLY_ACCESS_TOKEN is workspace-independent and has the
highest authentication priority.
Commands
# Current user
agently-cli +me
# List messages
agently-cli message +list --limit 10
# Read a message
agently-cli message +read --id msg_xxx
# Search messages
agently-cli message +search --q "report"
# Send a message
agently-cli message +send --to [email protected] --to [email protected] --subject "Hi" --body "Hello"
# Send a complex HTML body from a UTF-8 file under the current directory
agently-cli message +send --to [email protected] --subject "Hi" --body-file ./body.html
# Reply to a message
agently-cli message +reply --id msg_xxx --cc [email protected] --cc [email protected] --body "Thanks"
# Forward a message
agently-cli message +forward --id msg_xxx --to [email protected] --to [email protected] --body "FYI"
# Move a message to trash
agently-cli message +trash --id msg_xxx
# Upload an attachment
agently-cli attachment +upload --file ./report.pdf
# Download an attachment
agently-cli attachment +download --msg msg_xxx --att att_xxx --output ./downloadsSend, reply, forward, and trash use two-step confirmation. First run returns
data.confirmation_token; rerun the same command with
--confirmation-token <token> to complete the operation.
Recipient flags are repeatable: use --to multiple times for multiple
recipients, and use repeated --cc / --bcc for copy and blind-copy recipients.
