{"id":49575150,"url":"https://github.com/rollecode/personal-assistant-cli","last_synced_at":"2026-05-03T16:10:55.318Z","repository":{"id":257952953,"uuid":"870883977","full_name":"rollecode/personal-assistant-cli","owner":"rollecode","description":"Prioritize your Todoist tasks via OpenAI and save them to Obsidian.","archived":false,"fork":false,"pushed_at":"2025-01-12T12:19:40.000Z","size":354,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-02T13:33:31.450Z","etag":null,"topics":["chatgpt","obsidian","openai","todoist","todoist-api"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rollecode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-10T20:58:25.000Z","updated_at":"2026-04-07T16:20:58.000Z","dependencies_parsed_at":"2024-11-06T10:18:15.940Z","dependency_job_id":"ce5295f1-eebb-4a83-966f-51a6a6e315ac","html_url":"https://github.com/rollecode/personal-assistant-cli","commit_stats":{"total_commits":189,"total_committers":1,"mean_commits":189.0,"dds":0.0,"last_synced_commit":"ee8d68920449990bee07030a13e0ba66a0c97db4"},"previous_names":["ronilaukkarinen/personal-assistant-cli","rollecode/personal-assistant-cli"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/rollecode/personal-assistant-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollecode%2Fpersonal-assistant-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollecode%2Fpersonal-assistant-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollecode%2Fpersonal-assistant-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollecode%2Fpersonal-assistant-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rollecode","download_url":"https://codeload.github.com/rollecode/personal-assistant-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollecode%2Fpersonal-assistant-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32575391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","obsidian","openai","todoist","todoist-api"],"created_at":"2026-05-03T16:10:54.602Z","updated_at":"2026-05-03T16:10:55.301Z","avatar_url":"https://github.com/rollecode.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Personal Assistant CLI Tool\n\n![bash](https://img.shields.io/badge/bash-%23121011.svg?style=for-the-badge\u0026color=%23222222\u0026logo=gnu-bash\u0026logoColor=white) ![Chagtgpt](https://img.shields.io/badge/OpenAI-74aa9c?style=for-the-badge\u0026logo=openai\u0026logoColor=white) ![Google Cloud](https://img.shields.io/badge/GoogleCloud-%234285F4.svg?style=for-the-badge\u0026logo=google-cloud\u0026logoColor=white) ![Obsidian](https://img.shields.io/badge/Obsidian-%23483699.svg?style=for-the-badge\u0026logo=obsidian\u0026logoColor=white) ![Todoist](https://img.shields.io/badge/todoist-badge?style=for-the-badge\u0026logo=todoist\u0026logoColor=%23ffffff\u0026color=%23E44332)\n\n## Prioritize tasks for Todoist, save a note of the briefing to Obsidian, sync Google Calendar events to Todoist as tasks 🦾\n\n\u003e [!NOTE] \n\u003e **Please note!** This project uses hardcoded Finnish language strings and is 100% meant for my personal use. The prompt is in Finnish, the tasks are in Finnish, and the output is in Finnish. If you want to use this, you need to modify the script to your own language and needs.\n\nThis is a Bash-based tool that prioritizes your daily tasks using [OpenAI's GPT-4o-mini model](https://openai.com/index/gpt-4o-mini-advancing-cost-efficient-intelligence/). It integrates tasks from Todoist and events from Google Calendar to create a comprehensive view of your day, allowing you to make informed decisions about what to prioritize.\n\nThis tool is perfect for those individuals like me who have 5+ events per day with 20+ tasks per day. It helps you focus on the most important tasks and meetings, ensuring you make the most of your time.\n\n## Usage\n\n```\nUsage: app.sh [--days \u003cnumber\u003e] [--debug]\n  --days \u003cnumber\u003e  Process the next \u003cnumber\u003e of days\n  --debug          Enable debug mode\n  --killswitch     Exit immediately in the defined position for debugging\n  --force          Force the script to run even if the schedule has already been made for the day\n  --start-day      Start processing tasks from a specific day (format: YYYY-MM-DD)\n  --one-batch      Process all days in one batch, requires --days and --start-day\n  --no-scheduling  Skip task scheduling completely, only generate notes\n```\n\n## Cronjob\n\nIt is recommended to run this script as a cronjob. Here is an example cronjob that runs the script every day at 8:00 AM:\n\n```bash\n0 8 * * * SHELL=/bin/bash TZ=Europe/Helsinki LANG=fi_FI.UTF-8 bash /path/to/personal-assistant-cli/app.sh \u003e\u003e /tmp/personal-assistant.log 2\u003e\u00261\n```\n\nThe cron job for daily summary to Obsidian:\n\n```bash\n58 23 * * * bash /path/to/personal-assistant-cli/personal-assistant-cli/tasks/daily-log.sh \u003e/dev/null 2\u003e\u00261\n```\n\nTodoist backup and sync every 10 minutes:\n\n```bash\n*/10 * * * * bash /path/to/personal-assistant-cli/personal-assistant-cli/tasks/todoist-backup-and-sync.sh \u003e/dev/null 2\u003e\u00261\n```\n\n## Features\n\n- Support for macOS and Linux.\n- Saves a note of the prioritized tasks and reasoning behind them to Obsidian Vault. Please see: [Setting up a headless Obsidian instance for syncing](https://rolle.design/setting-up-a-headless-obsidian-instance-for-syncing).\n- **Sorts through Todoist tasks** for the day.\n- **Integrates Google Calendar events** for the day, syncs and times them back to Todoist as actual Todoist tasks.\n- Uses **OpenAI GPT-4o-mini** to prioritize tasks and meetings.\n- Outputs a **formatted and prioritized list** of tasks in markdown format.\n- **Automatically postpones tasks** based on AI recommendations.\n- **Schedules task times and durations** based on AI recommendations.\n- **Supports multiple days** with the `--days` option, you can pre-schedule the whole week.\n- **Gets energy levels** from Oura.\n- **Daily log!** - Lists and summarizes completed Todoist tasks to Obsidian with AI feedback\n- **Todoist backup and sync to Obsidian** - Syncs all tasks to Obsidian as markdown and completed tasks back to Todoist\n\n## Software and hardware requirements\n\n- Bash shell\n- macOS or Linux\n- Paid ChatGPT API key\n- Todoist API key\n- Google Cloud OAuth 2.0 credentials\n- Oura ring and API key\n\n## Package requirements\n\nThese packages are auto-installed by the script.\n\n- `curl`\n- `jq`\n- `ggrep` (for macOS users)\n- `homebrew` (for macOS users)\n- `coreutils` (for macOS users)\n\n## Setup\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/ronilaukkarinen/personal-assistant-cli.git\ncd personal-assistant-cli\n```\n\n### Create a `.env` File\n\nCopy .env.example to .env:\n\n```bash\ncp .env.example .env\n```\n\nThe prompt need to be super accurate. Otherwise this won't work properly. You can add your own background info to bginfo prompts, it should be about who you are, what you do, what you like, what you don't like, what you want to achieve, etc. Work-related prompts should contain the top priorities of your company and your own work schedule. The more accurate the prompts are, the better the results will be.\n\n\u003e **Note**: For help generating your Todoist API key, visit [Todoist Developer Portal](https://developer.todoist.com/).\n\u003e\n\u003e For creating Google Cloud OAuth 2.0 credentials, follow [this guide](https://github.com/insanum/gcalcli/blob/521bf2a4a41f6830d561dc1993275ca152428596/docs/api-auth.md). In short, go to [Google Cloud Console](https://console.cloud.google.com/) and create credentials for your application from there.\n\n#### Get API token (GOOGLE_API_TOKEN)\n\nDirect the user to Google's OAuth 2.0 URL to authenticate:\n\n```bash\n# Open in browser: https://accounts.google.com/o/oauth2/auth?client_id=GOOGLE_CLIENT_ID\u0026redirect_uri=http://localhost\u0026response_type=code\u0026scope=https://www.googleapis.com/auth/calendar.readonly\n```\n\nAfter the user authorizes access, you'll get an authorization code. Use the following curl command to exchange the authorization code to the caps part `AUTHORIZATION_CODE` in the curl command:\n\n```bash\nsource .env\ncurl -X POST https://oauth2.googleapis.com/token \\\n  -d \"client_id=${GOOGLE_CLIENT_ID}\" \\\n  -d \"client_secret=${GOOGLE_CLIENT_SECRET}\" \\\n  -d \"redirect_uri=http://localhost\" \\\n  -d \"grant_type=authorization_code\" \\\n  -d \"code=AUTHORIZATION_CODE\"\n```\n\nAdd to your \"refresh_token\" part to the GOOGLE_REFRESH_TOKEN part in your .env.\n\nAdd to your env:\n\n```ini\nGOOGLE_REFRESH_TOKEN=\"YOUR_REFRESH_TOKEN\"\n```\n\n#### Get Google Calendar IDs\n\nFollow these steps to locate the Calendar ID in Google Calendar:\n\n1. **Open Google Calendar Website:**\n   - Go to [Google Calendar](https://calendar.google.com/).\n\n2. **Select the Calendar:**\n   - In the left sidebar, you'll see a list of calendars. Click the three dots (menu) next to the calendar you want the ID for, then select **Settings and sharing**.\n\n3. **Find the Calendar ID:**\n   - In the calendar settings, scroll down to the section labeled **Integrate calendar**.\n   - The **Calendar ID** is displayed in this section.\n     - For **public calendars**, it will usually be in the format: `xxxxxx@group.calendar.google.com`.\n     - For **private calendars** (such as personal calendars), the ID may be your email address: `user@gmail.com`.\n\n### Example Calendar IDs:\n\n- **Public Calendar**: `example123@group.calendar.google.com`\n- **Private Calendar**: `user@gmail.com`\n\nYou will need this Calendar ID when making API calls to Google Calendar.\n\nAdd these to your .env.\n\n### Set up hardcoded prompts in openai.sh\n\nYou need to set up your own hardcoded prompts in openai.sh. This is the most important part of the script. The more accurate the prompts are, the better the results will be. The prompt will clarify metadata format of the tasks and events that the AI will use to prioritize your day.\n\nMetadata needs to be in the following format:\n\n```bash\n(Metadata: id: \"1234567890\", priority: \"1-4\", duration: \"0-999\", datetime: \"YYYY-MM-DDTHH:MM:SS\", backlog: \"true/false\")\n```\n\n### Run the Script\n\nYou can run the script using the following command:\n\n```bash\nbash app.sh\n```\n\n### Debugging (Optional)\n\nTo view detailed raw responses from OpenAI, use the `--debug` flag:\n\n```bash\nbash app.sh --debug\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n- [Roni Laukkarinen](https://github.com/ronilaukkarinen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollecode%2Fpersonal-assistant-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frollecode%2Fpersonal-assistant-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollecode%2Fpersonal-assistant-cli/lists"}