https://github.com/landakram/plaid-cli
A CLI tool for working with the Plaid API. Link accounts and pull transactions from the command line.
https://github.com/landakram/plaid-cli
budgeting personal-finance plaid
Last synced: 5 months ago
JSON representation
A CLI tool for working with the Plaid API. Link accounts and pull transactions from the command line.
- Host: GitHub
- URL: https://github.com/landakram/plaid-cli
- Owner: landakram
- License: mit
- Created: 2020-06-10T00:08:21.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-29T06:39:48.000Z (about 4 years ago)
- Last Synced: 2024-06-19T01:57:07.290Z (10 months ago)
- Topics: budgeting, personal-finance, plaid
- Language: Go
- Homepage:
- Size: 55.7 KB
- Stars: 39
- Watchers: 4
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# plaid-cli 🤑
> Link accounts and get transactions from the command line.
plaid-cli is a CLI tool for working with the Plaid API.
You can use plaid-cli to link bank accounts and pull transactions in multiple
output formats from the comfort of the command line.## Installation
Install with `go get`:
```sh
go get github.com/landakram/plaid-cli
```Or grab a binary for your platform from the [Releases](https://github.com/landakram/plaid-cli/releases) page.
## Configuration
To get started, you'll need Plaid API credentials, which you can get by visiting
https://dashboard.plaid.com/team/keys after signing up for free.plaid-cli will look at the following environment variables for API credentials:
```sh
PLAID_CLIENT_ID=
PLAID_SECRET=
PLAID_ENVIRONMENT=development
PLAID_LANGUAGE=en # optional, detected using system's locale
PLAID_COUNTRIES=US # optional, detected using system's locale
```I recommend setting and exporting these on shell startup.
API credentials can also be specified using a config file located at
~/.plaid-cli/config.toml:```toml
[plaid]
client_id = ""
secret = ""
environment = "development"
```After setting those API credentials, plaid-cli is ready to use!
You'll probably want to run 'plaid-cli link' next.## Usage
Usage:
plaid-cli [command]Available Commands:
accounts List accounts for a given institution
alias Give a linked bank account a name.
aliases List aliases
help Help about any command
link Link a bank account so plaid-cli can pull transactions.
tokens List tokens
transactions List transactions for a given accountFlags:
-h, --help help for plaid-cliUse "plaid-cli [command] --help" for more information about a command.
### Link an account
Run:
```
plaid-cli link
```plaid-cli will start a webserver and open your browser so you can link your bank account
with [Plaid Link](https://blog.plaid.com/plaid-link/).To see the access token you just created and the "Plaid Item ID" it's associated with,
you can run:```
plaid-cli tokens
```### Alias a link
You can make human-readable names for a linked instituion by running:
```
plaid-cli alias nice-name
```You can now refer to the linked instituion by `nice-name` in most commands.
### Pulling transactions
You can pull transaction history for an institution by running:
```
plaid-cli transactions --from 2020-06-01 --to 2020-06-10 --output-format csv > out.csv
```The output is suitable for manual import in budgeting tools such as YNAB.
### Relinking
Most commands will prompt you to relink automatically if your bank login has expired (due to 2FA, for example).
To manually relink, you can run the link command with an item ID or alias:
```
plaid-cli link nice-name
```## Why
I wanted to work around YNAB's flaky direct import feature. For some reason, it's not able
to sync transactions with SoFi and SoFi only provides a PDF statement history unsuitable for
manual import.Similar projects:
* [plaid2qif](https://github.com/ebridges/plaid2qif). A very similar Python-based cli tool. The major difference is that plaid-cli handles linking to account automatically and will prompt for relinks.