terminal-space-program

module
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2026 License: MIT

README

terminal-space-program

Terminal-native orbital-mechanics rocket simulator. A take on Kerbal Space Program that lives in your terminal, distributed as a single static Go binary.

┌───────────────────────────────────────────────────────────┐
│ terminal-space-program — Sol         [Menu]  [Missions]   │
│ ┌─────────────────────────────────────┐ ┌───────────────┐ │
│ │    · ·                              │ │ CLOCK         │ │
│ │  ·     ·                            │ │   T+2026-04-29│ │
│ │ ·   ⊙   ·       · ⊕ ·               │ │   warp: 100x  │ │
│ │  ·     ·                            │ │               │ │
│ │    · ·                              │ │ VESSEL  PROP  │ │
│ │                                     │ │ S-IVB-1 fuel  │ │
│ │                              view:  │ │ alt 500 26000 │ │
│ └────────────────────────────── orbit ┘ │ v 7.6   Δv 6k │ │
│ [q] quit [s] system [m] burn [?] help   └───────────────┘ │
└───────────────────────────────────────────────────────────┘

Inspiration

A love letter to Kerbal Space Program, reimagined for the terminal. Plan transfers between planets and moons, fly your rocket off the pad and into orbit by hand, rendezvous and dock, stage away spent boosters, and bring a capsule home under parachute — all drawn with braille-canvas graphics and driven from the keyboard. No mouse required, no GUI, just a single binary in your terminal.

Under the hood it's a real orbital-mechanics sim: gravity, fuel, and timing all matter, the way they do in KSP.

The visual foundation was lifted (with MIT attribution) from furan917/go-solar-system. See NOTICE.md for the full acknowledgments list.

Install

# Linux x86_64
curl -L https://github.com/jasonfen/terminal-space-program/releases/latest/download/terminal-space-program-linux-amd64.tar.gz | tar xz
./terminal-space-program

Replace linux-amd64 with linux-arm64, darwin-amd64, darwin-arm64, or windows-amd64 (use the .zip variant on Windows).

No Go toolchain, no libc dance. CGO_ENABLED=0 static binaries.

Build from source
git clone https://github.com/jasonfen/terminal-space-program
cd terminal-space-program
go build ./cmd/terminal-space-program
./terminal-space-program

Requires Go 1.24 or newer.

Learn more

License

MIT. See LICENSE.

Directories

Path Synopsis
cmd
internal
missions
Package missions defines pass/fail objectives evaluated against the live sim state each Tick.
Package missions defines pass/fail objectives evaluated against the live sim state each Tick.
physics
Package physics implements the spacecraft propagation layer: state vectors, integrators (Verlet + RK4), and patched-conic SOI handling.
Package physics implements the spacecraft propagation layer: state vectors, integrators (Verlet + RK4), and patched-conic SOI handling.
planner
Package planner implements trajectory prediction (predictor) and stubs for Phase 3 maneuver-library work (hohmann, lambert) that slip past v0.1.
Package planner implements trajectory prediction (predictor) and stubs for Phase 3 maneuver-library work (hohmann, lambert) that slip past v0.1.
render
Package render holds the visual constant tables shared across screens — body color palette, UI tier colors for status / nodes / trajectory.
Package render holds the visual constant tables shared across screens — body color palette, UI tier colors for status / nodes / trajectory.
save
Package save persists and restores the simulation World as JSON.
Package save persists and restores the simulation World as JSON.
settings
Package settings holds the player's global UI preferences — currently the default visibility of each orbit-screen Chip — persisted to a standalone settings.json under $XDG_CONFIG_HOME/terminal-space-program/.
Package settings holds the player's global UI preferences — currently the default visibility of each orbit-screen Chip — persisted to a standalone settings.json under $XDG_CONFIG_HOME/terminal-space-program/.
sim
Package sim — v0.11.0+ launch-trail breadcrumb buffer.
Package sim — v0.11.0+ launch-trail breadcrumb buffer.
spacecraft
Package spacecraft holds the Spacecraft type and its mutable runtime state (current primary + state vector + fuel).
Package spacecraft holds the Spacecraft type and its mutable runtime state (current primary + state vector + fuel).
tui
tui/screens
Package screens implements the individual tea.Model screens composed by tui.App: OrbitView (C8), BodyInfo (C9), Maneuver (C20), Help (C9).
Package screens implements the individual tea.Model screens composed by tui.App: OrbitView (C8), BodyInfo (C9), Maneuver (C20), Help (C9).
tui/widgets
Package widgets provides drawille-backed canvas + lipgloss HUD helpers shared by all screens.
Package widgets provides drawille-backed canvas + lipgloss HUD helpers shared by all screens.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL