Organize your shell scripts in Notion and run your scripts from anywhere.
- Create a Notion Developer Integration here
- Save the token somewhere safe, will use it in step 5
- Create a Notion page
notion-sh
(spelling must be same) - Create child pages inside
notion-sh
- the name of the child page will be the shell command name
- include alphabetical characters only, like
echo
- Add code blocks for your shell scripts
NOTION_TOKEN=... npx notionsh run
- 🎉
Under the notion-sh
page, all child pages are executable commands. Grouping commands into categories are also avaliable.
In the above example, npx notionsh run
will list 4 commands:
$ npx notionsh run
✔ Loading scripts from your Notion pages...
? Execute -> echo
echo
command
command subcommand
command subcommand test
$ npx notionsh run
✔ Loading scripts from your Notion pages...
Select a script to execute:
- xxx
- xxx
...
# Or run a command directly
$ npx notionsh run COMMAND
...
Fetch your script from Notion and execute it.
USAGE
$ notionsh run
$ notionsh run COMMAND