Notion Cli List Manager.

Published on December 2021 in Development.

Notion is a very nice online tool for “task management, project management, knowledge management” (from Wikipedia), that allows to use databases for basically everything. I made a CLI (command-line interface) for managing those databases. If you want to give it a try:

pip install notion-cli-list-manager

You can read more on the Github repository, but basically the syntax is the following:

Commands: Options:
list to display all the List not done yet. --db [id] to display a specific database. --all to display all the lists.
list add [title] to add a new List called title. [title] will be the text of the List (and the title of the associated Notion database page) --db [id] to add the entry to a specific database. Otherwise, the default database will be used.
list rm [index] to remove the List with the index index. (Command to call after list all) [index] has to be formatted either like a range and a list, or a combination of these. E.g.: 3,4,6:10:2 will remove pages 3, 4, 6, 8.
list db to display all the notion display saved in the manager. --label [LABEL] --id [ID] to add a database to the manager. --rm [LABEL] to remove a database named [LABEL] from the manager. Note that adding or removing a database to the manager does not cause the actual creation or deletion on Notion.
list set --token [token] --id [database_id] to set the token and the ID of the Notion Database you want as default. This must be executed as the first command. You can get the [token] as internal api integration here. You can get the database id from the database url: notion.so/[username]/[database_id]?v=[view_id].

Note that the project is not completed yet, so commands could change a bit.