Skip to main content

withfeedback CLI

Command-line client for withfeedback.com: testimonials, feedback moderation, CSV imports, surveys, NPS, widgets, and quota usage — from your terminal or CI.

Install

pip install withfeedback
# or run without installing:
uvx withfeedback --help

The console command is withfeedback.

Quick start with a personal access token (PAT)

Good for CI and quick scripting:

  1. Log in at your withfeedback.com instance and open Account → API Tokens (/accounts/tokens/).

  2. Create a token with the scopes you need (see the table below).

  3. Either export it per-shell:

    export WITHFEEDBACK_TOKEN=spd_abc123...
    withfeedback testimonials list --team <TEAM_ID> --project <PROJECT_ID>
    

    or persist it in the OS keychain:

    withfeedback login --token spd_abc123...
    

API access requires a plan that includes the API/CLI/MCP feature (Pro and above).

Login via OAuth2 device flow (interactive)

withfeedback login

No flags needed against withfeedback.com — the CLI defaults to the official public client id 7yQMsnY2Is2f5tCuwwgItoQu3fRkEX2wnzIRj0Vh (public by design — device-flow clients carry no secret). For a self-hosted instance pass your own client:

withfeedback login --client-id <CLIENT_ID>       # or WITHFEEDBACK_CLIENT_ID

What happens:

  1. The CLI calls POST /o/device-authorization/ and prints a verification URL plus a short code (it also tries to open your browser).
  2. You open the URL, enter the code, and approve the requested scopes.
  3. The CLI polls POST /o/token/ until you approve, then stores the access and refresh tokens in the OS keychain via keyring (macOS Keychain, Windows Credential Locker, Secret Service/KWallet on Linux) — never in a plaintext file.

When an access token expires, the CLI transparently refreshes it. Refresh tokens rotate on every use; the rotated token replaces the stored one. (Stored PATs are never "refreshed" — if a PAT is rejected, the CLI tells you to create a new one and run withfeedback login --token again.)

withfeedback logout   # remove stored tokens from the keychain

Token resolution precedence for every command: --token flag > WITHFEEDBACK_TOKEN env var > OS keychain.

Commands

withfeedback login [--client-id <ID> | --token <PAT>]
withfeedback logout

withfeedback testimonials list    --team <ID> --project <ID> [--status pending|approved|rejected|spam] [--rating N] [--q text] [--json]
withfeedback testimonials approve <SUBMISSION_ID> --team <ID> [--json]
withfeedback testimonials reject  <SUBMISSION_ID> --team <ID> [--json]
withfeedback testimonials create  --team <ID> --project <ID> --text "..." [--rating N] [--name ..] [--email ..] [--title ..] [--company ..] [--consent] [--tag t]... [--json]

withfeedback import csv FILE --team <ID> --project <ID> --text-col COL [--rating-col COL] [--name-col COL] [--email-col COL] [--consent] [--json]

withfeedback surveys list  --team <ID> --project <ID> [--json]
withfeedback nps summary   --team <ID> --project <ID> [--json]
withfeedback widgets list  --team <ID> --project <ID> [--json]
withfeedback usage         --team <ID> [--json]

Human output is plain text tables. Pass --json for machine-readable output (raw API responses) — errors still go to stderr.

CSV import

withfeedback import csv validates the file locally (header columns, row count), builds the column mapping from your --*-col options, and uploads the file to the server's multipart import endpoint. Rows are processed asynchronously and land as pending submissions; the command prints the batch id and a status URL to poll.

withfeedback import csv reviews.csv \
  --team <TEAM_ID> --project <PROJECT_ID> \
  --text-col "Testimonial" --rating-col "Stars" \
  --name-col "Author" --email-col "Email" --consent

Pass --consent only when display consent was actually collected for these rows.

Required scopes per command

Command Required scope
testimonials list read:feedback (or read:testimonials)
testimonials approve / reject moderate:submissions (write:* cannot moderate)
testimonials create write:testimonials (or write:feedback)
import csv write:feedback
surveys list, nps summary read:surveys
widgets list read:widgets
usage read:feedback

Exit codes

Code Meaning
0 Success
1 General / unknown error
2 Usage / config error (bad flags, unreadable CSV, missing column)
3 Auth error (not logged in, invalid or expired token)
4 Forbidden or payment required (missing scope/role, plan without API access, quota exceeded, billing blocked)
5 Not found (unknown team/project/object or no access)
6 Validation error or invalid state transition
7 Network error (server unreachable)

On API errors the API's error detail is printed to stderr.

Environment variables

Variable Default Purpose
WITHFEEDBACK_API_URL https://withfeedback.com API base URL (self-hosted/staging override)
WITHFEEDBACK_TOKEN PAT (beats the keychain, loses to --token)
WITHFEEDBACK_CLIENT_ID official public client id Client id for login (override for self-hosted)
WITHFEEDBACK_SCOPES all CLI scopes Scopes requested during device-flow login

On the first request of a run the CLI checks GET /.well-known/speedpy.json once and warns (never fails) when the manifest is unreachable or the API is older than the minimum this client expects.

Development

uv run --with pytest --with httpx --with click --with keyring pytest packages/withfeedback-cli/

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

withfeedback-0.1.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

withfeedback-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file withfeedback-0.1.0.tar.gz.

File metadata

  • Download URL: withfeedback-0.1.0.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for withfeedback-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc8fb76803f389b8a351eac1f7d405cc7553b0e395f5d87e7092d7b5a1f9f2e5
MD5 eb1c345528f256098fbf12d2cc8a15f0
BLAKE2b-256 d3d1f6857bc0c05fc37e13df2d8268080fba6d85bc413360aff3aeb10dff8af0

See more details on using hashes here.

File details

Details for the file withfeedback-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: withfeedback-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for withfeedback-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45af7694f9c63d2bcb6034cb7826355533c5d2aa54321c3d59eec241291f9556
MD5 8673a10c93c372bbfd829a589e464134
BLAKE2b-256 08665cc80b1313812c90658bb33495225c0728e76f78adf213d0c3e6bd4ea062

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page