Hobbyfarm: A inventory tracking CLI

I’ve recently been interested in having a hobbyfarm. So I thought it would be cool to have a little CLI tool that I could install and then keep track of how many seeds I have of different vegetables.

I use a library called yargs to handle a lot of the command-line interaction. To store my inventory data I’m using Postgres. Which in hindsight I felt was overkill for what it’s for. In addition to that, it would make it very difficult to make this usable for someone else to use. They would have to have their own instance of Postgres running somewhere.

Lately, I’ve been thinking of how games work. I’ve been trying to see if they have databases they use or would they just save the game data in a file somewhere?

I could do the same with a JSON file.

If anyone has any insights I’d appreciate it.

SQLite3 for sure. It’s basically a text file and very portable. And that’s a cool, realword project.

(I like how you forgot to add .gitignore to the .gitignore…I do that literally every time!)

1 Like

I never add .gitignore. I thought it should be apart of the repo, so if someone else were to clone the repo it would already be set up to ignore the designated files. Could be wrong, though.

No you are exactly correct it seems. I learned something here today:

1 Like