n26cli

package module
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 0 Imported by: 0

README

N26 CLI

GitHub Releases Build Status codecov Go Report Card GoDevDoc Donate

An awesome tool for managing your N26 account from the terminal

Prerequisites

  • Go >= 1.17
  • Mac or Linux (dbus) (see more)

Install

TBD

Configuration

You don't need to configure the tool before using it. However, N26 requires a Device ID (in UUID format) to use its APIs. If you don't provide a specific Device ID, you may be blocked with "Too Many Login Attempts" error. Therefore, it's strongly recommended configuring beforehand.

Just run n26 config and follow the prompt, it will create a new Device ID automatically for you and persist to ~/.n26/config.toml. This config file will be automatically loaded whenever you run a command.

If you wish to remember your username (and/or password), just say yes while being asked and type it in.

$ n26 config
? Do you want to generate a new device id? No
? Do you want to save your credentials to system keychain? Yes
? Enter username (input is hidden, leave it empty if no change) >
? Enter password (input is hidden, leave it empty if no change) >

saved

The given username and password will be persisted to your system keychain/keyring, securely. If you don't want to save your password, just leave in empty. The tool will ask for it whenever you run a command. (see Authentication)

Usage

Usage:
  n26 [command]

Available Commands:
  config       configure
  help         Help about any command
  transactions show all transactions in a time period
  version      show version

Flags:
  -c, --config string   configuration file (default "~/.n26/config.toml")
  -d, --debug           debug output
  -h, --help            help for n26
  -v, --verbose         verbose output

Use "n26 [command] --help" for more information about a command.

Authentication

The tool will look for your credentials following this order, top goes first:

  • System Keychain/Keyring (if you decide to use it).
  • --username and --password from the command arguments.
  • N26_USERNAME and N26_PASSWORD from env vars.
  • If username or password is missing, the tool will ask for it.

After successfully login with your password, you will be asked to confirm the login on your device, and you will have 1 minute to do it before getting timed out.

If you do it on time, N26 will grant an access token, and the tool will persist it to your system keyring.

Security & GDPR

The tool has 0 tracking and will NEVER track your usage. Therefore, I will never know if you have any issues with it unless you create one in the board.

The tool does NOT and will NOT share your email and credentials with any other 3rd parties.

The tool will save your access token to your system keyring, and also your credentials (if you choose to save it, see the Configuration and Authentication section).

The tool NEVER shows your email and credentials on the screen, in the logs or verbose / debug output.

Development

The tool uses these libraries for working with N26 APIs and Authentication.

Tests

The tool is tested by unit tests and integration tests with mocked API server ( see nhatthm/n26api/testkit)

Donation

If you like this tool, you can give me a cup of coffee :)

Paypal donation

paypal

       or scan this

Documentation

Overview

Package n26cli provides N26 CLI application.

Directories

Path Synopsis
cmd
n26
Package main provides the main entry point for the n26 command line tool.
Package main provides the main entry point for the n26 command line tool.
features
bootstrap
Package bootstrap provides integration tests.
Package bootstrap provides integration tests.
internal
app
Package app provides functionalities for bootstrapping the app.
Package app provides functionalities for bootstrapping the app.
cli
Package cli provides cli application.
Package cli provides cli application.
command
Package command provides commands for the cli application.
Package command provides commands for the cli application.
command/transaction
Package transaction provides transaction commands.
Package transaction provides transaction commands.
io
Package io provides functionalities for io.
Package io provides functionalities for io.
service
Package service provides services to the application.
Package service provides services to the application.
service/configurator
Package configurator provides read / write functionalities to manage application configuration.
Package configurator provides read / write functionalities to manage application configuration.
time
Package time provides time functionalities.
Package time provides time functionalities.
version
Package version provides build information.
Package version provides build information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL