{"id":13907772,"url":"https://github.com/kris-hansen/notion-cli","last_synced_at":"2026-01-17T04:03:42.173Z","repository":{"id":45327045,"uuid":"177588303","full_name":"kris-hansen/notion-cli","owner":"kris-hansen","description":"A CLI for Notion.so (in the tune of Taskbook)","archived":false,"fork":false,"pushed_at":"2023-12-18T23:29:11.000Z","size":9671,"stargazers_count":101,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-25T16:39:10.628Z","etag":null,"topics":["cli","notion","taskbook"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kris-hansen.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-03-25T13:07:01.000Z","updated_at":"2024-11-11T08:48:36.000Z","dependencies_parsed_at":"2023-12-19T02:28:33.668Z","dependency_job_id":"9b0adb6b-1fd7-433f-90bb-25e76768319d","html_url":"https://github.com/kris-hansen/notion-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kris-hansen/notion-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris-hansen%2Fnotion-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris-hansen%2Fnotion-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris-hansen%2Fnotion-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris-hansen%2Fnotion-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kris-hansen","download_url":"https://codeload.github.com/kris-hansen/notion-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris-hansen%2Fnotion-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265710542,"owners_count":23815375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","notion","taskbook"],"created_at":"2024-08-06T23:02:09.860Z","updated_at":"2026-01-17T04:03:42.153Z","avatar_url":"https://github.com/kris-hansen.png","language":"Python","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# *Notion CLI*\n\nIf you like this project, you might also like my other version of this [notion-cli-go] (https://github.com/kris-hansen/notion-cli-go) which is sort of the same but written in go for easier compilation and portability.\n\nIt's a CLI to track your tasks.\n\nIn a Notion page\n\n\nIn the tune of taskbook (https://github.com/klaussinani/taskbook) which is an npm package that I started using and really enjoyed; but I wanted something that was more portable across my devices and that I could also shared (i.e., it needed a back end).\n\nI started looking at Notion for this, but wanted to stay in CLI land vs. having to task back to bright colours to check my code to do's.\n\nThus, this mini project was born!\n\n\nNow uses the official Notion API!  [notion](https://developers.notion.com/) to access to the Notion page with the tasks. Previous versions used the unofficial API prior to the official API being released. This version is a rewrite to use the official API.\n\n## Install\n\n### pip\n\nYou can install from git with pip:\n\n```sh\npip install --user git+https://github.com/kris-hansen/notion-cli@latest\n```\n\n### git + virtualenv\n\nFirst, make sure you have a recent Python 3 in your path. Ubuntu and other Linux\ndistributions should already have it installed. On MacOS, you can run\n`brew install python`. For Windows, you're on your own - though note that\nbuilding the pyinstaller bundle isn't supported on Conda.\n\nTo set up the virtualenv, run `make setup`.\n\nTo source the virtualenv after it's built, run `source ./venv/bin/activate` in\nbash.\n\n### pyinstaller bundle\n\nOnce you have the git/virtualenv install set up, you may generate a portable\nsingle-file bin via pyinstaller by running `make build`. Note that the\npyinstaller build is quite slow to boot!\n\n### Testing\n\nTo run the tests, run `make test`.\n\n## Configuration\n\nIn order to run this tool, you need to define three environment variables:\n\n- `NOTION_API_KEY` - This is the API token for the API client *make sure to share your Notion page with your integration*\n- `NOTION_PAGE_ID` - This is the URL for the page (ex: https://notion.so/my-page/{pageID}) Here are some [tips] (https://developers.notion.com/docs/working-with-page-content#:~:text=Open%20the%20page%20in%20Notion,ends%20in%20a%20page%20ID.) for finding your page ID\n\nTo get a `NOTION_API_KEY` and make your task page available, you'll need to:\n\n- Sign into Notion\n- Visit [https://www.notion.so/my-integrations](https://www.notion.so/my-integrations)\n- Create a new integration\n- Share your task page with the integration\n\nSee the Notion documentation for more details.\n\nFor convenience, this project includes an example env file that you can use as\na template:\n\n```bash\ncp dev-env.source.sample .env\n${EDITOR} .env  # Fill in the fields\n```\n\n## Run\n\nTo run the tool, ensure that the virtualenv is set up and the env file is\nloaded:\n\n```bash\nsource ./venv/bin/activate\nsource .env\n\nnotion --help\n```\n\nFor convenience, you may want to put a shim in your path:\n\n```bash\n#!/usr/bin/env bash\n\nsource ${HOME}/notion-cli/venv/bin/activate\nsource ${HOME]/.config/notion/notion.env\n\nexec notion \"$@\"\n```\n\nA good location for this script may be `~/.local/bin/notion`.\n\n```bash\nusage: notion [-h] {help,add_todo,list_todos,mark_checked,del_todo} ...\n\nManage ToDo blocks using the Notion API in your CLI.\n\npositional arguments:\n  {help,add_todo,list_todos,mark_checked,del_todo}\n    help                Show this help message and exit\n    add_todo            Add a new to-do item to the specified to-do block\n    list_todos          List all to-do items in a to-do block\n    mark_checked        Mark a to-do item as complete\n    del_todo            Remove a to-do item from a to-do block\n\noptional arguments:\n  -h, --help            show this help message and exit\n```\n\n## Known Limitations\n\n- The tool only supports one Notion page right now.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkris-hansen%2Fnotion-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkris-hansen%2Fnotion-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkris-hansen%2Fnotion-cli/lists"}