Skip to content

Conversation

@cwjustice
Copy link

Add comprehensive launcher scripts for both Unix/Linux/Mac and Windows platforms to simplify the setup and launch process for Open Notebook.

Features:

  • Automatic dependency checking (uv, Node.js, npm, SurrealDB)
  • Auto-installation of missing tools where possible
  • .env file creation from template if missing
  • Frontend dependency installation
  • Sequential service startup with health checks
  • Process monitoring and graceful shutdown
  • Detailed status messages and colored output
  • Log file management

Unix/Linux/Mac:

  • launcher.sh: Bash script with cleanup trap handling
  • Automatically detects ports and provides URLs
  • Follows services with log output
  • Ctrl+C cleanly shuts down all services

Windows:

  • launcher.bat: Batch script for Windows systems
  • Starts services in separate minimized windows
  • Opens browser automatically
  • Provides instructions for stopping services

This makes it much easier for new users to get started with Open Notebook without manually running multiple commands or understanding the full architecture.

Description

Related Issue

Fixes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

How Has This Been Tested?

  • Tested locally with Docker
  • Tested locally with development setup
  • Added new unit tests
  • Existing tests pass (uv run pytest)
  • Manual testing performed (describe below)

Test Details:

Design Alignment

Which design principles does this PR support? (See DESIGN_PRINCIPLES.md)

  • Privacy First
  • Simplicity Over Features
  • API-First Architecture
  • Multi-Provider Flexibility
  • Extensibility Through Standards
  • Async-First for Performance

Explanation:

Checklist

Code Quality

  • My code follows PEP 8 style guidelines (Python)
  • My code follows TypeScript best practices (Frontend)
  • I have added type hints to my code (Python)
  • I have added JSDoc comments where appropriate (TypeScript)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran linting: make ruff or ruff check . --fix
  • I ran type checking: make lint or uv run python -m mypy .

Documentation

  • I have updated the relevant documentation in /docs (if applicable)
  • I have added/updated docstrings for new/modified functions
  • I have updated the API documentation (if API changes were made)
  • I have added comments to complex logic

Database Changes

  • I have created migration scripts for any database schema changes (in /migrations)
  • Migration includes both up and down scripts
  • Migration has been tested locally

Breaking Changes

  • This PR includes breaking changes
  • I have documented the migration path for users
  • I have updated MIGRATION.md (if applicable)

Screenshots (if applicable)

Additional Context

Pre-Submission Verification

Before submitting, please verify:

  • I have read CONTRIBUTING.md
  • I have read DESIGN_PRINCIPLES.md
  • This PR addresses an approved issue that was assigned to me
  • I have not included unrelated changes in this PR
  • My PR title follows conventional commits format (e.g., "feat: add user authentication")

Thank you for contributing to Open Notebook! 🎉

Add comprehensive launcher scripts for both Unix/Linux/Mac and Windows
platforms to simplify the setup and launch process for Open Notebook.

Features:
- Automatic dependency checking (uv, Node.js, npm, SurrealDB)
- Auto-installation of missing tools where possible
- .env file creation from template if missing
- Frontend dependency installation
- Sequential service startup with health checks
- Process monitoring and graceful shutdown
- Detailed status messages and colored output
- Log file management

Unix/Linux/Mac:
- launcher.sh: Bash script with cleanup trap handling
- Automatically detects ports and provides URLs
- Follows services with log output
- Ctrl+C cleanly shuts down all services

Windows:
- launcher.bat: Batch script for Windows systems
- Starts services in separate minimized windows
- Opens browser automatically
- Provides instructions for stopping services

This makes it much easier for new users to get started with Open
Notebook without manually running multiple commands or understanding
the full architecture.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 2 files

Prompt for AI agents (all 2 issues)

Understand the root cause of the following 2 issues and fix them.


<file name="launcher.sh">

<violation number="1" location="launcher.sh:191">
The port-detection line relies on `grep -P`, but macOS ships BSD grep without that option. On macOS this prints `grep: illegal option -- P`, so the script always falls back to 3000 even when Next.js selects a different port. Please switch to a portable pattern (e.g., grep -E + cut) so Mac users get the correct port.</violation>
</file>

<file name="launcher.bat">

<violation number="1" location="launcher.bat:110">
The SurrealDB window title doesn&#39;t match the &quot;Open Notebook*&quot; filter used in the provided taskkill command, so the suggested shutdown command leaves SurrealDB running.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

lfnovo and others added 2 commits December 20, 2025 10:52
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@lfnovo
Copy link
Owner

lfnovo commented Dec 20, 2025

Hey @cwjustice .. this is a great idea. But for this to fit most users, it's probably a good idea for us to foresee cases where SurreadlDB will be ran on docker. Perhaps the surrealdb stuff should be a flag or a warning? Maybe we should also integrate it with the Makefile for make on-up and make on-down and make on-check -- something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants