Skip to content

draxil/starling-el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Migration to codeberg Note if you’re seeing this on github, I’m moving primary development to codeberg. I’ll try and push to github for a transition period, but to be sure of freshness, best go there instead.

https://melpa.org/packages/starling-badge.svg

What is this?

If you bank with starling bank, you can get a personal API token which lets you access information from your account. As with most computing activities I want to do this from emacs because.. Well if you are an emacs user you will understand!

Currently I use it to quickly glance at the state of my “spaces” from emacs, but more capibilities may follow. Depending on interest (mine and others!).

Getting Started

Getting a personal token

First you need a personal access token from starling, and to hook this up to your account. See

https://developer.starlingbank.com/get-started

Mostly, sign up for a dev account and then follow the section called “Personal Access”, connect your account and create a token.

Only grant rights you want the token to be allowed. Recommendation (to be improved) is allow all read permissions, but if you want to be able to set spending categories you’ll also need transaction:edit.

Save your token somewhere emacs can find it

You should be careful with your access token, it allows access to your personal financial information! Emacs has a whole system for managing passwords, see documentation on auth-sources if you’d like full detail, but simplest is to add a line to ~/.authinfo.gpg (or without .gpg on the end if you don’t want to encrypt it) a line like:

machine api.starlingbank.com login personal-token password <insert your personal token here>

On various platforms you can hook emacs into more sophisticated password management easily enough, important details here are the hostname and login (personal-token) which is how we find the token when we need it.

Install this package

You can install this package from MELPA, see here. Then you can use M-x package-install and search for starling.

If you use use-package you perhaps want this recipie:

(use-package starling
  :ensure t)

Another variant, using use-package + straight and installing direct from the repo:

(use-package starling
:straight `(starling :type git :host codeberg :repo "draxil/starling-el"))

Otherwise it’s currently a case of cloning this repo and giving emacs access (see here for clues). You’ll need plz installed as well, using the method of your choice, or M-x package-install and choose plz.

Using the package

Currently:

  • M-x starling-transactions show the transactions from the main account. Press return (by default) to see more details.
  • M-x starling-spaces which should give a quick read on all your spaces. Press return (by default) on a space to see recent transactions.
  • M-x starling-insights whichs shows spending insights.

Transactions Screens

Default bindings, are usual for a tabulated list but also:

  • g - refresh the transactions.
  • RET - see transaction details
  • c - update the spending category for the current line (needs transaction:edit permission).

Limitations

Many! But some notable ones:

  • Only cares about one account.
  • Only gets transactions for one month.

Internals you might be interested in!

The starling--do function should allow easy access to other starling API endpoints I haven’t bothered to use yet. See that function’s documentation for more.

Contributors

Joe - draxil@gmail.com

Alex Drysdale - <reissuecardboard@duck.com>

About

Access to Starling bank info, from Emacs!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published