A simple command-line interface (CLI) tool for logging hours to projects. This tool allows you to easily track the time spent on different projects with optional date specifications.
-
Ensure Node.js is installed: You need Node.js to run this CLI tool. You can download it from nodejs.org.
-
Clone the repository:
git clone https://github.com/your-username/timekeeping-cli.git cd timekeeping-cli
-
Install dependencies:
npm install
-
Make the script executable:
chmod +x timekeeping.js
Run the CLI tool using the following command:
./timekeeping.js [options]
-h, --hours <number>
: Number of hours to log (required).-p, --project <name>
: Project name (required).-d, --date [date]
: Date inMM.DD
orYYYY.MM.DD
format (optional).
-
Log 2 hours to
my_project
for the current date:./timekeeping.js -h 2 -p my_project
-
Log 3.5 hours to
another_project
for September 15th:./timekeeping.js --hours 3.5 --project another_project --date 09.15
-
Log 4 hours to
my_project
for September 16th, 2023:./timekeeping.js -h 4 -p my_project -d 2023.09.16
-
Subtract 1 hour from
my_project
for September 16th, 2023:./timekeeping.js -h -1 -p my_project -d 2023.09.16