CLI

Manage feedback, projects, and ratings from the terminal with the SeggWat CLI.

Overview

The SeggWat CLI lets you manage feedback, projects, and ratings directly from your terminal. It's ideal for:

  • Quick triage: Review and update feedback without opening the dashboard
  • Automation: Script feedback workflows in CI/CD pipelines or cron jobs
  • Bulk operations: Filter, search, and export feedback with JSON output
  • Developer workflows: Pipe feedback data into other tools like jq, fzf, or custom scripts

Installation

bash
cargo install seggwat-cli

Supported platforms: Linux (x86_64, ARM64), macOS (Apple Silicon)

Verify the installation:

bash
seggwat --version

Authentication

The CLI supports two authentication methods: OAuth login (interactive) and API key (non-interactive).

bash
seggwat login

This opens your browser to authenticate with your SeggWat account. Tokens are cached in ~/.config/seggwat/tokens.json and refreshed automatically.

bash
# Check who you're logged in as
seggwat whoami

# Log out and clear cached tokens
seggwat logout
1

Create an API token

In the SeggWat Dashboard, go to Settings > API Tokens and click Create New Token.

2

Set the environment variable

bash
export SEGGWAT_API_KEY=oat_xxxxxxxxxxxxxxxxxxxxx

Or pass it directly:

bash
seggwat --api-key oat_xxxxxxxxxxxxxxxxxxxxx project list

Quick Start

bash
# Log in
seggwat login

# List your projects
seggwat project list

# View feedback for a project
seggwat feedback list PROJECT_ID

# Create a bug report
seggwat feedback create PROJECT_ID --message "Login button broken on mobile" --type bug

# Update feedback status
seggwat feedback update PROJECT_ID FEEDBACK_ID --status resolved --resolution-note "Fixed in v2.1"

# Check rating statistics
seggwat rating stats PROJECT_ID --type star

Commands

Projects

Command Alias Description
seggwat project list p ls List all projects
seggwat project get <id> p get Get project details
seggwat project summary <id> p summary Project overview with stats
bash
# List all projects
seggwat project list

# Get details for a specific project
seggwat project get 550e8400-e29b-41d4-a716-446655440000

# Get a summary with feedback and rating stats
seggwat project summary 550e8400-e29b-41d4-a716-446655440000

Feedback

Command Alias Description
seggwat feedback list <project-id> fb ls List feedback (with filters)
seggwat feedback get <project-id> <feedback-id> fb get Get a single item
seggwat feedback create <project-id> fb create Create new feedback
seggwat feedback update <project-id> <feedback-id> fb update Update feedback
seggwat feedback delete <project-id> <feedback-id> fb rm Delete/archive feedback
seggwat feedback stats <project-id> fb stats Show feedback statistics

List with filters:

bash
# Filter by status
seggwat feedback list PROJECT_ID --status new

# Filter by type
seggwat feedback list PROJECT_ID --type bug

# Search message content
seggwat feedback list PROJECT_ID --search "login"

# Pagination
seggwat feedback list PROJECT_ID --page 2 --limit 50

Available statuses: new, active, assigned, hold, closed, resolved

Available types: bug, feature, praise, question, improvement, other

Create and update:

bash
# Create feedback
seggwat feedback create PROJECT_ID \
  --message "Dark mode support would be great" \
  --type feature \
  --path "/settings" \
  --version "2.1.0"

# Update status and add resolution note
seggwat feedback update PROJECT_ID FEEDBACK_ID \
  --status resolved \
  --resolution-note "Shipped in v2.2.0"

# Change feedback type
seggwat feedback update PROJECT_ID FEEDBACK_ID --type improvement

Ratings

Command Alias Description
seggwat rating list <project-id> r ls List ratings (with filters)
seggwat rating get <project-id> <rating-id> r get Get a single rating
seggwat rating delete <project-id> <rating-id> r rm Delete/archive a rating
seggwat rating stats <project-id> r stats Aggregated statistics
bash
# List all ratings
seggwat rating list PROJECT_ID

# Filter by type
seggwat rating list PROJECT_ID --type star

# Filter by page path
seggwat rating list PROJECT_ID --path "/docs/getting-started"

# Get stats for different rating types
seggwat rating stats PROJECT_ID --type helpful
seggwat rating stats PROJECT_ID --type star
seggwat rating stats PROJECT_ID --type nps

Rating types: helpful (thumbs up/down), star (1-5), nps (0-10)

JSON Output

Add --json to any command for machine-readable output. This is useful for scripting and piping into other tools.

bash
# Pretty-print feedback as JSON
seggwat feedback list PROJECT_ID --json | jq .

# Count open bugs
seggwat feedback list PROJECT_ID --type bug --status new --json | jq length

# Export all feedback to a file
seggwat feedback list PROJECT_ID --limit 100 --json > feedback-export.json

# Get project IDs for scripting
seggwat project list --json | jq -r '.[].id'

Shell Completions

Generate tab completions for your shell:

bash
seggwat completions bash > ~/.local/share/bash-completion/completions/seggwat

Global Options

These flags work with any command:

Flag Env Variable Description
--api-url <url> SEGGWAT_API_URL API base URL (default: https://seggwat.com)
--api-key <key> SEGGWAT_API_KEY API key for authentication
--json Output as JSON instead of tables
-v, --verbose Enable debug logging

Self-Hosted Setup

If you're running a self-hosted SeggWat instance:

bash
# Point CLI to your instance
export SEGGWAT_API_URL=https://feedback.yourcompany.com

# Login requires Zitadel domain and client ID
seggwat login --zitadel-domain auth.yourcompany.com --client-id YOUR_CLIENT_ID

Or set them as environment variables:

bash
export SEGGWAT_API_URL=https://feedback.yourcompany.com
export SEGGWAT_ZITADEL_DOMAIN=auth.yourcompany.com
export SEGGWAT_CLIENT_ID=YOUR_CLIENT_ID
Navigation