All Projects → sebinsua → Teller Cli

sebinsua / Teller Cli

Licence: mit
🏦 Banking for your command line.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Teller Cli

Ervy
Bring charts to terminal.
Stars: ✭ 1,530 (+2450%)
Mutual labels:  cli, chart
Alert After
Get a desktop notification after a command finishes executing.
Stars: ✭ 230 (+283.33%)
Mutual labels:  cli, notifications
Kju
Kju — Improved waiting time for the adidas.com splash page ❯❯❯_
Stars: ✭ 68 (+13.33%)
Mutual labels:  cli, notifications
Houston
Apple Push Notifications; No Dirigible Required
Stars: ✭ 2,973 (+4855%)
Mutual labels:  cli, notifications
Wunderbar
Simple horizontal bar chart printer for your terminal
Stars: ✭ 572 (+853.33%)
Mutual labels:  cli, chart
Samples Viewer Generator
🎉 A CLI utility tool to generate web app of data visualization samples for presentation purpose
Stars: ✭ 13 (-78.33%)
Mutual labels:  cli, chart
Cash Cli
💰💰 Convert currency rates directly from your terminal!
Stars: ✭ 168 (+180%)
Mutual labels:  cli, money
Transity
Keep track of your 💵, 🕘, 🐖, 🐄, 🍻 on your command line
Stars: ✭ 528 (+780%)
Mutual labels:  cli, money
Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (+786.67%)
Mutual labels:  cli, chart
Yoda
Wise and powerful personal assistant, available in your nearest terminal
Stars: ✭ 674 (+1023.33%)
Mutual labels:  cli, money
Mako
A lightweight Wayland notification daemon
Stars: ✭ 944 (+1473.33%)
Mutual labels:  cli, notifications
Cli Mandelbrot
📦 View the Mandelbrot set from your terminal
Stars: ✭ 59 (-1.67%)
Mutual labels:  cli
Node Google Play Cli
command line tools using the node-google-play library
Stars: ✭ 58 (-3.33%)
Mutual labels:  cli
Changed Log
Returns all commit messages between 2 versions of an NPM module
Stars: ✭ 58 (-3.33%)
Mutual labels:  cli
12306 Cli
command line tool for 12306.cn 🚄
Stars: ✭ 58 (-3.33%)
Mutual labels:  cli
Baapan
✨ Super Cool NPM Playground right on the Node REPL ✨
Stars: ✭ 60 (+0%)
Mutual labels:  cli
Needy
A C++ library dependency helper.
Stars: ✭ 59 (-1.67%)
Mutual labels:  cli
Postgresql2websocket
Send PostgreSQL notifications over websockets
Stars: ✭ 58 (-3.33%)
Mutual labels:  notifications
Wsdirector
All the world's a server, and all the men and women merely clients
Stars: ✭ 58 (-3.33%)
Mutual labels:  cli
Q
q - Run SQL directly on CSV or TSV files
Stars: ✭ 8,809 (+14581.67%)
Mutual labels:  cli

teller-cli Build Status

Banking for your command line

This tool provides useful ways of interrogating your bank through your command line, and is not merely meant to be a one-to-one match with underlying APIs.

It uses Teller behind-the-scenes to interact with your UK bank, so you will need to have an account there.

👆 Want an account? @stevegraham can hook you up!

Usage

teller show balance current will show you your current account's balance.

teller --help for more commands.

e.g.

Instructions

Why?

Notifications with terminal-notifier

teller show balance current | terminal-notifier -title "Current Account Balance"

Notifications

Alert when 💰 low

#!/bin/sh

CURRENT_BALANCE=`teller show balance current --hide-currency`;
MIN_BALANCE=1000.00;

if (( $(bc <<< "$CURRENT_BALANCE < $MIN_BALANCE") ))
then
  echo "Your current balance has fallen below £$MIN_BALANCE" | terminal-notifier -title "💰 Alert" -subtitle "Current Balance is £$CURRENT_BALANCE";
fi

Alerts

☕️ How much money do I spend at Nanna's?

> teller list transactions current | grep "NANNA'S"
27   2015-11-12  NANNA'S             -2.70
60   2015-10-28  NANNA'S             -2.40
68   2015-10-26  NANNA'S             -5.40
101  2015-10-09  NANNA'S             -2.70
203  2015-07-17  NANNA'S             -4.60
206  2015-07-16  NANNA'S             -9.90
208  2015-07-16  NANNA'S             -9.30
209  2015-07-16  NANNA'S             -0.10

Hopefully Teller will add support for querying transactions soon.

Am I saving money with a chart 📈 with spark

> teller list balances business --interval=monthly --timeframe=year --output=spark | spark
▁▁▁▂▃▂▃▄▄▅▆█

Have I spent more money this month than I normally do?

#!/bin/sh

