Our generative command-line interface (CLI) tools. Built with Effect and @effect/cli.
👾 Design. Work-in-progress.
| Commands | Description |
|---|---|
uzu primedata update |
Updates the @uzufly/primedata GitHub repo from Notion |
uzu notion export |
Exports Notion databases as raw JSON from the API |
Available options:
--logfile <path>- Write detailed Effect logs to a file (otherwise no Effect logs are displayed)--trace- Enable DevTools tracing (connects tows://localhost:34437)--quiet- Suppress console output (human messages only, logs remain according to configuration)--dry-run- Simulate execution without making any changes--no-commit- Do not create a Git commit--no-push- Do not push changes to remote--branch <name>- Branch name to use (default:PRIMEDATA_UPDATE_BRANCHorcli/primedata-update)--outdir <path>- Output directory for primedata files (default:PRIMEDATA_OUTDIRorpackages/primedata/)--filter-by-status <value>- Filter records by Notion Status property (default:all)all- Export all records regardless of status (default)done- Export only records with Status="Done"in-progress- Export only records with Status="In progress"not-started- Export only records with Status="Not started"
Logging behavior:
- Normal mode (no options): No Effect logs on STDOUT, only console output visible (human messages)
- With
--logfile: Effect logs go to the file, console output remains visible - With
--trace: Enables DevTools tracing, no logs on STDOUT, only console output visible - With
--quiet: Eliminates console output, Effect logs remain according to configuration
Combinations:
--logfile --trace: Logs to file + DevTools tracing active--logfile --quiet: Logs to file + no console output--trace --quiet: Tracing active + no console output--logfile --trace --quiet: Logs to file + tracing + no console output
NOTION_INTEGRATION_TOKEN– Notion API integration token for accessing databases.
-
LOG_LEVEL– Logging verbosity level (default:info)all– all logs including tracedebug– debug and aboveinfo– info and above (default)warning– warnings, errors and fatal errors onlyerror– errors and fatal errors onlyfatal– fatal errors onlynone– no logs
-
PRIMEDATA_OUTDIR– Output directory for primedata files (default:packages/primedata/)
- see «Log levels» in the Effect/Logging documentation;
- see «Create an internal integration» in the Notion reference documentation.
# Windows PowerShell - Basic update
$env:NOTION_INTEGRATION_TOKEN = "secret_xxxxx"
npm run cli -- primedata update
# Export only completed records with detailed logging
$env:NOTION_INTEGRATION_TOKEN = "secret_xxxxx"
$env:LOG_LEVEL = "Debug"
npm run cli -- primedata update --filter-by-status done --logfile logs.txt
# Export records in progress without pushing to remote
npm run cli -- primedata update --filter-by-status in-progress --no-push
# Export to a custom directory
npm run cli -- primedata update --outdir /path/to/custom/repo# Linux/macOS - Basic update
export NOTION_INTEGRATION_TOKEN="secret_xxxxx"
npm run cli -- primedata update
# Export only completed records with detailed logging
export NOTION_INTEGRATION_TOKEN="secret_xxxxx"
export LOG_LEVEL="Debug"
npm run cli -- primedata update --filter-by-status done --logfile logs.txt
# Export records in progress without pushing to remote
npm run cli -- primedata update --filter-by-status in-progress --no-push
# Export to a custom directory
npm run cli -- primedata update --outdir /path/to/custom/repoSingle project, with a subcommand-based CLI portable app.
Distributed under the Apache-2.0 license. See LICENSE for details.