Synthient CLI

The official Synthient CLI is available to help with common tasks such as API testing, data fetching, and integration setup. Currently in beta.

Install

SystemInstall Command
macOSbrew install synthient/tap/synthient or go install github.com/synthient/cli/cmd@latest
Linuxgo install github.com/synthient/cli/cmd@latest
Windowsgo install github.com/synthient/cli/cmd@latest

Basic Commands

synthient auth

Authenticate the CLI with your Synthient API key. This API key will then be stored in your system's keychain for secure storage. If you want to authenticate a different way there are two other options:

  1. Provide your API key as an environment variable with the key being SYNTHIENT_API_KEY.
  2. Store it in a .env file in the current directory with the key SYNTHIENT_API_KEY.

synthient lookup

You need to be authenticated to run this command.

Lookup a given IP address. Works with piped input and/or multiple IP address as seen here:

synthient lookup 213.149.183.127

Multiple IPs can be passed as arguments:

synthient lookup 213.149.183.127 168.205.174.84

Or piped from stdin:

echo "213.149.183.127 168.205.174.84" | synthient lookup

Here is a full look into all of the options for the lookup command:

Usage:
  synthient lookup [flags]

Flags:
  -f, --format string   Output format [text|json|csv] (default "text")
  -h, --help            help for lookup
  -o, --output string   Where to write output: '-' for stdout, or a file path (e.g. 'lookup.json' or 'lookup.csv) (default "-")

Feeds

Streaming with synthient stream

You need to be authenticated to run this command.

Stream data from an anonymizer feed using the CLI:

synthient stream \
   --provider IPIDEA \
   --type RESIDENTIAL_PROXY \
   --last_observed 24H \
   --format CSV \
   --country_code US \
   --order desc

This will stream the data and output it to stdout as it comes in.

Downloading with synthient download

You need to be authenticated to run this command.

The same options available for streaming can be used with the download command, but output goes directly into a file. Specify the file as an argument:

synthient download feed.csv \
   --provider IPIDEA \
   --type RESIDENTIAL_PROXY \
   --last_observed 24H \
   --format CSV \
   --country_code US \
   --order desc

Configuration

Configuration for the Synthient CLI is located in ~/.config/synthient/config.toml. The CLI talks to the v4 HTTP API by default; override the host only if you are pointing at a private deployment.

[endpoints]
base_api = "https://api.synthient.com"   # /api/v4 paths are appended automatically