This guide explains how to build and deploy ClaudeWorld as a standalone Windows executable.
ClaudeWorld can be packaged into a single Windows .exe file using PyInstaller. The executable runs as a standalone desktop application with a native window (powered by pywebview + Edge WebView2) instead of opening in the default browser.
This executable includes:
- FastAPI backend server
- Pre-built React frontend rendered in a native window
- All agent configurations
- Configuration files
- Application icon
- SQLite database support
The packaged application includes a first-time setup wizard that guides users through password creation and configuration.
- Python 3.11 or 3.12 (required by PyInstaller)
- Node.js (for building the frontend)
- uv (Python package manager)
- Windows (for building Windows executables)
Install all dependencies:
make installThis will install:
- Backend Python dependencies (including PyInstaller)
- Frontend npm dependencies
make build-exeThis command will:
- Build the React frontend (
npm run build) - Package everything with PyInstaller
- Create
dist/ClaudeWorld.exe
If you prefer to build manually:
-
Build the frontend:
cd frontend npm run build cd ..
-
Run PyInstaller:
uv run pyinstaller ClaudeWorld.spec --noconfirm
-
Find the executable: The executable will be in
dist/ClaudeWorld.exe
The build is configured in ClaudeWorld.spec, which defines:
- Entry point:
backend/launcher.py - Included data:
- Frontend static files (
frontend/dist→static/) - Agent configurations (
agents/→agents/) - Backend config files (
backend/config/→backend/config/) .env.exampletemplate
- Frontend static files (
- Hidden imports: All necessary Python modules
- Excluded modules: Unused heavy libraries (tkinter, matplotlib, etc.)
The backend/launcher.py script:
- Detects if running as bundled executable or in development
- Sets up Python paths correctly
- Copies default agents to working directory
- Runs first-time setup wizard if needed
- Starts the uvicorn server
- Opens the browser automatically
After building, distribute the entire dist/ directory:
dist/
├── ClaudeWorld.exe # Main executable
└── (PyInstaller may create additional files depending on configuration)
For a single-file distribution, the current spec file creates a self-contained executable.
When users run ClaudeWorld.exe for the first time:
- Agent Setup: Default agents are copied from the bundled resources to the working directory
- Configuration Wizard (console window):
- Password creation (with confirmation)
- Display name selection
- Auto-generation of JWT secret
- Auto-start: Server starts and the application opens in a native window
- The console window is automatically hidden after startup
- To force browser mode instead:
ClaudeWorld.exe --browser
User data is stored in the same directory as the executable:
.env- User configurationagents/- Agent configurations (editable by user)claudeworld.db- SQLite database (if using SQLite)
The build automatically uses assets/icon.ico for the executable icon and taskbar. To regenerate or customize:
# Regenerate from the script (editable at scripts/generate_icon.py)
make generate-icon
# Or provide your own .ico file at assets/icon.icoThe icon is also used as the pywebview window icon at runtime.
Edit ClaudeWorld.spec:
exe = EXE(
# ... other parameters ...
name='YourAppName', # Change from 'ClaudeWorld'
)By default, the bundled executable opens in a native window using pywebview (Edge WebView2 on Windows). This provides a standalone desktop experience without browser chrome.
To use the traditional browser mode:
ClaudeWorld.exe --browserThe spec file uses console=True so the first-time setup wizard can accept keyboard input. The console window is hidden programmatically once the native window opens.
To keep the console window visible for debugging, set the environment variable:
CLAUDEWORLD_SHOW_CONSOLE=1
To include additional files in the bundle, edit ClaudeWorld.spec:
datas = [
# ... existing entries ...
('path/to/source', 'destination/in/bundle'),
]If PyInstaller can't find a module, add it to hiddenimports in ClaudeWorld.spec:
hiddenimports = [
# ... existing imports ...
'your_missing_module',
]The executable includes all dependencies. To reduce size:
- Remove unused dependencies from
pyproject.toml - Add more excludes to
ClaudeWorld.spec:excludes=[ 'tkinter', 'matplotlib', # Add more here ],
If the executable can't find configuration files or agents:
- Check that paths in
datassection ofClaudeWorld.specare correct - Verify
get_base_path()inlauncher.pyis working correctly
The setup wizard runs when .env file doesn't exist or has placeholder values. If it's not running:
- Delete the
.envfile next to the executable - Run the executable again
When running from source code:
make devThe launcher script detects this and uses source paths directly.
When running as bundled executable:
- Resources are extracted from PyInstaller bundle
- User data is stored in executable directory
- Setup wizard runs on first launch
Before distributing:
-
Test the executable:
./dist/ClaudeWorld.exe
-
Verify first-time setup:
- Delete
.envif it exists - Run the executable
- Complete the setup wizard
- Verify server starts and browser opens
- Delete
-
Test agent functionality:
- Create a new world
- Verify agents respond correctly
- Check that agent configurations are editable
-
Test database:
- Create some data (worlds, messages, etc.)
- Close and restart the executable
- Verify data persists
Current configuration creates a single-file executable. To create a multi-file bundle (faster startup):
Edit ClaudeWorld.spec:
exe = EXE(
pyz,
a.scripts,
# Remove these two lines:
# a.binaries,
# a.datas,
[],
name='ClaudeWorld',
# ... rest of config ...
)
# Add this:
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
name='ClaudeWorld'
)PyInstaller generally requires building on the target platform:
- Build Windows executables on Windows
- Build macOS executables on macOS
- Build Linux executables on Linux
For cross-platform distribution, build on each platform separately.
ClaudeWorld includes a GitHub Actions workflow (.github/workflows/release.yml) that automatically builds Windows executables.
When you create a GitHub release, the workflow:
- Builds the frontend
- Packages everything with PyInstaller
- Creates a ZIP archive
- Uploads
ClaudeWorld-Windows.zipto the release
To create a release with automatic build:
# Create and push a tag
git tag v1.0.0
git push origin v1.0.0
# Create release on GitHub
# The workflow will automatically build and attach the executableOr create the release via GitHub UI at: https://github.com/YOUR_USERNAME/YOUR_REPO/releases/new
You can also trigger the build manually from GitHub:
- Go to Actions tab
- Select "Build and Release Windows Executable"
- Click "Run workflow"
The artifact will be available for download in the workflow run.
For issues or questions:
- Check the main README for general ClaudeWorld documentation
- Review CLAUDE.md for project architecture
- Open an issue on the GitHub repository