Metadata-Version: 2.4
Name: fivetran-cli
Version: 0.1.13
Summary: Command line wrapper for the Fivetran REST API and Connector SDK
Author: Fivetran
License-Expression: MIT
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fivetran-connector-sdk>=2.9.2
Dynamic: license-file

# fivetran-cli

Thin command line wrapper around the Fivetran REST API and Connector SDK.

> **Beta:** Fivetran REST API commands are exposed under `fivetran beta` while
> their command names, flags, and output formatting are still stabilizing.
> Connector SDK commands remain available at their established top-level shape,
> for example `fivetran deploy`.

```text
fivetran [global-options] beta <resource> <operation> [arguments] [options]
```

## Installation

```bash
python3 -m pip install -U fivetran-cli
```

Verify the installed CLI:

```bash
fivetran --help
fivetran deploy --help
fivetran beta connection list --help
```

Credentials default to `FIVETRAN_API_KEY`. Set it to the single Base64-encoded API key shown by Fivetran. Or you can also pass it in via `--api-key` option.

```bash
fivetran --api-key "$FIVETRAN_API_KEY" beta connection list
fivetran beta connection create --config-file connection.json
fivetran deploy
```

## Usage

Global options may be placed before or after the resource command.

```bash
fivetran beta connection list --api-key "$FIVETRAN_API_KEY"
fivetran beta connection-schema get connection_id
fivetran beta connector-metadata get google_ads
fivetran beta public-connector list
```

Output defaults to readable text: list responses render as aligned, color-coded
tables and detail responses as aligned key/value sections. Use `--output json`
for compact JSON for scripting. Flag and config conventions follow the dbt CLI.

```bash
fivetran beta connection list                 # default text table
fivetran beta connection get connection_id    # default text detail
fivetran beta connection list --output json   # compact JSON
```

Output options (each with a `FIVETRAN_*` env override where noted):

| Flag | Env | Effect |
|------|-----|--------|
| `--output {text,json}` | `FIVETRAN_OUTPUT` | Output format (default `text`) |
| `--output-file PATH` | — | Write rendered output to a file |
| `--use-colors` / `--no-use-colors` | `FIVETRAN_USE_COLORS` | Toggle ANSI color (default on) |
| `--printer-width N` | `FIVETRAN_PRINTER_WIDTH` | Wrap/truncation width (default terminal width) |
| `--wide` | — | Show all non-sensitive fields/columns, no truncation |
| `--fields a,b,c` | — | Explicit fields/columns to show |

Curated resources (connection, destination, group, user, team, webhook,
transformation) show a focused set of columns by default; everything else is
shown with `--wide` or `--output json`. Sensitive values (passwords, secrets,
tokens, API/private keys, and exact `key` fields) are always redacted in text
output.

Create and update commands accept configuration as inline JSON or a JSON file:

```bash
fivetran beta private-link create --config-file private-link.json
fivetran beta connection-schema column update connection_id schema table column --config '{"enabled":false}'
```

Destructive commands require `--yes` in non-interactive mode.

## Included Commands

Core resources:

- `account get`
- `certificate connection list|get|approve|revoke`
- `certificate destination list|get|approve|revoke`
- `connection list|get|create|update|delete|sync|resync|test`
- `connector-sdk-package list|get|delete`
- `destination list|get|create|update|delete|test`
- `fingerprint connection list|get|approve|revoke`
- `fingerprint destination list|get|approve|revoke`
- `group list|get|create|update|delete`
- `group connection list`
- `group user list|add|remove`
- `group public-key get`
- `group service-account get`

Access management:

- `user list|get|invite|update|delete`
- `user account-role remove`
- `user connection list|get|add|update|remove`
- `user group list|get|add|update|remove`
- `team list|get|create|update|delete`
- `team account-role remove`
- `team connection list|get|add|update|remove`
- `team group list|get|add|update|remove`
- `team user list|get|add|update|remove`
- `role list`
- `system-key list|get|create|update|delete|rotate`

Schemas and metadata:

- `connection-schema get|setup|update|reload|resync-table`
- `connection-schema schema update`
- `connection-schema table update`
- `connection-schema column list|update|drop|drop-blocked`
- `connector-metadata list|get`
- `public-connector list`

Networking:

- `hybrid-deployment-agent list|get|create|delete|regenerate-auth|reset-credentials`
- `log-service list|get|create|update|delete|test`
- `log-service account get|create|update|delete`
- `proxy-agent list|get|create|delete|regenerate-secrets`
- `proxy-agent connection list`
- `private-link list|get|create|update|delete`
- `webhook list|get|create-account|create-group|update|delete|test`

Transformations:

- `transformation list|get|create|update|delete|run|cancel|upgrade`
- `transformation package-metadata list|get`
- `transformation-project list|get|create|update|delete|test`

Connector SDK:

- `init`
- `debug`
- `deploy`
- `package`
- `reset`
- `version`
- `help`

Connector SDK commands are provided by `fivetran-connector-sdk` and remain at their existing top-level shape, for example `fivetran deploy`.

## Not Included Yet

The remaining gaps are intentionally limited to endpoints that need behavior beyond the generic JSON request/response wrapper, or endpoints whose user-facing command shape needs more validation before release.

- Connector SDK package create/update/download, because those require file upload/download handling rather than JSON-only request bodies.
- Hub registration
- Group destination listing, pending confirmation of a supported REST endpoint
- Interactive connector setup workflows
- Curated table/detail views for the long tail of resources (connection,
  destination, group, user, team, webhook, and transformation are curated today;
  the rest use the generic all-columns-capped fallback)
