Repository navigation
Build from Source
- Build: Python 3.12+ and the committed runtime assets. No Node.js is needed for an ordinary HTML build.
- Test: Node.js 24 and pnpm 11.25.0, in addition to Python. CI runs on Windows and Ubuntu.
git clone https://github.com/chchaoo/gpt-notebook.git
cd gpt-notebook
python tools/project.py verifyA complete source ZIP also works. Verify a fresh copy before rebuilding; do not regenerate the manifest to hide missing or changed files.
python tools/project.py buildThe output is gpt-notebook.html at the repository root. It contains the application and embedded runtime assets, with no conversations. Running it needs none of the development tools.
pnpm install --frozen-lockfile --ignore-scripts
python tools/project.py testThe test command runs JavaScript regressions, Python build tests and actual bundled-script offline startup checks. Temporary test HTML is cleaned afterward. Reinstall locked dependencies on a new machine; do not copy node_modules between systems.
gpt-notebook/
├── gpt-notebook.html # Ready-to-open blank application
├── src/ # Browser modules, template and build code
│ ├── tests/ # Synthetic regression fixtures and tests
│ ├── vendor/ # Offline runtime assets and licenses
│ └── tools/ # Optional editor bundle rebuild
├── tools/ # Build, test and sample commands
├── docs/
│ └── images/ # Actual interface screenshots
├── examples/ # Fictional archives for trying the app
└── .github/ # CI and issue templates
| Area | Files in src/
|
|---|---|
| Interface |
viewer_app.js, viewer_template.html, viewer_styles.css
|
| Data and rendering |
viewer_core.js, viewer_markdown.js
|
| Editing | viewer_editor.js |
| Files and ZIPs |
viewer_storage.js, viewer_transfer.js
|
| History |
viewer_journal.js, viewer_journal_store.js, viewer_history.js
|
| Export and print |
viewer_exports.js, viewer_print.js
|
| Search and navigation |
viewer_search.js, viewer_navigation.js, viewer_outline.js, viewer_title_index.js
|
| Translation | viewer_i18n.js |
| HTML packaging | build_viewer.py |
python tools/project.py samples regenerates the public fictional ZIPs and temporary screenshot pages in .validation/. It reads no user exports. Screenshot sources.
Only rebuild the editor bundle if changing that component. After installing dependencies, run in PowerShell:
$env:VIEWER_BUILD_DEPS = (Get-Location).Path
node src/tools/rebuild_editor.cjs
python tools/project.py build
python tools/project.py testRetain runtime licenses. After reviewed development changes, build and test before creating a new release manifest with python tools/project.py freeze. Validation scope · Publishing.