cryptools-mirror/README.md

119 lines
6.3 KiB
Markdown
Raw Normal View History

2019-09-21 00:27:13 +00:00
# cryptools
2019-08-25 23:57:07 +00:00
### Accounting library for cryptocurrency transaction activity.
2019-08-25 23:57:07 +00:00
2020-01-18 16:40:32 +00:00
###### (The package produces a binary and accompanying library)
2019-08-28 02:33:06 +00:00
2020-10-13 04:22:21 +00:00
This is a command-line tool that calculates income, expenses, realized gains, realized losses,
and holding period from cryptocurrency activity and denominates the results in the user's home currency.
2019-10-06 01:04:13 +00:00
The default home currency is USD, but any currency can be substituted.
This tool is probably most useful for filling out a tax return or making tax planning decisions.
2019-09-21 18:41:11 +00:00
---
2019-09-21 22:11:26 +00:00
Given a [CSV input file](https://github.com/scoobybejesus/cryptools/blob/master/InputFile_CSV.md)
containing the user's entire cryptocurrency transaction history, the software will:
2019-08-30 02:45:48 +00:00
2020-01-18 16:40:32 +00:00
* record every cryptocurrency acquisition and track* it until it is disposed
2019-10-06 01:04:13 +00:00
* assign cost basis to every acquisition as of the date of purchase/exchange/receipt
* track the original acquisition date and cost basis (making adjustements for like-kind exchange treatment, if elected)
2019-08-30 02:45:48 +00:00
* compute gain or loss from the sale/exchange/disposal (including whether short-term or long-term)
* record income for incoming transactions and expenses for outgoing transactions
2019-10-06 01:04:13 +00:00
* print/export the results as CSV and TXT files
2019-08-30 02:45:48 +00:00
2020-04-05 17:16:47 +00:00
*The tracking isn't pooled by `ticker`. Rather, it's tracked at the account/wallet level.
2020-01-18 16:40:32 +00:00
2019-08-30 02:51:33 +00:00
---
2019-08-25 23:57:07 +00:00
2019-10-06 01:26:37 +00:00
### Features
2019-08-30 02:45:48 +00:00
2020-01-18 16:40:32 +00:00
* Two methods each of LIFO or FIFO (compatible w/ the concept of "specific identification")
2019-08-30 02:45:48 +00:00
2020-10-13 04:22:21 +00:00
* Ability to perform like-kind exchange treatment through a particular date
2019-08-30 02:45:48 +00:00
2020-01-18 16:40:32 +00:00
* Compatible with any (single) home currency
2019-09-01 04:49:00 +00:00
* Will export all bookkeeping journal entries (w/ `-a` or `-j`)
2020-01-18 16:40:32 +00:00
* Print menu (via `-p`) for individually choosing the desired reports
2019-10-06 01:26:37 +00:00
### Constraints
2019-08-25 23:57:07 +00:00
2019-09-21 22:11:26 +00:00
* *All* cryptocurrency-related activity for the user generally must be included in the
[CSV input file](https://github.com/scoobybejesus/cryptools/blob/master/InputFile_CSV.md).
2019-08-25 23:57:07 +00:00
2019-09-21 18:56:43 +00:00
* There can only be either one or two accounts used in a given transaction
(i.e., if a Counterparty token or Ethereum token transaction must be recorded,
2020-01-18 16:40:32 +00:00
the BTC or ETH transaction fee must be reflected in a separate transaction row).
2019-08-25 23:57:07 +00:00
2019-09-21 18:56:43 +00:00
* Manual adjustments may need to be made to the output files in cases, for example,
2019-10-06 01:26:37 +00:00
when appreciated cryptocurrency was used to make a tax-deductible charitable contribution.
2019-08-25 23:57:07 +00:00
2019-11-24 20:50:55 +00:00
* Precision is limited to eight decimal places. Additional digits will be stripped during
import and may cause unintended rounding issues.
2019-08-25 23:57:07 +00:00
## Installation
2019-10-06 01:04:13 +00:00
1. `git clone https://github.com/scoobybejesus/cryptools.git`
2. `cd cryptools`
3. `cargo build` (include `--release` for a non-debug build)
2019-08-25 23:57:07 +00:00
This will build `./target/debug/cryptools` (or `./target/release/cryptools` for a non-debug build).
2019-08-25 23:57:07 +00:00
## Usage
2019-10-06 01:04:13 +00:00
Run `./target/debug/cryptools` with no arguments (or with `--help`, or `-h`) to see usage.
2020-10-13 04:22:21 +00:00
Alternatively, run `cargo run`, in which case command-line options for `cryptools` may be entered following `--`, e.g., `cargo run -- -h`.
Running with no options/arguments will lead the user through a wizard.
To skip the wizard, there are three requirements:
* The [CSV input file](https://github.com/scoobybejesus/cryptools/blob/master/InputFile_CSV.md) is a required command line argument.
* The `-a` flag must be passed.
* The configuration settings you require are the same as default, or you set the appropriate environment variables, or you have a `.env` file.
2019-08-25 23:57:07 +00:00
2019-09-05 02:42:19 +00:00
See `/examples/` directory for further guidance,
2019-09-21 00:27:13 +00:00
or jump directly to the [examples.md](https://github.com/scoobybejesus/cryptools/blob/master/examples/examples.md) file.
2019-08-30 02:45:48 +00:00
2020-10-13 04:22:21 +00:00
###### Note: The import of your [CSV input file](https://github.com/scoobybejesus/cryptools/blob/master/InputFile_CSV.md) may fail or behave undesirably with the default configuration settings.
See [.env.example](https://github.com/scoobybejesus/cryptools/blob/master/examples/.env.example) for those defaults.
If you wish to skip the wizard but require changes to default settings, copy `.env.example` to `.env` and make your changes.
The `.env` file must be placed in the directory from which `cryptools` is run or a parent directory.
Alternatively, the respective environment variables may be set manually.
2019-08-28 02:33:06 +00:00
## Development state
2020-10-13 04:22:21 +00:00
As of fall 2020, the code does not require additional features in order for it to serve the project's founder.
At the same time, there are still bells and whistles, creature comforts, etc. that are desired and may be added.
2019-08-28 02:33:06 +00:00
Additionally, the code could use factoring or general re-working in several areas.
2020-01-18 00:24:27 +00:00
The software has been tested on Mac, Linux, and FreeBSD.
2019-09-21 22:11:26 +00:00
Additional testers/users are encouraged and welcome.
2019-08-25 23:57:07 +00:00
## Contributing
* Contributors welcome. New authors should add themselves to the `AUTHORS` file.
2020-01-18 16:40:32 +00:00
* Roadmap and todos: we're slowly working through items in [Issues](https://github.com/scoobybejesus/cryptools/issues);
feel free to tackle or add issues.
2019-08-25 23:57:07 +00:00
2019-09-21 22:11:26 +00:00
## A few words from the founder
2019-10-06 01:04:13 +00:00
I have an accounting background, I live in the US, and I am interested in cryptocurrencies.
2019-09-21 22:11:26 +00:00
When it came time to file my tax return, I had to come to grips with recording my cryptocurrency activity.
2019-10-06 01:04:13 +00:00
I initially used a spreadsheet that manually processed the activity into lots, and it quickly became clear that I needed a software solution.
2019-09-21 22:11:26 +00:00
Given my background, I had certain expectations about what this type of software would do, and I tried several online options.
I eventually created this project as a reaction to the inadequate tooling I found online.
Sure, other products have more bells and whistles, but at least I know this produces correct results
(i.e., this software specifically identifies and track all acquired assets, whereas online solutions seems to pool them together).
2020-01-18 16:40:32 +00:00
I am not a formally trained programmer, however I have come to enjoy it very much and I learn more whenever I can.
2019-09-21 22:11:26 +00:00
I originally tried to learn C++ by myself, and that was frustrating.
My first real progress was with Python, but I still didn't manage to fully develop a working program.
Luckily, I managed to stumble across a mentor who helped me write 80% of an MVP in strongly-typed Swift.
We coded our way into a corner, but I had learned enough to take the code apart and put it back together correctly and complete it.
I really enjoyed Swift, but I wanted something even more performant (and cross-platform), and Rust seemed to fit the bill.
2020-10-13 04:22:21 +00:00
I rewrote the code in Rust (also with a bit of help), and it has turned out to be a great choice.
2019-09-21 22:11:26 +00:00
2019-08-25 23:57:07 +00:00
## Legal
2020-10-13 04:22:21 +00:00
See LEGAL.txt