The clocksheet CLI application is designed to interact with Google Sheets to manage and manipulate spreadsheets based on data fetched from Clockify.
- Ensure Node.js is installed on your system.
- Run
npm installin the project directory to install the necessary packages.
- Visit the Google Cloud Console.
- Create a new project.
- Navigate to "APIs & Services" > "Credentials".
- Click "Create Credentials" and select "Service account".
- Fill in the necessary details and create the service account.
- Once created, go to the service account and click "Add Key" > "JSON". Download the JSON file.
- Set path to credentials file when prompted
- In the Google Cloud Console, enable the "Google Sheets API" and "Google Drive API" for your project.
- The application looks for a configuration file at
~/.clocksheet/config.json. - This file will store project-specific configurations like spreadsheet IDs and template sheet IDs.
- The application will prompt you to enter these IDs when needed and save them to the configuration file.
- Open the Google Sheet you want to use and get its ID from the URL. It is the part between
/d/and/edit. - Similarly, get the template sheet ID from the URL or the Google Sheets interface.