A Scrapbox CLI in the wild
sbx project show <project>
Prints JSON for project.
Requests https://scrapbox.io/api/projects/<project>
sbx page list [--limit <limit>] <project>
Prints JSON array of pages in project.
Requests https://scrapbox.io/api/pages/<project>
--session <session>
- Specify
connect.sid
cookie value on scrapbox.io, for querying private projects.
- Specify
--jq <query>
- Run a jq query on results.
Put a JSON file like below at ~/.config/sbx/config.json
to give a default value for --session
.
{
"projects": {
"<project>": {
"session": {
"command": "<command to print session>", // or
"value": "<constant value>"
}
}
},
// default value
"default": {
"session": ...
}
}