@sente-labs/cli
v0.21.0
Published
Sente CLI -- give your AI agents managed email identities: create identities, receive and react to email, manage webhooks, from your terminal and Claude Code.
Maintainers
Readme
@sente-labs/cli
The Sente CLI -- give your AI agents managed email identities (AgentAccount).
Create an email address your agent owns on sente.run, then send,
receive, and react to mail -- verification links, OTPs, replies -- from your
terminal, scripts, or Claude Code.
Install
npm install -g @sente-labs/cliRequires Node.js 18+.
Building an agent that should set this up itself? Point it at the onboarding skill: https://sente.run/skill.md.
Quickstart
# 1. Sign in (opens the browser, stores an API key in ~/.sente/credentials)
sente login
sente whoami
# 2. Give your agent an identity -- a real, reusable email address
sente identity create --name "Support Bot" --local-part support-bot
# -> [email protected]
# 3. Read its mail
sente inbox --identity support-bot # recent messages
sente wait --identity support-bot --timeout 60 # block until the next message
sente listen --identity support-bot # stream messages as they arrive
# Verification emails: --otp / --magic-link block for the verification message
# and print JUST the extracted code / link (pipeable):
CODE=$(sente wait --identity support-bot --otp --timeout 60)
# 4. Send from it
sente send --identity support-bot --to [email protected] \
--subject "Hello" --text "It works."
# Reply in-thread to an inbound message:
sente send --identity support-bot --to [email protected] \
--subject "Re: Hello" --text "Following up." --reply-to <messageId>Use --json on any command for machine-readable output.
Webhooks (push delivery)
Register your HTTPS endpoint and Sente POSTs events — message.received for
each inbound email, and run.blocked when a registration run needs a human
(see below). Verify the X-Sente-Secret header on every delivery.
sente webhook register --url https://my-app.com/hooks/sente --identity support-bot
sente webhook list
sente webhook delete <id>Developing the handler locally? Relay live inbound mail to it with no public
URL -- listen --forward POSTs each message in the exact webhook envelope
(with x-sente-secret taken from SENTE_WEBHOOK_SECRET, if set):
sente listen --identity support-bot --forward http://localhost:3000/hooks/senteOr run a shell command per message (message JSON on stdin):
sente listen --identity support-bot --exec './handle-message.sh'Register & sign in to apps
Have Sente drive a browser to sign your agent up at a third-party app under the identity's email, completing the email verification itself:
sente register https://app.example.com --identity support-bot # → a durable account
sente registrations --identity support-bot # list accounts + latest run
sente relogin <registrationId> # re-authenticate later
sente credentials <registrationId> # print the vaulted loginsente register blocks until the run finishes. Add --confirm-before-submit
to keep a human in the loop for the final submit — the agent fills the whole
form, then the run pauses blocked with a live-view URL for you to click submit
yourself (you accept the app's terms), and sente run resume <runId> continues.
To be notified when any run needs you (confirm-before-submit, CAPTCHA, …) without standing up a webhook server, run the watcher — it desktop-notifies (macOS Notification Center; terminal bell elsewhere) with the live-view URL and resume command:
sente watch # all identities
sente watch --identity <ref> # one identity
sente watch --interval 10 # poll every 10s (default 5)Prefer push? Subscribe a webhook to run.blocked (payload carries the block
code, liveViewUrl, a dashboard actionUrl, and holdExpiresAt):
sente webhook register --url https://my-app.com/hooks/sente --events run.blockedAuth
sente login stores the API key in ~/.sente/credentials (mode 0600). The
key authenticates as your whole organization -- don't paste it into chats or
commit it. To hand it to your app without echoing it:
echo "SENTE_API_TOKEN=$(sente token)" >> .envFor CI or non-interactive use, set env vars instead of logging in:
export SENTE_API_TOKEN=sk_sente_...
export SENTE_GATEWAY_URL=https://api.sente.run # optional overrideCommands
| Command | What it does |
| --- | --- |
| sente login | Browser sign-in; mints and stores an API key |
| sente whoami | Show the logged-in account + organization |
| sente token | Print the stored API key (for piping into .env) |
| sente identity create\|list\|show | Manage email identities |
| sente inbox --identity <ref> | List recent messages |
| sente wait --identity <ref> | Block until the next message (long-poll); --otp / --magic-link print just the code / link |
| sente listen --identity <ref> | Stream messages; --exec / --forward to react |
| sente send --identity <ref> | Send email (--reply-to threads replies) |
| sente webhook register\|list\|delete | Manage push delivery to your endpoint |
| sente register <appUrl> --identity <ref> | Sign up at a third-party app under the identity (--confirm-before-submit keeps a human on the final submit) |
| sente registrations | List accounts and their latest run status |
| sente relogin <registrationId> | Re-authenticate an existing account |
| sente credentials <registrationId> | Print an account's vaulted login |
| sente run show\|resume\|abort <runId> | Inspect and control a register/login run |
| sente watch | Desktop-notify when a run needs you (blocked); --identity, --interval |
<ref> is an identity id, email, or local-part.
Documentation
- Home: https://sente.run
- Agent onboarding skill: https://sente.run/skill.md
- Issues: https://github.com/sente-labs/agentic-browser/issues
License
MIT
