Personal pre-warming for GitHub Codespaces - your setup, instant startup
Tired of waiting 5-10 minutes for Codespaces to build? spaceheater creates pre-warmed codespaces in the background that start in ~30 seconds when you need them.
- π Instant startup - Pre-built codespaces start in ~30 seconds instead of 5-10 minutes
- π€ Background building - Let codespaces build while you work on something else
- π° Cost-efficient - Stopped codespaces cost nothing (only minimal storage)
- π― Smart workflows - Interactive menus, fuzzy name matching, and auto-selection
- π§Ή Easy management - List, start, stop, and clean up codespaces effortlessly
- β° Scheduled pre-warming - Automatically maintain warm codespaces on a schedule (macOS)
# Install
git clone https://github.com/dbernard/spaceheater.git
cd spaceheater
./install.sh
# Create 3 pre-warmed codespaces
spaceheater create 3
# List your codespaces with status
spaceheater list
# Auto-select and start a clean codespace (opens in browser, vs code, or ssh)
spaceheater autostart
# Or interactively choose which one to start
spaceheater startgit clone https://github.com/dbernard/spaceheater.git
cd spaceheater
./install.shThe installer will check prerequisites, install to ~/.local/bin or /usr/local/bin, and set up shell completions.
- GitHub CLI (
gh) - installed and authenticated jq- for JSON processing- Python 3, Git, and Bash 4.0+
# macOS
brew install gh jq
# Authenticate with GitHub
gh auth loginFor detailed installation instructions, see Full Documentation.
# Create codespaces (max 3 per invocation)
spaceheater create <count>
# List all codespaces with status
spaceheater list
# Start a codespace (interactive or by name)
spaceheater start [name]
# Auto-select and start a clean codespace
spaceheater autostart
# Stop a running codespace
spaceheater stop [name]
# Delete a specific codespace
spaceheater delete <name>
# Clean up old codespaces
spaceheater clean [days]
# Show help
spaceheater helpPre-warm codespaces while you grab coffee:
spaceheater create 3 # Start building (~5-10 minutes)
# Go grab coffee - they'll auto-stop when ready
spaceheater autostart # Later, start one instantlySPACEHEATER_BRANCH=my-feature spaceheater create 2
spaceheater autostartLet spaceheater keep warm codespaces ready automatically:
# Ensure 2 warm codespaces every weekday at 8 AM
spaceheater schedule set 2 --preset weekday-morning
# Check schedule status
spaceheater schedule statusUses macOS launchd β jobs run even if your Mac was asleep at the scheduled time. See Full Guide for all presets and custom schedules.
spaceheater list
spaceheater clean 7 # Delete codespaces older than 7 daysConfigure via environment variables (all optional). Spaceheater auto-detects sensible defaults from your repository and GitHub's API.
| Variable | Default | Description |
|---|---|---|
SPACEHEATER_REPO |
Auto-detect | Repository (owner/repo) |
SPACEHEATER_BRANCH |
Auto-detect | Branch to create from |
SPACEHEATER_CONNECT |
browser | Connection method (browser, ssh, code) |
SPACEHEATER_MACHINE |
Auto-detect | Machine type |
Example:
# Override machine type
SPACEHEATER_MACHINE=premiumLinux spaceheater create 2
# Persist settings in your shell
export SPACEHEATER_CONNECT=ssh
export SPACEHEATER_MACHINE=standardLinuxSpaceheater supports optional configuration files for persistent settings without modifying your shell environment.
File hierarchy (highest priority first):
- Environment variables (always take precedence)
.spaceheater.conf- Repo-specific config (in your git repo root)~/.config/spaceheater/config- User-wide config- Auto-detected defaults
Example config file:
# ~/.config/spaceheater/config or .spaceheater.conf
REPO=myorg/myrepo
CONNECT=ssh
MACHINE=premiumLinux
BRANCH=developNote: Config files use KEY=value format without the SPACEHEATER_ prefix.
Config management commands:
# Create a new config file interactively
spaceheater config init
# Edit your config file
spaceheater config edit
# Validate config file syntax
spaceheater config validate
# Use a specific config file for one command
spaceheater create 2 --config /path/to/custom.confFor all configuration options and advanced usage, see Full Documentation.
- Full Guide - Complete documentation with all features, examples, and troubleshooting
- Installation - Detailed installation instructions
- Configuration - All configuration options
- Troubleshooting - Common issues and solutions
- Contributing - How to contribute to spaceheater
# Run the full test suite (lint + unit tests)
make test
# Check syntax
make lintTests require Bats. See Full Documentation for details.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
# Quick development setup
git clone https://github.com/dbernard/spaceheater.git
cd spaceheater
make testMIT License - see LICENSE file for details.
Note: This project is not officially affiliated with GitHub.