Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with Spring Boot
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Heroku Enterprise
  • Heroku Connect (Salesforce sync)
  • Heroku Connect Reference
  • The Heroku Connect CLI Plugin

The Heroku Connect CLI Plugin

English — 日本語に切り替える

Last updated November 29, 2022

Table of Contents

  • Install the Heroku CLI
  • Install the Heroku Connect CLI Plugin
  • Heroku Connect CLI Commands

The Heroku Connect CLI plugin for the Heroku CLI allows you to set up and manage Heroku Connect.

This plugin is experimental and not officially supported.

 

The plugin uses the Heroku Connect API to execute its commands. If you’re scripting with this CLI plugin to manage Heroku Connect, review the API limits to prevent throttling.

Install the Heroku CLI

You must have the Heroku CLI installed before adding the Heroku Connect CLI plugin. See Heroku CLI for instructions.

Install the Heroku Connect CLI Plugin

Run the following Heroku CLI command to install the Heroku Connect CLI plugin:

$ heroku plugins:install heroku-connect-plugin

Heroku Connect CLI Commands

These are the help texts for each of the plugin’s commands. You can also see help text in your terminal with heroku connect --help and heroku:connect:COMMAND --help.

The --resource option in these commands refers to the specific connection resource name (add-on name), such as, herokuconnect-twisted-123. While normally optional, you must specify the resource name if your app has more than one Heroku Connect add-on attached.

heroku connect:db:set

This command sets the database parameters.

DESCRIPTION
  Set a connection's database config var and schema name.

USAGE
  $ heroku connect:db:set

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --db=db              Database config var name
  --resource=resource  specific connection resource name
  --schema=schema      Database schema name

heroku connect:diagnose

This command displays diagnostic information about a connection.

USAGE
  $ heroku connect:diagnose

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  -v, --verbose        display passed and skipped check information as well
  --resource=resource  specific connection resource name

DESCRIPTION
  Checks a connection for common configuration errors.

heroku connect:export

This command exports configuration from a connection.

USAGE
  $ heroku connect:export

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  Exports the mapping configuration from a connection as a json file

heroku connect:import

This command imports configuration from a connection.

USAGE
  $ heroku connect:import FILE

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  Imports the mapping configuration from a json export file

heroku connect:info

This command displays your connection info.

  $ heroku connect:info

OPTIONS
  -a, --app=app        (required) app to run command against
  -c, --check-for-new  check for access to any new connections
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  display connection information

heroku connect:mapping

Manage mappings with this command.

manage mappings on a Heroku Connect addon

USAGE
  $ heroku connect:mapping:COMMAND

COMMANDS
  connect:mapping:delete        Delete an existing mapping
  connect:mapping:diagnose      Display diagnostic information about a mapping
  connect:mapping:reload        Reload a mapping's data from Salesforce
  connect:mapping:state         return a mapping state
  connect:mapping:write-errors  Display the last 24 hours of write errors on
                                this mapping

heroku connect:mapping:delete

This command deletes the specified mapping.

USAGE
  $ heroku connect:mapping:delete MAPPING

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --confirm=confirm
  --resource=resource  specific connection resource name

DESCRIPTION
  Delete an existing mapping

heroku connect:mapping:diagnose

This command displays diagnostic information about a mapping. This helps with troubleshooting invalid mapping configurations.

USAGE
  $ heroku connect:mapping:diagnose MAPPING

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  -v, --verbose        display passed and skipped check information as well
  --resource=resource  specific connection resource name

DESCRIPTION
  Checks a mapping for common configuration errors.

heroku connect:mapping:reload

This command reloads a mapping’s data from Salesforce.

USAGE
  $ heroku connect:mapping:reload MAPPING

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  Reload a mapping's data from Salesforce

heroku connect:mapping:state

This command returns a mapping’s state.

USAGE
  $ heroku connect:mapping:state MAPPING

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  return a mapping state

heroku connect:mapping:write-errors

This command displays the last 24 hours of write errors on this mapping.

USAGE
  $ heroku connect:mapping:write-errors NAME

ARGUMENTS
  NAME  Name of the mapping to retrieve errors for

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --json               print errors as styled JSON
  --resource=resource  specific connection resource name

EXAMPLE
  $ heroku connect:mapping:write-errors -a myapp --resource
  herokuconnect-twisted-123 Account

heroku connect:pause

This command pauses a connection.

USAGE
  $ heroku connect:pause

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  Pauses an active connection

heroku connect:recover

This command attempts to recover a connection.

USAGE
  $ heroku connect:recover

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  Clears errors and attempts to resume sync operations

ALIASES
  $ heroku connect:restart

heroku connect:resume

This command resumes a paused connection.

USAGE
  $ heroku connect:resume

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --resource=resource  specific connection resource name

DESCRIPTION
  Resumes a paused connection

heroku connect:sf:auth

This command authorizes access to Salesforce for your connection.

USAGE
  $ heroku connect:sf:auth

OPTIONS
  -a, --app=app                  (required) app to run command against
  -c, --callback=callback        final callback URL

  -d, --domain=domain            specify a custom login domain (if using a
                                 "custom" environment)

  -e, --environment=environment  "production", "sandbox", or "custom" [defaults
                                 to "production"]

  -r, --remote=remote            git remote of app to use

  --resource=resource            specific connection resource name

DESCRIPTION
  Opens a browser to authorize a connection to a Salesforce Org

heroku connect:state

This command returns the connection(s) state.

USAGE
  $ heroku connect:state

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --json               print output as json
  --resource=resource  specific connection resource name

DESCRIPTION
  returns the state key of the selected connections

heroku connect:write-errors

This command displays the last 24 hours of write errors on the connection.

USAGE
  $ heroku connect:write-errors

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
  --json               print errors as styled JSON
  --resource=resource  specific connection resource name

EXAMPLE
  $ heroku connect:write-errors -a myapp --resource herokuconnect-twisted-123

Keep reading

  • Heroku Connect Reference

Feedback

Log in to submit feedback.

Using Custom Triggers with Heroku Connect The Heroku Connect Dashboard

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences