MCPcopy Index your code
hub / github.com/endbasic/endbasic

github.com/endbasic/endbasic @endbasic-0.14.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release endbasic-0.14.0 ↗ · + Follow
2,965 symbols 10,955 edges 126 files 1,197 documented · 40%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

The EndBASIC programming language

Test Build release Release checks Deploy to staging Deploy to release

EndBASIC is an interpreter for a BASIC-like language and is inspired by Amstrad's Locomotive BASIC 1.1 and Microsoft's QuickBASIC 4.5. Like the former, EndBASIC intends to provide an interactive environment that seamlessly merges coding with immediate visual feedback. Like the latter, EndBASIC offers higher-level programming constructs and strong typing.

EndBASIC offers a simplified and restricted environment to learn the foundations of programming and focuses on features that can quickly reward the programmer. These features include things like a built-in text editor, commands to render graphics and play sound, and commands to interact with the hardware of a Raspberry Pi.

EndBASIC is written in Rust and runs both on the web and locally on a variety of operating systems and platforms, including macOS, Windows, and Linux.

EndBASIC is free software under the AGPL v3+.

The latest version of EndBASIC is 0.14.0 and was released on 2026-07-04.

Quick start on the web

Open EndBASIC in your browser by visiting:

https://repl.endbasic.dev/

Or go the project's website at:

https://www.endbasic.dev/

The web interpreter should work on all major desktop browsers as well as mobile devices (with some small known issues on Android).

The web interpreter runs fully locally: any programs you write are persisted in your browser's local storage by default. That said, you can choose to sign up for the cloud service and upload your programs to share them with the world.

Quick start on your machine

Visit the release page to download prebuilt binaries. Once downloaded, unpack the archive and run the endbasic binary to get started.

Be aware that the binaries are not signed right now so it can be difficult to get these to run on Windows and macOS.

The binary releases are built with the recommended settings: they all include graphics support, and the builds for the Raspberry Pi include support for its hardware. To use the graphics console, you will need to launch the binary using one of these forms:

endbasic --console=sdl            # Default console size, windowed.
endbasic --console=sdl:800x600    # Custom resolution.
endbasic --console=sdl:800x600fs  # Custom resolution, full screen.
endbasic --console=sdl:fs         # Desktop resolution, full screen.

Building from source

Of course, you can also build and install EndBASIC from source by running the following command (assuming you have a Rust toolchain installed):

cargo install endbasic

The above will fetch EndBASIC from https://crates.io/, build it with default settings, and then install the resulting binary under ~/.cargo/bin/.

If you want to enable graphics support (recommended), you will first have to install the SDL2 library. Follow these steps depending on the platform you are on:

# On Debian-based systems:
sudo apt install libsdl2-dev pkg-config
cargo install --features=sdl endbasic

# On Fedora-based systems:
sudo dnf install SDL2-devel pkg-config
cargo install --features=sdl endbasic

# On FreeBSD systems:
sudo pkg install pkgconf sdl2
cargo install --features=sdl endbasic

# On macOS systems with Homebrew:
brew install pkg-config sdl2
cargo install --features=sdl endbasic

# On Windows systems, this is tricky.  The easiest way is to clone this
# repository and then do the following from PowerShell:
.\admin\setup-sdl.ps1
cargo build --release --features=sdl endbasic

If you want to enable support for the Raspberry Pi hardware (along with the recommended graphics features), do this on the Raspberry Pi itself:

sudo apt install libsdl2-dev pkg-config
cargo install --features=rpi,sdl endbasic

More information

Refer to the User's Manual for information on how to get started with EndBASIC.

Type HELP within the interpreter to access the Reference Manual.

The following documents provide more information about the structure of this repository:

Why EndBASIC?

EndBASIC started as part of my desire to teach programming to my own kids. I remember learning programming on an old Amstrad CPC 6128: the experience was unique in the sense that every command had immediate effect. Changing colors, drawing on the screen, or playing sounds were just a few keystrokes away after booting the computer, without the need to deal with separate editors and terminals. I've noticed a similar excitement in my kids when showing this to them via an emulator, so I thought I would replicate this in a more modern fashion. And here we are.

Because of this inspiration, EndBASIC's name stands for "E. and D.'s BASIC" following my kids first name initials.

Extension points exported contracts — how you extend this code

ClampedMul (Interface)
Multiplication of values into a narrower type with silent value clamping. [6 implementers]
std/src/console/graphics.rs
RawValue (Interface)
Conversions between a primitive type and a `u32` for insertion into an instruction. [4 implementers]
core/src/bytecode.rs
Clock (Interface)
Mechanism to obtain the current time to facilitate testing. [2 implementers]
web/src/store.rs
Service (Interface)
(no doc) [3 implementers]
client/src/lib.rs
DriveFactory (Interface)
Trait to instantiate drives of a given type. [6 implementers]
std/src/storage/mod.rs
Callable (Interface)
(no doc) [129 implementers]
core/src/callable.rs
ClampedInto (Interface)
Conversion between types with silent value clamping. [5 implementers]
std/src/console/graphics.rs
CharOps (Interface)
Extra operations to test properties of a `char` based on the language semantics. [1 implementers]
core/src/lexer.rs

Core symbols most depended-on inside this repo

ts
called by 381
core/src/lexer.rs
add_output
called by 350
std/src/console/readline.rs
push
called by 286
core/src/mem.rs
yx
called by 252
repl/src/editor.rs
do_error_test
called by 206
core/src/parser.rs
lc
called by 202
core/src/parser.rs
linecol
called by 188
repl/src/editor.rs
print
called by 151
std/src/console/pager.rs

Shape

Function 1,282
Method 1,256
Class 341
Enum 61
Interface 25

Languages

Rust100%
TypeScript1%

Modules by API surface

core/src/parser.rs189 symbols
core/src/vm/context.rs101 symbols
std/src/testutils.rs100 symbols
std/src/storage/mod.rs94 symbols
core/src/callable.rs83 symbols
std/src/console/readline.rs78 symbols
std/src/console/drawing.rs77 symbols
sdl/src/console.rs71 symbols
core/src/lexer.rs68 symbols
core/src/compiler/syms.rs68 symbols
std/src/console/graphics.rs66 symbols
repl/src/editor.rs66 symbols

For agents

$ claude mcp add endbasic \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact