Skip to content

BeanHub Connect

Note

This command requires you to run the login command first. Please read the document about the login command first here.

BeanHub Connect is a feature for paid BeanHub members only. This feature allows our members to connect to 12,000+ financial institutions in 17 countries and produce CSV files, which beanhub-import can ingest and generate corresponding Beancount transactions for you automatically. Originally, this feature imports data as Git commits only to BeanHub's repository. Later on, we added the standalone commands to make it possible to pull bank transactions directly into your local work environment without relying on updates in BeanHub's Git repository. You can read our blog post Direct Connect: Pulling transactions as CSV files from banks via Plaid directly to learn more.

Please note that connect commands require some extra optional Python dependencies. Therefore, when installing BeanHub-CLI Python package, please make sure to include connect extra dependencies like this:

pip install "beanhub-cli[connect]"

Pre-requirements

To pull transaction data from your bank automatically, you need to first log into your BeanHub account on our web app and then go to your repository. Find the Import item in the left side menu and click Connected Banks.

Screenshot of BeanHub Connect list

Next, it will prompt you with the Plaid dialogue to choose and authenticate the bank you want to connect to.

Screenshot of Plaid prompt dialogue in BeanHub Connect list page

After finishing the connect step, the BeanHub system will have a default schedule to pull new data from your bank via Plaid. BeanHub encrypts and secures all your transaction data with HSM (Hardware Security Module) in our database. You can customize the update schedule as you please on the same Connected Banks page in your repository.

Sync

While most BeanHub users rely on BeanHub to pull transaction data from banks via Plaid and then run BeanHub Import automatically in our cloud infrastructure, some users may want to run BeanHub Import workflow locally. To ensure that all the transaction data in BeanHub's database is up-to-date, you can run a sync command to make BeanHub update transactions from the banks for you immediately instead of waiting until the scheduled time arrives.

To run the sync command, simply type:

bh connect sync

Dump

Our open-source Beancount transactions import library, beanhub-import, relies on the users to provide CSV files from banks. Usually, this part is done on BeanHub's server along with sync operations and provides the changes as a new Git commit. Some users prefer to have their workflow stay local, or they prefer to manually check before making a commit. In that case, the dump command comes in handy. The dump command collects all the transactions we synced from Plaid previously with either the sync command or scheduled sync operations and dumps them into your local file system as CSV files. To run the command, simply type:

bh connect dump

Since many users may want to run a sync before the dump, we also provide a --sync argument to make it run sync first, then dump to ensure that your transaction data is up-to-date. Like this:

bh connect dump --sync