Skip to navigation

CLI

Use Channel3 from your terminal.

The Channel3 CLI lets you call any API endpoint from your terminal. Source code lives at github.com/channel3-ai/channel3-cli.

Installation

# Clone and install from source
git clone https://github.com/channel3-ai/channel3-cli.git
cd channel3-cli
cargo install --path .

Authentication

Set your API key via environment variable, or pass it with --api-key on any command.

export CHANNEL3_API_API_KEY="your_api_key_here"

You can also set CHANNEL3_LANGUAGE, CHANNEL3_COUNTRY, and CHANNEL3_CURRENCY to apply default locale settings to every call.

To set these permanently, add the export lines to your ~/.zshrc (or ~/.bashrc) and run source ~/.zshrc to apply them to your current shell.

Usage

Commands follow a resource-based structure:

channel3-api [resource] <command> [flags...]

For example, to search for products:

channel3-api products search --query "organic cotton t-shirt"

Pass --help to any command for full flag documentation.

Passing files

Use the @ prefix to send a file as an argument — useful for image search:

channel3-api products search --base64-image @shoe.jpg

Output formats

Change the output format with --format (json, jsonl, yaml, pretty, raw, explore), or extract fields with --transform using GJSON syntax:

channel3-api products search --query "running shoes" --transform "products.#.title"

Search for products

channel3-api products search --query "organic cotton t-shirt"

Get product details

channel3-api products retrieve --product-id "prod_abc123"
channel3-api products image-search --image-url "https://example.com/shoe.jpg"

Find similar products

channel3-api products similar --product-id "prod_abc123"

Browse brands

channel3-api brands list
channel3-api brands search --query "Nike"
channel3-api brands get --brand-id "brand_abc123"

Browse categories

channel3-api categories list
channel3-api categories search --query "electronics"

Price tracking

channel3-api price-tracking start \
--canonical-product-id "prod_abc123" \
--webhook-url "https://example.com/webhook"
channel3-api price-tracking history --canonical-product-id "prod_abc123"

Environment variables

VariableDescriptionRequired
CHANNEL3_API_API_KEYAPI key for authenticationYes
CHANNEL3_LANGUAGEDefault ISO 639-1 language code (e.g. en)No
CHANNEL3_COUNTRYDefault ISO 3166-1 alpha-2 country code (e.g. GB)No
CHANNEL3_CURRENCYDefault ISO 4217 currency code (e.g. GBP)No

Global flags

FlagDescription
--api-keyAPI key (overrides CHANNEL3_API_API_KEY)
--languageDefault language code
--countryDefault country code
--currencyDefault currency code
--formatOutput format: json, jsonl, yaml, pretty, raw, explore
--transformGJSON expression for field extraction
--helpShow command help
--debugEnable debug logging
--version, -vShow CLI version
--base-urlCustom API backend URL