Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/ql.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Code QL
name: CI

on:
push:
branches: [main]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
pull_request:
branches: [main]

Expand All @@ -12,7 +15,26 @@ permissions:
security-events: write

jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install linux deps
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev

- name: Run tests
run: cargo test --verbose

analyze:
name: CodeQL Analysis
runs-on: ubuntu-latest

steps:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,46 @@ env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install linux deps
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev

- name: Run tests
run: cargo test --verbose

analyze:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: rust

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

build:
name: Build ${{ matrix.target }}
needs: [test, analyze]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bags"
version = "0.1.1"
edition = "2021"
version = "0.1.2"
edition = "2024"
license = "MIT"

[dependencies]
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# bags ⚉

[![CI](https://github.com/vdo/bags/actions/workflows/ql.yml/badge.svg)](https://github.com/vdo/bags/actions/workflows/ql.yml)
[![Release](https://github.com/vdo/bags/actions/workflows/release.yml/badge.svg)](https://github.com/vdo/bags/actions/workflows/release.yml)

A crypto price and portfolio tracker for the terminal.

```
bags ⚉ Markets · Favourites · Portfolio │ MCap:3.2T BTC:61.2% F&G:72 Greed 32s ago
────────────────────────────────────────────────────────────────────────────────────────
# Name Ticker Price 1h% 24h% 7d% 24h Hi 24h Lo Volume MCap
1 Bitcoin BTC 97,342.10 +0.3% +2.1% +5.4% 98,100.00 95,200.00 32.1B 1.9T
2 Ethereum ETH 3,241.55 -0.1% +1.8% +3.2% 3,300.10 3,180.00 18.4B 389.2B
...
```
![demo](assets/demo.gif)


## Features

- **Three tabs** -- Markets (top 50), Favourites, Portfolio
- **Encrypted storage** -- SQLCipher-encrypted local database, password unlock on launch
- **Privacy lock** -- Auto-locks UI and DB after configurable minutes of inactivity (off/1/5/10/15/30)
- **Price charts** -- Sparkline graphs with 1D/7D/30D views, supply info, active alerts
- **Portfolio tracking** -- Add holdings, see total value, P&L and % gain per coin
- **Profit & loss** -- Auto-records buy price on first add; override with `b`
Expand All @@ -24,10 +22,11 @@ A crypto price and portfolio tracker for the terminal.
- **Filter** -- Press `/` to fuzzy-filter coins by name or ticker in real time
- **Mouse support** -- Click rows, scroll wheel, click tabs
- **24h range** -- High/low columns in the table
- **Currency in headers** -- Price column shows active currency, e.g. `Price(USD)`
- **Notifications** -- Desktop (notify-rust) and/or push (ntfy.sh), configurable in settings
- **Custom coins** -- Search and add any coin from CoinGecko
- **API key support** -- Optional CoinGecko Pro / CoinMarketCap keys
- **Multi-currency** -- USD, EUR, GBP, JPY, BTC, ETH, and more
- **Multi-currency** -- USD, EUR, GBP, JPY, AUD, CAD, CHF, CNY, KRW, INR, BRL, BTC, ETH
- **11 color themes** -- Dark, dark-blue, dark-green, light, bubblegum, no-color, ...
- **Configurable refresh** -- Default 60s, minimum 30s
- **Error logging** -- Errors logged to `~/.config/bags/errors.log` with timestamps
Expand Down Expand Up @@ -81,6 +80,7 @@ First run prompts you to set a password. Subsequent runs unlock with that passwo
refresh_interval_secs: 60
currency: usd
theme: dark
privacy_lock_minutes: 0 # 0 = off, or 1/5/10/15/30
```

## Data
Expand All @@ -99,8 +99,6 @@ Press `S` to open settings. Use `j`/`k` to navigate, `h`/`l` to cycle options, `
- **CoinMarketCap API Key** -- Optional
- **Notifications** -- none / desktop / ntfy / both
- **Ntfy Topic** -- Your ntfy.sh topic for push alerts
- **Privacy Lock** -- Auto-lock after inactivity: off / 1 / 5 / 10 / 15 / 30 minutes

---

> *"Everyone has a plan until they check their portfolio."*
> -- Mike Tyson, mass holder of bags
Binary file added assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading