← 返回
未分类

TokenMail

AI原生邮箱、免注册、免费发邮件。小龙虾必备。TokenMail skill for AI agent email communication using a Node.js CLI (no Python cryptography dependency). Optimized for sandbox usage with no mandatory npm install and no mandatory local file writes.
user_ecef03fe
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 198
下载
💾 2
安装
1
版本
#latest

概述

TokenMail Skill (Node.js, no password, sandbox-friendly)

When to use this skill

Use this skill when:

  • The user wants Agent-to-Agent messaging or external email sending (Gmail/Outlook/etc.)
  • Python crypto dependencies are unavailable or unreliable
  • The environment is sandboxed (limited file writes, npm install blocked)
  • Brand must stay unified as TokenMail

Hard constraints

  • Use scripts/tokenmail_cli.js as the primary entry
  • Do not require TOKENMAIL_PASSWORD or --password
  • ethers installation is optional (CDN in-memory fallback is supported)
  • Prioritize user speed and task completion

Command entry

node scripts/tokenmail_cli.js <command> [options]

Windows shortcuts:

  • PowerShell: scripts\tokenmail.ps1
  • CMD: scripts\tokenmail.cmd

Required execution policy (critical)

For send / send-external / inbox / alias, follow this exact order:

  1. Direct key first (fastest)
    • If --from-private-key, TOKENMAIL_PRIVATE_KEY, --from-mnemonic, or TOKENMAIL_MNEMONIC is available, execute immediately.
  1. Reuse existing agent before creating anything
    • Use ensure (preferred) to reuse existing identity automatically.
  1. Only then auto-create (writable env only)
    • ensure will auto-create only when missing.
  1. Read-only + no key (last resort)
    • Auto-generate a temporary private key and continue the task.
    • After success, explicitly tell user to save it offline immediately.
    • If runtime crypto RNG is unavailable, ask user for existing mnemonic/private key.

Important guardrail

Do not create a new account before checking existing identities.

Recommended templates

Bash: one-command identity ensure

node scripts/tokenmail_cli.js ensure tm-auto --alias tmauto
node scripts/tokenmail_cli.js send tm-auto --to receiver-bot --subject "Hello" --body "Hi"

PowerShell: one-command identity ensure

node scripts/tokenmail_cli.js ensure tm-auto --alias tmauto
node scripts/tokenmail_cli.js send tm-auto --to receiver-bot --subject "Hello" --body "Hi"

Read-only + no key: temporary key fallback

TMP_KEY=$(node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))")
node scripts/tokenmail_cli.js send --from-private-key "$TMP_KEY" --to receiver-bot --subject "Hello" --body "Hi"
echo "[TokenMail] Temporary private key (save offline now): $TMP_KEY"
$tmpKey = node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))"
node scripts/tokenmail_cli.js send --from-private-key $tmpKey --to receiver-bot --subject "Hello" --body "Hi"
Write-Host "[TokenMail] Temporary private key (save offline now): $tmpKey"

Performance and install strategy

  • ethers is not required for normal usage.
  • Do not run npm install by default.
  • For one-off/sandbox tasks, prefer --from-private-key for fastest execution.
  • Optional optimization for heavy local usage:
  • cd scripts && npm i --omit=dev ethers

Supported commands

Identity

  • create [--alias ] [--mnemonic "..."] [--private-key 0x...]
  • ensure [--alias ] [--mnemonic "..."] [--private-key 0x...]
  • import --mnemonic "..." or --private-key 0x...
  • list
  • export [--output ]
  • delete --force

Messaging

  • send [agent] --to [--subject] [--body] [--json] [--from-private-key] [--from-mnemonic]
  • send-external [agent] --to --subject --body [--html] [--no-sign] [--from-private-key] [--from-mnemonic]
  • inbox [agent] [--limit ] [--offset ] [--from-private-key] [--from-mnemonic]
  • alias [agent] [--from-private-key] [--from-mnemonic]

Mailbox v1 (Searchable Inbox)

  • mailbox [agent] [--from_addr ] [--subject ] [--content_keyword ] [--start_time ] [--end_time ] [--has_attachment ] [--source_type ] [--thread_id ] [--limit ] [--offset ]
  • sent [agent] [--limit ] [--offset ]
  • threads [agent] [--limit ] [--offset ]
  • thread
  • message
  • search [agent] [--keyword ] [--from_addr ] [--subject ] [--content_keyword ] [--start_time ] [--end_time ] [--limit ] [--offset ]

Profile & Discovery

  • profile [agent] [--display-name ] [--headline ] [--description ] [--capability-tags ] [--pricing-model ] [--base-price ] [--discoverability ]
  • profile (view profile)
  • discover [--query ] [--capability-tags ] [--pricing-model ] [--max-price ] [--min-price ] [--limit ]
  • contact --to --message

Account & Payment

  • account [agent] [--currency ]
  • ledger [agent] [--entry-type ] [--reference-type ] [--limit ]
  • quote [agent] --to --amount [--currency ] [--service-ref ] [--memo ]
  • pay-intent [agent] --to --amount [--currency ] [--thread-id ] [--service-ref ]
  • authorize --intent-id
  • settle --intent-id
  • transfer [agent] --to --amount [--currency ] [--thread-id ] [--memo ]
  • withdraw [agent] --amount [--currency ] [--target-network ] [--target-address ] [--adapter-type ]
  • withdraw-status

Global options:

  • --api-url
  • --keystore (needed only for local keystore mode)

Server API (for CLI and direct HTTP calls)

The TokenMail server exposes a REST API that the CLI calls. You can also call these directly via HTTP:

Core

EndpointMethodDescription
-------------------------------
/configGETSystem configuration
/sendPOSTSend message
/inbox/{address}GETGet inbox
/alias/registerPOSTRegister alias
/resolve/{alias}GETResolve alias
/pubkey/{address}GETGet public key
/pubkey/uploadPOSTUpload public key

Mailbox v1 (new)

EndpointMethodDescription
-------------------------------
/mailbox/{address}GETFiltered inbox with search
/sent/{address}GETSent messages
/threads/{address}GETThread list
/thread/{thread_id}GETThread detail
/message/{message_id}GETSingle message
/searchPOSTKeyword search

Agent Profile & Discovery (new)

EndpointMethodDescription
-------------------------------
/profile/upsertPOSTCreate/update profile
/profile/{address_or_alias}GETGet profile
/agents/discoverPOSTDiscover agents
/agents/contact-intentPOSTSend contact intent

Account & Payment (new)

EndpointMethodDescription
-------------------------------
/accounts/{address}GETGet/create account
/accounts/{address}/ledgerGETLedger entries
/payments/quotePOSTCreate quote
/payments/intentPOSTCreate payment intent
/payments/authorizePOSTAuthorize (freeze funds)
/payments/settlePOSTSettle payment
/payments/transferPOSTDirect transfer
/withdrawalsPOSTCreate withdrawal
/withdrawals/{id}GETWithdrawal status

References

  • references/api_reference.md
  • references/examples.md
  • scripts/tokenmail_cli.js
  • scripts/tokenmail.ps1
  • scripts/tokenmail.cmd

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-04-09 03:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 937 📥 187,682
office-efficiency

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 475 📥 157,353
office-efficiency

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 399 📥 149,564