CLI
Command-line tool for interacting with ezAuth. Supports authentication, user management, custom tables, and more.
Installation
cd cli
pip install -e .
Configuration
ezauth configure
Prompts for:
- Server URL — your EZAuth instance URL
- Publishable key — for frontend auth operations
- Secret key — for admin operations (optional)
Configuration is stored in ~/.config/ezauth/config.json.
Authentication Commands
ezauth signup
Register a new account. Automatically solves the hashcash challenge, then prompts for a verification code.
$ ezauth signup
Email: [email protected]
Password (optional, press Enter to skip): ****
Requesting challenge...
Proof of work solved in 3 attempts.
verification_sent — check your email for a verification code.
Verification code: 482917
Signed up and logged in as [email protected]
ezauth login
Sign in to an existing account. Supports both password and magic link strategies.
$ ezauth login
Email: [email protected]
Strategy (password, magic_link) [magic_link]: password
Password: ****
Logged in as [email protected]
ezauth whoami
Show the current user's information. Automatically refreshes expired tokens.
$ ezauth whoami
user_id: a1b2c3d4-...
email: [email protected]
email_verified: true
is_bot: false
ezauth logout
Sign out and clear local credentials.
$ ezauth logout
Logged out.
Admin Commands
These commands require a secret key to be configured.
Users
# List users
ezauth users list
ezauth users list --limit 10 --email [email protected]
# Create a user
ezauth users create --email [email protected] --password s3cret
# Get a user by ID
ezauth users get <user-id>
Sessions
# Revoke a session
ezauth sessions revoke <session-id>
# Create a sign-in token
ezauth sessions create-token --user-id <user-id> --expires 300
Tables
# Create a table with columns
ezauth tables create --name contacts --column name:text --column age:int
# List tables
ezauth tables list
# Get table details
ezauth tables get <table-id>
# Delete a table
ezauth tables delete <table-id>
Columns
# Add a column
ezauth columns add <table-id> --name email --type text --required
# Update a column
ezauth columns update <table-id> <column-id> --name full_name
# Delete a column
ezauth columns delete <table-id> <column-id>
Rows
# Insert a row
ezauth rows insert <table-id> --data '{"name": "Alice", "age": 30}'
# Get a row
ezauth rows get <table-id> <row-id>
# Update a row
ezauth rows update <table-id> <row-id> --data '{"age": 31}'
# Delete a row
ezauth rows delete <table-id> <row-id>
# Query rows
ezauth rows query <table-id> \
--filter '{"field": "age", "op": "gte", "value": 18}' \
--sort name:asc \
--limit 50
Storage
# Show storage usage
ezauth storage
JSON Output
Add --json to any command to get raw JSON output:
ezauth --json users list
ezauth --json whoami