Sequin CLI
Use the CLI to manage resources and develop locally
With the Sequin CLI, you can easily manage resources and build and test features locally.
Installation
Install with Homebrew
Install with shell
Build from source
Reload your console and test that it’s installed:
Contexts
The Sequin CLI uses contexts to manage different configurations and environments. Each context stores:
- API token for authentication
- Hostname configuration (for self-hosted Sequin instances)
- TLS settings (for self-hosted Sequin instances)
- Tunnel port configurations (for Sequin Cloud)
sequin context
Display available context commands:
sequin context add
Create a new context:
Flags
--api-token
: Your authentication token--set-default
: Set as the default context
Self-hosted flags:
For self-hosted Sequin instances, you’ll specify:
--hostname
: API hostname of your Sequin instance (defaults to api.sequinstream.com)--tls
: Enable/disable TLS (enabled by default)
Cloud flags:
--tunnel-ports
: Configure default tunnel ports
sequin context ls
List all contexts:
sequin context select
Switch between contexts:
Using contexts with commands
Use a specific context for any command with the --context
flag:
Config
The config
command group allows you to manage Sequin resources using YAML configuration files. This provides a declarative way to create and manage databases, sinks, HTTP endpoints, and other resources.
sequin config
See the sequin.yaml reference for detailed configuration options and examples.
Commands
sequin config export
- Export current configuration as YAMLsequin config plan [file]
- Preview changes from a YAML filesequin config apply [file]
- Apply changes from a YAML file
The file
argument defaults to sequin.yaml
if not specified.
Example Workflow
Using with Contexts
All config commands respect the current context and can be used with the --context
flag:
The export
command is experimental. Exported configurations may need manual adjustments before use:
account
anduser
sections are not exported- Encrypted fields like passwords need to be manually specified
- The
consumer_start
field requires manual configuration
Tunnel (Sequin Cloud only)
The tunnel
command creates a secure connection between your local development environment and Sequin’s cloud platform. You can use it to connect Sequin to either local databases or HTTP endpoints.
sequin tunnel
First, you’ll need to setup your database or HTTP endpoint on Sequin’s platform.
Then, to start a tunnel, run the tunnel
command. The docs for that command:
So, if you named your Postgres database my-pg-db
on Sequin, and it’s running on port 5432 on your local machine, run:
Sequin’s cloud servers can now connect to your local Postgres database at localhost:5432
.
Was this page helpful?