From c698a85cc172c249878ad36bf629f43925c70df7 Mon Sep 17 00:00:00 2001 From: igm Date: Sat, 10 Jan 2026 06:17:48 -0500 Subject: [PATCH] update readme --- README.md | 24 ++++++++++++- apps/cli/README.md | 86 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 apps/cli/README.md diff --git a/README.md b/README.md index 21b7fcf..b39620e 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ A modern publisher dashboard for managing organizations, members, and sites. Bui - **PostgreSQL** database - **Postmark** for transactional emails +### CLI (`apps/cli`) +- **Stricli** for command parsing +- API token-based authentication +- User, organization, and site management commands + ### Shared Packages - `@reviq/api-contract` - Shared API contract (oRPC) - `@reviq/db` - Database client and queries @@ -31,7 +36,7 @@ A modern publisher dashboard for managing organizations, members, and sites. Bui publisher-dashboard/ ├── apps/ │ ├── api-server/ # Backend API server -│ ├── cli/ # CLI tools +│ ├── cli/ # Command-line interface │ └── publisher-dashboard/ # SvelteKit frontend ├── packages/ │ ├── api-contract/ # Shared oRPC contract @@ -107,6 +112,23 @@ bun run dev | `bun run test` | Run tests | | `bun run db:codegen` | Generate database types | +## CLI + +The `@reviq/cli` package provides a command-line interface for managing users, organizations, and sites. See [apps/cli/README.md](apps/cli/README.md) for detailed usage. + +Quick start: + +```bash +# Build the CLI +bun run --cwd apps/cli build + +# Login with an API token +./apps/cli/dist/reviq auth login --token + +# Check status +./apps/cli/dist/reviq auth status +``` + ## Features ### Authentication diff --git a/apps/cli/README.md b/apps/cli/README.md new file mode 100644 index 0000000..e096c26 --- /dev/null +++ b/apps/cli/README.md @@ -0,0 +1,86 @@ +# RevIQ CLI + +Command-line interface for RevIQ database and user management. + +## Installation + +```bash +# Build the CLI +bun run build + +# The compiled binary will be at dist/reviq +``` + +## Usage + +```bash +# Run directly with bun +bun run cli + +# Or use the compiled binary +./dist/reviq +``` + +## Commands + +### Authentication + +```bash +# Login with an API token +reviq auth login --token + +# Check authentication status +reviq auth status + +# Logout +reviq auth logout +``` + +To get an API token: +1. Log in to the web dashboard +2. Go to Account Settings > API Tokens +3. Create a new token and copy it + +### User Management + +```bash +# Create a new user +reviq user create --email + +# Confirm email +reviq user confirm-email --code +``` + +### Organization Management + +```bash +# List organizations +reviq org list + +# Create an organization +reviq org create --name --slug + +# Add a site to an organization +reviq org add-site --org --domain +``` + +### Admin Commands + +```bash +# Complete login (admin) +reviq admin complete-login +``` + +### Other Commands + +```bash +# Bootstrap the database +reviq bootstrap + +# Generate shell completions +reviq completions +``` + +## Configuration + +Credentials are stored at `~/.config/reviq/credentials.json`.