Greg: CLI tool for goal reminders

It is new year's eve in 2019. This is the last night of the decade. Pretty eventful night, right?

I love new year's because it is a chance to restart something. Every new beginning for me is sweet; each morning is a new day. Each week is a new fresh week. Each month is a new month and each year is a new opportunity to improve myself in some way. I have been setting goals each year for the past few years. Its fun to go back and review my past goals. Most of the time I have adopted a new habit, but some times I complete forget about it. It's not a big deal though-- new beginnings!

Yesterday I thought it would be cool if I had a command line tool to set my goals and then I could run the program every day and get a reminder of one of my goals I set. So, with an itch to scratch I had to make it a reality. I whipped up a CLI program in PHP - I tend to do that a lot. I call it 'greg' which means 'Greg Regularly Evokes Goals.' You can find greg on github if you want to try it out yourself. Or just install it with composer. I'm assuming you have PHP and composer installed on your machine.

Then you can run commands like greg list to get a list of goals you have set. There are none yet when you first start.

Run greg add to add a new goal. It prompts you to enter your goal:

$ greg add
Enter the goal you would like to add:

Then I type in my goal:

Enter the goal you would like to add: Write a blog post about greg
Added new goal:
✱ Write a blog post about greg (since 2019-12-31) [27166]

Now when you run greg list it will tell you your goals you have set and when you set them.

$ greg list
1. Write a blog post about greg (since 2019-12-31) [27166]

Let's add a few more goals to get more than one goal saved. You can also just add the text of the goal right after the word add too.

$ greg add
Enter the goal you would like to add: Write a new song before March 2020
Added new goal:
✱ Write a new song before March 2020 (since 2019-12-31) [38841]

$ greg add Another goal I should complete before too long
Added new goal:
✱ Another goal I should complete before too long (since 2019-12-31) [10684]

$ greg add Profit!
Added new goal:
✱ Profit! (since 2019-12-31) [83983]

Now you can see all your goals together.

$ greg list
1. Write a blog post about greg (since 2019-12-31) [27166]
2. Write a new song before March 2020 (since 2019-12-31) [38841]
3. Another goal I should complete before too long (since 2019-12-31) [10684]
4. Profit! (since 2019-12-31) [83983]

Now with your goals populated, you can run greg remind or just greg by itself to get a reminder of one your goals for the day (it always randomly picks one for each day).

$ greg remind
Greg's goal reminder for today (2019-12-31):
◈ Another goal I should complete before too long (since 2019-12-31) [10684]

Then if you complete a goal you can run greg complete. It will ask you which goal you completed.

$ greg complete
1. Write a blog post about greg (since 2019-12-31) [27166]
2. Write a new song before March 2020 (since 2019-12-31) [38841]
3. Another goal I should complete before too long (since 2019-12-31) [10684]
4. Profit! (since 2019-12-31) [83983]
Which goal would you like to mark complete?

You can enter the number to the left or the unique id in the square brackets at the end of the goal.

Which goal would you like to mark complete? 1
Marked the following goal as complete:
☑ Write a blog post about greg (since 2019-12-31) [27166]

That's it! It's going to be used every day by me to keep my goals top of mind each day.

For your information, it stores your goals in your home folder in a json file at ~/.greg/goals.json

I have plans to be able to tell greg my progress of each goal by telling it if I am on track or slipping or failing to keep my goal and I can add brief notes about my progress to be reviewed if I want to track how I am doing.

Happy new year!