update readme
This commit is contained in:
24
README.md
24
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 <your-token>
|
||||
|
||||
# Check status
|
||||
./apps/cli/dist/reviq auth status
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
### Authentication
|
||||
|
||||
86
apps/cli/README.md
Normal file
86
apps/cli/README.md
Normal file
@@ -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 <command>
|
||||
|
||||
# Or use the compiled binary
|
||||
./dist/reviq <command>
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
### Authentication
|
||||
|
||||
```bash
|
||||
# Login with an API token
|
||||
reviq auth login --token <your-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 <email>
|
||||
|
||||
# Confirm email
|
||||
reviq user confirm-email --code <code>
|
||||
```
|
||||
|
||||
### Organization Management
|
||||
|
||||
```bash
|
||||
# List organizations
|
||||
reviq org list
|
||||
|
||||
# Create an organization
|
||||
reviq org create --name <name> --slug <slug>
|
||||
|
||||
# Add a site to an organization
|
||||
reviq org add-site --org <slug> --domain <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`.
|
||||
Reference in New Issue
Block a user