CURRENT_OUTGOING=`teller show outgoing current --hide-currency | sed 's/^-//'`;
OUTGOINGS=`teller list outgoings current --output=spark`;
SUM_OUTGOING=`echo "$OUTGOINGS" | sed 's/ /+/g' | bc -l | sed 's/^-//'`;
COUNT_OUTGOING=`echo "$OUTGOINGS" | wc -w | xargs`;
AVERAGE_OUTGOING=`bc <<< "scale=2; $SUM_OUTGOING / $COUNT_OUTGOING"`;

if (( $(bc <<< "$CURRENT_OUTGOING > $AVERAGE_OUTGOING") ))
then
  DIFFERENCE_OUTGOING=`bc <<< "scale=2; $CURRENT_OUTGOING - $AVERAGE_OUTGOING"`;
  echo "You've spent £$DIFFERENCE_OUTGOING more than normal." | terminal-notifier -title "💰 Spending Alert" -subtitle "Current Outgoing is £$CURRENT_OUTGOING";
fi

Keep track of your spending from the OSX Menu Bar with BitBar

Create a track-spending.1h.sh within your plugins directory:

#!/bin/sh
#
# Teller.io Banking via the OSX menu bar
# Requires:
# - a Teller.io account
# - a UK Bank
# - teller-cli: https://github.com/sebinsua/teller-cli#from-release
# - pcregrep: `brew install pcre`
#
# <bitbar.title>teller-track-spending</bitbar.title>
# <bitbar.version>v1.3.1</bitbar.version>
# <bitbar.author>Seb Insua</bitbar.author>
# <bitbar.author.github>sebinsua</bitbar.author.github>
# <bitbar.desc>Track your spending from your menu bar</bitbar.desc>
# <bitbar.image>https://camo.githubusercontent.com/e0215e6736172334f62effff36ff8df1ab38fed1/687474703a2f2f692e696d6775722e636f6d2f627638545a4c652e706e67</bitbar.image>
# <bitbar.dependencies>teller-cli, pcregrep</bitbar.dependencies>
# <bitbar.abouturl>https://github.com/sebinsua/teller-cli</bitbar.abouturl>

export PATH="/usr/local/bin:/usr/bin/:$PATH";

SPENDING_LIMIT='3000.00'; # Change this to a suitable spending limit.

exit_if_zero() {
  RETURN_CODE=$1;
  ERROR_MESSAGE=$2;
  if [ "$ERROR_MESSAGE" = "" ]; then
    ERROR_MESSAGE="Offline";
  fi;
  if [ "$RETURN_CODE" -ne 0 ]; then
    echo "$ERROR_MESSAGE|color=#7e7e7e";
    exit 1;
  fi;
}

# If we're offline we shouldn't output junk in the menu bar.
curl --connect-timeout 5 www.google.com > /dev/null 2> /dev/null;
exit_if_zero $? "Offline";

CURRENT_OUTGOING=$(teller show outgoing current --hide-currency);
exit_if_zero $? "Error";

CURRENT_BALANCE=$(teller show balance current --hide-currency);
exit_if_zero $? "Error";

LAST_TRANSACTION=$(teller list transactions | tail -n 1 | pcregrep -o1 "[0-9]+[ ]+(.*)");
exit_if_zero $? "Error";

if [ "$(echo "$CURRENT_OUTGOING > $SPENDING_LIMIT" | bc)" -ne 0 ]; then
  OVERSPEND=$(echo "scale=2; $CURRENT_OUTGOING - $SPENDING_LIMIT" | bc);
  echo "🚨 £$OVERSPEND OVERSPENT|color=red";
else
  UNDERSPEND=$(echo "scale=2; $SPENDING_LIMIT - $CURRENT_OUTGOING" | bc);
  if [ "$(echo "$UNDERSPEND > ($SPENDING_LIMIT/2)" | bc)" -ne 0 ]; then
    echo "🏦 £$UNDERSPEND remaining|color=green";
  else
    echo "🏦 £$UNDERSPEND remaining|color=#ffbf00";
  fi;
fi;
echo "---";
echo "Current Account: £$CURRENT_BALANCE";
echo "Current Outgoing: £$CURRENT_OUTGOING";
echo "Last TX: $LAST_TRANSACTION";

Tracking spending in the OSX Menu Bar

Installation

From release

> curl -L https://github.com/sebinsua/teller-cli/releases/download/v0.0.7/teller > /usr/local/bin/teller && chmod +x /usr/local/bin/teller

From source

First git clone and then:

> cargo build --release && cp ./target/release/teller /usr/local/bin && chmod +x /usr/local/bin/teller

FAQ

Compiling gives openssl/hmac.h not found error

Ensure that both Homebrew and openssl are installed, and then try running brew link --force openssl.

This relates to the following error:

--- stderr
src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' file not found
#include <openssl/hmac.h>

If brew complains about not being able to force-link openssl then you could try building like this:

OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include DEP_OPENSSL_INCLUDE=/usr/local/opt/openssl/include cargo build
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].