agent-auth-cli
द्वारा better-auth
एजेंट ऑथ सीएलआई (auth-agent) का उपयोग प्रदाताओं को खोजने, एजेंटों को कनेक्ट करने, क्षमताओं को प्रबंधित करने और संचालन निष्पादित करने के लिए करें। जब उपयोगकर्ता इंटरैक्ट करना चाहता है तब उपयोग करें…
npx skills add https://github.com/better-auth/agent-auth --skill agent-auth-cliAgent Auth CLI
You have access to the auth-agent CLI for interacting with Agent Auth providers. Always prefer using the CLI for any agent authentication operations rather than making raw HTTP requests or writing custom code.
Binary
The CLI binary is auth-agent (package: @auth/agent-cli). If not installed globally, run via npx @auth/agent-cli.
Workflow
Follow this order when working with a provider:
1. Discover or find a provider
# If you have the provider URL
auth-agent discover https://api.example.com
# If you need to search by intent
auth-agent search "deploy web apps"
# List already-known providers
auth-agent providers
discoverfetches the/.well-known/agent-configurationdocument and caches the provider.searchqueries the directory and returns matching providers.- Always discover or search first before connecting.
2. Explore capabilities
# List all capabilities for a provider
auth-agent capabilities --provider https://api.example.com
# Filter by query
auth-agent capabilities --provider https://api.example.com --query "transfer"
# Get full definition with input schema
auth-agent describe transfer_money --provider https://api.example.com
- Always run
describebefore executing a capability to understand the required input schema and constraints. - If connected, pass
--agent-id <id>to see which capabilities are granted.
3. Connect an agent
# Basic connection with specific capabilities
auth-agent connect --provider https://api.example.com \
--capabilities read_data transfer_money \
--name my-agent
# With constraints on capability arguments
auth-agent connect --provider https://api.example.com \
--capabilities read_data transfer_money \
--constraints '{"transfer_money":{"amount":{"max":1000}}}' \
--name constrained-agent
# Autonomous mode (no user association)
auth-agent connect --provider https://api.example.com \
--capabilities read_data \
--mode autonomous
# With CIBA approval (backchannel, sends notification to user)
auth-agent connect --provider https://api.example.com \
--capabilities read_data \
--preferred-method ciba \
--login-hint [email protected]
- Save the returned
agent_id— you need it for all subsequent operations. - If approval is required, the CLI opens the browser or prints the approval URL. Pass
--no-browserto suppress browser opening. - Use
--force-newto create a new connection even if one exists.
4. Check status
auth-agent status <agent-id>
- Shows agent status (
pending_approval,active,expired,revoked), granted capabilities, and constraints. - Run this after connecting to confirm the agent was approved.
5. Execute capabilities
auth-agent execute <agent-id> transfer_money \
--args '{"amount": 50, "to": "alice"}'
- The
--argsflag takes a JSON string matching the capability's input schema. - Always
describethe capability first to know the required arguments.
6. Request additional capabilities
auth-agent request <agent-id> \
--capabilities admin_panel \
--constraints '{"admin_panel":{"scope":{"in":["read","write"]}}}' \
--reason "Need admin access for deployment"
7. Lifecycle management
# Disconnect (revoke) an agent
auth-agent disconnect <agent-id>
# Reactivate an expired agent
auth-agent reactivate <agent-id>
# View stored connection details
auth-agent connection <agent-id>
# List all connections for a provider
auth-agent connections <issuer-url>
8. Key rotation
# Rotate an agent's keypair
auth-agent rotate-agent-key <agent-id>
# Rotate the host keypair for a provider
auth-agent rotate-host-key <issuer-url>
9. Host enrollment
auth-agent enroll-host --provider https://api.example.com --token <enrollment-token> --name "My Device"
10. Sign JWTs manually
# Sign an agent JWT (for use with external HTTP calls)
auth-agent sign <agent-id>
# Scope to specific capabilities
auth-agent sign <agent-id> --capabilities transfer_money read_data
Global Flags
| Flag | Env var | Description |
|---|---|---|
--storage-dir <path> | AGENT_AUTH_STORAGE_DIR | Storage directory (default: ~/.agent-auth) |
--directory-url <url> | AGENT_AUTH_DIRECTORY_URL | Directory URL for provider search |
--host-name <name> | AGENT_AUTH_HOST_NAME | Host name for identification |
--no-browser | AGENT_AUTH_NO_BROWSER=1 | Suppress browser opening for approval URLs |
--url <urls...> | AGENT_AUTH_URLS | Provider URLs to auto-discover at startup |
Important Rules
- Never make raw HTTP requests to Agent Auth endpoints. Always use the CLI.
- Always discover before connecting. The CLI needs the provider's configuration cached locally.
- Always describe before executing. Check the input schema so you pass correct arguments.
- Check status after connecting. The agent may require user approval before it becomes active.
- Store agent IDs. You need them for execute, status, request, disconnect, and all other operations.
- Use constraints when connecting to limit what the agent can do — this is a security best practice.
- Set
AGENT_AUTH_ENCRYPTION_KEYin production to encrypt private keys stored in~/.agent-auth/.
Storage
Connections, keys, and provider configs are stored in ~/.agent-auth/ by default:
host.json— host identity and keypairagents/<agent-id>.json— agent connectionsproviders/<encoded-issuer>.json— cached provider configurations
better-auth की और Skills
agent-auth-mcp
better-auth
एजेंट ऑथ एमसीपी टूल का उपयोग प्रदाताओं की खोज करने, एजेंटों को कनेक्ट करने, क्षमताओं का प्रबंधन करने और एमसीपी प्रोटोकॉल के माध्यम से संचालन निष्पादित करने के लिए करें। इसका उपयोग तब करें जब...
official
better-icons
better-auth
200+ आइकन लाइब्रेरी से CLI और MCP सर्वर एकीकरण के साथ SVG खोजें और प्राप्त करें। प्रमुख संग्रहों (Lucide, Material Design Icons, Heroicons, Tabler, और 200+ अधिक) में प्रीफिक्स और परिणाम सीमा द्वारा फ़िल्टरिंग के साथ खोज का समर्थन करता है। आइकन खोजने, बैचों को SVG फ़ाइलों के रूप में डाउनलोड करने, और रंग और आकार अनुकूलन के साथ व्यक्तिगत आइकन प्राप्त करने के लिए CLI कमांड। AI एजेंटों के लिए MCP सर्वर टूल्स जिसमें स्मार्ट सिफारिशें, समान
official
better-auth-best-practices
better-auth
बेटर ऑथ सर्वर और क्लाइंट सेटअप डेटाबेस एडेप्टर, सत्र प्रबंधन, प्लगइन्स और सुरक्षा कॉन्फ़िगरेशन के साथ पूरा करें। इंस्टॉलेशन से लेकर डेटाबेस माइग्रेशन, एनवायरनमेंट वेरिएबल सेटअप और कई फ्रेमवर्क में रूट हैंडलर निर्माण तक पूरे वर्कफ़्लो को कवर करता है। कई डेटाबेस एडेप्टर (प्रिज्मा, ड्रिज़ल, मोंगोडीबी, डायरेक्ट कनेक्शन) को मॉडल ब
official
create-auth-skill
better-auth
TypeScript/JavaScript ऐप्स में Better Auth फ्रेमवर्क डिटेक्शन, डेटाबेस एडॉप्टर सेटअप और OAuth इंटीग्रेशन के साथ प्रमाणीकरण को स्कैफोल्ड और कार्यान्वित करें। प्रोजेक्ट स्कैनिंग के माध्यम से फ्रेमवर्क (Next.js, SvelteKit, Nuxt, Astro, Express, Hono), डेटाबेस (Prisma, Drizzle, MongoDB, raw drivers) और मौजूदा ऑथ लाइब्रेरी का पता लगाता है। कॉन्फ़िगरेबल ईमेल सत्यापन के साथ ईमेल/पासवर्ड, OAuth (Google, GitHub, Apple, Microsoft, Discord, Twitter
official
Email & Password Best Practices
better-auth
ईमेल और पासवर्ड सर्वोत्तम अभ्यास — AI एजेंटों के लिए एक इंस्टॉल करने योग्य कौशल, जो better-auth/skills द्वारा प्रकाशित है।
official
email-and-password-best-practices
better-auth
ईमेल सत्यापन, पासवर्ड रीसेट प्रवाह, और बेटर ऑथ के लिए अनुकूलन योग्य पासवर्ड नीतियां। वैकल्पिक प्रवर्तन के साथ ईमेल सत्यापन का समर्थन करता है ताकि सत्यापित होने तक साइन-इन अवरुद्ध किया जा सके, साथ ही कॉन्फ़िगरेबल टोकन समाप्ति और एकल-उपयोग रीसेट टोकन। अंतर्निहित सुरक्षा के साथ पासवर्ड रीसेट प्रवाह: पृष्ठभूमि में ईमेल भेजना, टाइमिंग अटैक रोकथाम, अमान्य अन
official
organization-best-practices
better-auth
We need to translate the given English text into Hindi. The text describes a multi-tenant organization setup with features like member management, role-based access control, team support via Better Auth. It mentions configuring organizations with customizable creation rules, membership limits, ownership constraints, automatic owner role assignment, managing members and invitations with email delivery, expiration windows, shareable invitation URLs, multiple roles per member, custom roles and permissions with dynamic access control, and permission checking. We must preserve product names, protocol names, URLs, numbers, technical terms. "Better Auth" is a product name, so keep as is. "Multi-tenant" is a technical term, but we can translate as "बहु-किरायेदार" or keep as is? Usually "multi-tenant" is kept in English in Hindi tech translations, but we can use "बहु-किरायेदार" if appropriate. However, the instruction says preserve technical terms, so likely keep "multi-tenant" as is. But the text is in English, we are translating to Hindi. I think
official
two-factor-authentication-best-practices
better-auth
बेहतर प्रमाणीकरण के लिए TOTP, OTP, बैकअप कोड और विश्वसनीय डिवाइस प्रबंधन के साथ बहु-कारक प्रमाणीकरण। तीन सत्यापन विधियों का समर्थन करता है: प्रमाणक ऐप्स (QR कोड के साथ TOTP), ईमेल/SMS कोड (OTP), और एकल-उपयोग बैकअप कोड। स्वचालित सत्र प्रबंधन, अस्थायी 2FA कुकीज़ और कॉन्फ़िगरेबल समाप्ति के साथ विश्वसनीय डिवाइस ट्रैकिंग के साथ पूर्ण 2FA साइन-इन प्रवाह को संभालता है। दर स
official