Install and setup the Decodable CLI

The Decodable command line interface (CLI) is the primary way to work with connections, streams, and pipelines in Decodable. It's fast, easy to use and suitable for both interactive or scripted use.

The CLI is available for the following platforms:

  • Linux
  • MacOS (10.15 and later)

Install the Decodable CLI

There are several ways you can install the Decodable CLI. Follow the instructions for your respective operating system to install the CLI.

Install manually

To install the Decodable CLI manually, go to the Decodable CLI page and download the version of the Decodable CLI that you want to install. If you are downloading these binaries via a browser on MacOS, you need to approve this as an application from an unidentified developer.

You might want to move the CLI directory to an appropriate place on your system such as /usr/local or /opt, and add the bin directory to your shell's $PATH. Alternatively, you could copy the decodable executable to an existing location already in the shell's path.

Install with Homebrew

If you have Homebrew, run the following command to install the Decodable CLI. This option is only supported for MacOS systems.

brew tap decodableco/decodable && brew install decodable 

Install with Decodable's install script

You can install the latest version of the Decodable CLI using our simple install script. Running this command downloads the latest version of the Decodable CLI in /usr/local/bin. This option is supported for both MacOS and Linux systems.

curl -L releases.decodable.co/install | bash

Initial Setup

Before using CLI, you must run the setup command with your account name. This will create the configuration directory and generate a simple configuration file.

decodable config setup <account>

Commands

All CLI functionality is grouped into logical (sub)commands. Running the CLI with no arguments will show you the list of supported commands as well as some basic help information.

decodable

# Output:
# Usage:
#   decodable [command]
#
# Available Commands:
#   config      Manage client configuration
#   connection  Manage connections
#   help        Help about any command
#   login       
#   pipeline    Manage pipelines
#   stream      Manage streams
#
# Flags:
#   -h, --help      help for decodable
#   -v, --version   version for decodable
#
# Use "decodable [command] --help" for more information about a command.

When in doubt, just use the --help option to get more help about a command.

# Display a summary of all commands.
decodable help
decodable -h # Same as above.

# Display the help for the pipeline command.
decodable pipeline -h
decodable help pipeline # Same as above.

# Display help for the create subcommand of the pipeline command.
decodable pipeline create -h
decodable help pipeline create # Same as above.

Configuration

The CLI stores configuration about accounts and authentication credentials in the ~/.decodable/ directory. These files are just YAML and are safe to explore, if you're curious.

The auth file contains sensitive access tokens and must not be shared or committed to version control.

Authentication

In most cases, you'll only need to login once. The CLI stores credentials in a file in the configuration directory. While the access token has a limited lifespan, the CLI will automatically refresh it as needed.

To login, run decodable login and follow the directions in your terminal.

General usage

Now that you're logged in, you're ready to get started using the Decodable CLI! Run decodable help for information about what you can do.

decodable help
# Usage:
#   decodable [command]
#
# Available Commands:
#   config      Manage client configuration
#   connection  Manage connections
#   help        Help about any command
#   login
#   pipeline    Manage pipelines
#   stream      Manage streams
#
# Flags:
#   -h, --help   help for decodable
#
# Use "decodable [command] --help" for more information about a command.

πŸ‘

Tip: CLI patterns

Almost all resource-related CLI commands - connection, stream, pipeline, etc. - use the same general subcommands of get, list, create, delete, and update with the same flags. Additionally, all commands always support --help!

If you'd like a more in-depth walkthrough of how to use the Decodable CLI to perform an end-to-end use case, see the Using the Decodable CLI Tutorial.