/install agnic-authenticate-wallet
Authenticating the Agnic Wallet
Check Current Status
npx agnic@latest status --json
If already authenticated, no further action needed. If not, choose the appropriate mode below.
Mode 1: Headless / Token Auth (CI, servers, agents)
Preferred when no browser is available. Generate an API token at app.agnic.ai > Settings > API Tokens.
Option A -- Environment variable (recommended for automation):
export AGNIC_TOKEN=\x3Cyour-api-token>
npx agnic@latest status --json
The CLI reads AGNIC_TOKEN automatically. All subsequent commands in the same shell session use it without extra flags.
Option B -- Inline flag (one-off commands):
npx agnic@latest --token \x3Cyour-api-token> status --json
Mode 2: Browser OAuth (interactive terminals)
Use when a browser is available:
npx agnic@latest auth login
This command:
- Starts a temporary local server on a random port
- Opens the default browser to the Agnic OAuth consent screen
- The user signs in (email, Google, or wallet) and approves spending limits
- The browser redirects back to
http://localhost:\x3Cport>/callback - The CLI exchanges the authorization code for tokens and saves them locally
Wait for the CLI to print Authenticated! before proceeding.
Verify Authentication
npx agnic@latest status --json
Expected output:
{
"authenticated": true,
"userId": "did:privy:...",
"email": "[email protected]",
"walletAddress": "0x...",
"tokenExpiry": "2026-05-22T14:30:00Z"
}
Logout
To remove stored credentials:
npx agnic@latest auth logout
Token Storage
- Browser mode: credentials stored in
~/.agnic/config.jsonwith0600permissions. Tokens auto-refresh on 401 responses. Refresh token expires after 90 days. - Token mode: no local storage. The token is read from
AGNIC_TOKENenv var or--tokenflag per invocation.
Error Handling
- "Not authenticated" -- Set
AGNIC_TOKENenv var, pass--token, or runauth login - "Authentication failed" -- User cancelled the browser flow or the 5-min timeout expired
- "Could not open browser" -- The CLI prints a URL to copy and open manually
- "Token expired" -- Browser tokens auto-refresh; API tokens must be regenerated at app.agnic.ai
- "Invalid token" -- Check the token value; it may have been revoked or malformed
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agnic-authenticate-wallet - 安装完成后,直接呼叫该 Skill 的名称或使用
/agnic-authenticate-wallet触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Agnic Authenticate Wallet (x402) 是什么?
Authenticate Agnic wallet via browser OAuth or headless API token. Use when the user wants to sign in, log in, authenticate, connect wallet, set up CLI, or r... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 234 次。
如何安装 Agnic Authenticate Wallet (x402)?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agnic-authenticate-wallet」即可一键安装,无需额外配置。
Agnic Authenticate Wallet (x402) 是免费的吗?
是的,Agnic Authenticate Wallet (x402) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Agnic Authenticate Wallet (x402) 支持哪些平台?
Agnic Authenticate Wallet (x402) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agnic Authenticate Wallet (x402)?
由 Agnic.AI(@agnicpay-prog)开发并维护,当前版本 v2.0.2。