Skip to content

Commit

Permalink
docs: update docs for oclif
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed May 22, 2024
1 parent 5d1b3c8 commit 2f018dd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions docs/devlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
Notes taken during development, newest to oldest.

TODO:
- [ ] Switch to oclif
- [ ] Editing transactions
- [ ] Deleting transactions
- [ ] Reconciling transactions against a folder of CSVs
- [ ] https://nutjs.dev/ for getting transactions
- [ ] Investigate Plaid importing

## [[2024-05-21]]

I poked around with Plaid last week and was disappointed to figure out that there is no clear way to do authorization via CLI, everything has to run through their front-end SDK. That should work fine but I'll need to sit down and spend some time with it, time I don't really have to spare at the moment.

I've let budgeting fall behind for 3 months and now going back to handle it all. It really is such a chore to do all of this exporting and categorization.

## [[2024-04-06]]

I took a break from this project in order to work on [my other CLI project](https://github.com/joshcanhelp/api-getter). I've been looking for a CLI framework to handle the details around arguments, flags, and distribution and found what I needed in [oclif](https://oclif.io). I'm wary about adding new non-dev dependencies but this is well-maintained by a motivated company (SalesForce) and addresses a bunch of black box things around CLIs that I just don't want to deal with. It's also structured in a way that makes it easy to keep "business" logic pretty well separated from the CLI framework.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ touch output/data.csv
You should see the following output:

```
$ npm run report
$ ./bin/run.js report
🤖 Reading from ./output/data.csv
❌ No transactions found for 2023.
```
Expand Down
16 changes: 8 additions & 8 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ The first thing you will need for this to do anything for you are some transacti
Assuming we have a CSV from one of the supported banks, we can run the importer, indicating a specific file or a directory containing one or more CSV files.

```bash
$ npm run import -- --input='/path/to/directory'
$ ./bin/run.js import --input='/path/to/directory'
# ... or
$ npm run import -- --input='/path/to/directory/transactions.csv'
$ ./bin/run.js import --input='/path/to/directory/transactions.csv'
```

By default, the script will only import transactions for the current year. To import from a year in the past (or, I guess, the future), add a `year` argument to the command.

```bash
$ npm run import -- --input='/path/to/directory' --year='2022'
$ ./bin/run.js import --input='/path/to/directory' --year='2022'
```

If the command checks out, you will be prompted to confirm the import file. This will help you determine if the configuration file is working. Next, it will prompt you for the first CSV it finds from your import path. Answering `n` will move on to the next CSV found, if there is one.
Expand All @@ -42,7 +42,7 @@ You can view all of your transactions easily by just opening the CSV file that t
You can also use the command line to see transactions. To see all stored transactions:

```bash
$ npm run transactions
$ ./bin/run.js transactions
```

You'll be prompted with options to filter transactions.
Expand All @@ -52,17 +52,17 @@ You'll be prompted with options to filter transactions.
The report is kind of the whole point of this thing. You can run an annual report for the current year:

```bash
$ npm run report
$ ./bin/run.js report
```

Or specify a specific year or month:

```bash
$ npm run report -- --date='2023'
$ ./bin/run.js report --date='2023'
# ... or
$ npm run report -- --year='2023'
$ ./bin/run.js report --year='2023'
# ... or
$ npm run report -- --date='2023-02'
$ ./bin/run.js report --date='2023-02'
```

The report that is output does the following:
Expand Down

0 comments on commit 2f018dd

Please sign in to comment.