#portfolio #command-line

app portfolio_rs

A command line tool for managing financial investment portfolios written in Rust

10 releases

0.1.9 Nov 20, 2023
0.1.8 Aug 26, 2023
0.1.7 Apr 6, 2023
0.1.6 Jan 1, 2023
0.1.1 Sep 22, 2022

#9 in Finance

Download history 1/week @ 2023-08-12 9/week @ 2023-08-19 37/week @ 2023-08-26 1/week @ 2023-09-02 19/week @ 2023-09-09 1/week @ 2023-09-16 2/week @ 2023-09-23 2/week @ 2023-09-30 3/week @ 2023-10-21 16/week @ 2023-10-28 1/week @ 2023-11-04 11/week @ 2023-11-11 26/week @ 2023-11-18 25/week @ 2023-11-25

65 downloads per month

MIT license

448 lines

portfolio_rs logo
build status badge clippy analyze status badge

A command line tool for managing financial investment portfolios written in Rust.

This project is the modern successor of finance.


Install/run via pkgx:

pkgx portfolio_rs

You can install portfolio_rs directly from cargo (via crates.io):

cargo install portfolio_rs


1. Create your portfolio file

Create a JSON file with your portfolio positions.

Look at the example data for the format and data scheme.

2. Use the subcommands to gain insight on your portfolio:

Show the current balances of your portfolio:

portfolio_rs balances <JSON_FILE>

Show the current allocation of your portfolio:

portfolio_rs allocation <JSON_FILE>

Show the performance of your portfolio:

portfolio_rs performance <JSON_FILE>

If you need help, try portfolio_rs help [SUBCOMMAND] for usage information.




Upon first run, portfolio_rs will create a default config.yml file. The location of the config file depends on the operating system. Use portfolio_rs config to print the config directory.

Probably the most useful entry in the config is portfolio_file where you can set the absolute path to a data file that will be used when no data file is passed as an argument.

Bonus: GPG Encryption

This tool supports (gpg) encrypted json files. Decrypted values are never written to disk.

portfolio_rs [COMMAND] data.json.gpg

Pro Tip: Use a plugin like vim-gnupg for editing your data file.


~429K SLoC