List of CLI Commands
This document lists all available CLI commands for Yew Search. Commands are executed from within the backend Docker container using the pnpm run cli script.
User Management Commands
user:create
Create a new user account.
Description: Creates a new user with email, name, and password. The password is entered interactively with masked input.
Usage:
docker exec -it yew-backend pnpm run cli user:create --email="admin@example.com" --name="Admin User"
Options:
-e, --email <email>(required) - User's email address-n, --name <name>(optional) - User's display name
Interactive Prompts:
- Password (masked with
*)
Example Output:
✓ User created successfully
ID: 01234567-89ab-cdef-0123-456789abcdef
Email: admin@example.com
Name: Admin User
user:update-password
Update an existing user's password.
Description: Updates a user's password by email or user ID. Prompts for new password and confirmation.
Usage:
# Update by email
docker exec -it yew-backend pnpm run cli user:update-password --email="admin@example.com"
# Update by user ID
docker exec -it yew-backend pnpm run cli user:update-password --id="01234567-89ab-cdef-0123-456789abcdef"
Options:
-e, --email <email>(optional) - User's email address-i, --id <id>(optional) - User's ID- At least one identifier (email or id) must be provided
Interactive Prompts:
- New password (masked with
*) - Confirm password (masked with
*)
Example Output:
✓ Password updated successfully
User ID: 01234567-89ab-cdef-0123-456789abcdef
Email: admin@example.com
Integration Commands
user-integration:create
Create a test user integration.
Description: Creates a test integration for development and testing purposes.
Usage:
docker exec -it yew-backend pnpm run cli user-integration:create
Options: None
Example Output:
✓ Created test integration
ID: 01234567-89ab-cdef-0123-456789abcdef
Domain: hello-world
General Commands
View all available commands
List all registered CLI commands and their descriptions.
Usage:
docker exec -it yew-backend pnpm run cli --help
View command-specific help
Get detailed help for a specific command.
Usage:
docker exec -it yew-backend pnpm run cli user:create --help
Running Commands
From Docker Container
When running Yew Search in Docker Compose, execute commands inside the backend container:
docker exec -it yew-backend pnpm run cli <command-name> [options]
From Local Development
When running the backend locally during development:
cd backend
pnpm run cli <command-name> [options]
Exit Codes
All CLI commands follow standard Unix exit code conventions:
0- Success1- Error (validation failed, user not found, database error, etc.)
Error Handling
Commands provide clear error messages with the ✗ symbol:
✗ User with email admin@example.com already exists
✗ Password cannot be empty
✗ Passwords do not match
✗ User not found: test@example.com
✗ Failed to create user: Database connection failed
Success messages use the ✓ symbol:
✓ User created successfully
✓ Password updated successfully
✓ Created test integration
Development
For information on creating new CLI commands, see Writing CLI Commands.