Development
Use this setup to change the server, CLI, or dashboard in the Buzz repository.
Prerequisites
Section titled “Prerequisites”Install:
- Git
- Python 3.12 or later
- uv
- Node.js 22 or later with npm
Clone the repository, then run the commands in the sections for the components you are changing.
Run The Server
Section titled “Run The Server”Install the Python and frontend dependencies, build the dashboard CSS, and start the server in development mode:
cd serveruv syncnpm cinpm run css:builduv run python -m server --dev --reloadOpen http://localhost:8080. Development mode bypasses GitHub authentication and serves deployed sites at http://<site-name>.localhost:8080.
Run the CSS watcher in another terminal while changing templates or styles:
cd servernpm run css:watchRun The CLI
Section titled “Run The CLI”Install dependencies, build the executable, and link it into your npm global binaries:
cd clinpm cinpm run buildnpm linkCreate a small site outside the CLI build directory:
mkdir -p /tmp/buzz-siteprintf '<h1>Buzz development site</h1>\n' > /tmp/buzz-site/index.htmlbuzz --server http://localhost:8080 --token dev deploy /tmp/buzz-site --subdomain my-siteThe explicit server and token options avoid saved CLI configuration. Development mode bypasses server authentication, but the CLI still requires a non-empty token before deployment.
Use npm run dev in cli/ to rebuild the CLI when source files change.
Run Tests
Section titled “Run Tests”Run the server tests:
cd serveruv run pytest tests/ -vRun the CLI tests and production build:
cd clinpm testnpm run buildIf your change affects public behavior, also update and build the documentation.
Prepare A Change
Section titled “Prepare A Change”- Keep server behavior and its tests in the same change.
- Keep CLI command definitions as the source of truth for command syntax.
- Add user-visible behavior to the appropriate guide or reference page.
- Use a Conventional Commit message because it controls CLI releases.