OPEN SOURCE. OFFLINE. A LITTLE OLD SCHOOL.

Think in logic.
Build with BASIC.

An ASCII terminal. A blinking cursor. A place to turn curiosity into code. Explore loops, branching, and procedural thinking—one runnable program at a time.

Python 3.12+MIT licensedOffline core · optional AI

MEET YOUR WORKSPACE

Feels familiar.
Ready for your next program.

Edit, run, ask for help, and try again.
Everything stays right in your terminal.

Ghost BASIC's running terminal editor showing the pyramid source and its five-row star output.
Write above. See the result below.Captured from the running app
The expanded ASCII Open dialog lists calculation and learning programs from the examples folder.
A program to start with, not a blank page.F3 → choose a file → F5
Searchable offline help displaying FOR loop syntax, parameters, and use cases, alongside the keyword list.
Understand the keyword, then use it.175 offline reference topics
Code Magic docked on the right of the ASCII terminal, with the current BASIC source and program output visible on the left.
A little Magic when you need a second pair of eyes.Your Ollama Cloud key · review before applying
Ghost BASIC startup splash with a white ASCII ghost flying across the classic blue screen.
A five-second hello from your resident ghost.Animated in the app · any key to skip
42 runnable learning examples175 offline help topicsF3 → F5 open, then run
.BAS

Make something that runs.

Numbered programs, immediate commands, loops, arrays, branching, and subroutines. Save your work and pick it up again.

F1

Learn as you write.

Find a keyword's purpose, parameters, use cases, and examples. Put the cursor on a keyword and press F1 for contextual help.

LOCAL

Your terminal. Your programs.

After installation, BASIC runs offline. Open UTF-8 and DOS CP437 text, with clear compatibility notes for older programs.

F8 / CODE MAGIC

Stuck on a line?
Let a little Magic in.

Debug an error. Understand a loop. Describe a feature.
Your Ollama Cloud companion helps you take the next step.

Open F8 for Magic beside your code, and add your Ollama API key once in Settings. Magic remembers it securely and displays its check status. Magic uses your current program and last error when you include context, checks proposed BASIC syntax, and shows the changes for your review. Apply directly to the current editor when you are ready, undo with Ctrl+Z, and run with F5 to test.

BASIC and keyword help work offline. Magic is optional and sends your request and included code to Ollama Cloud.

Set up Code Magic · How to get an Ollama API key

LEARN BY CHANGING THINGS

Small programs.
Big “I get it” moments.

Predict the output. Change one value.
Press F5. Follow your curiosity.

10

Build a triangle.

Start with a row, then think in loops. Try pyramids, hollow triangles, Floyd's triangle, and a diamond.

10 FOR ROW=1 TO 5
20 FOR COL=1 TO ROW
30 PRINT "*";
40 NEXT COL
50 PRINT
60 NEXT ROW
EXPECTED OUTPUT
*
**
***
****
*****
Explore pattern exercises
20

Put input to work.

Ask for values, use a formula, and get an answer. There are 22 calculators to explore, including compound interest.

10 INPUT "Principal";P
20 INPUT "Rate percent";R
30 INPUT "Years";Y
40 I=P*R*Y/100
50 PRINT "Interest =";I
TRY 1000, 10, AND 2
Interest = 200
Explore calculation exercises
30

Go one keyword deeper.

Find out why a loop works. Every implemented keyword has a page, with planned features clearly marked.

HELP FOR
HELP INPUT
HELP MID$

REM Or put the cursor on a
REM keyword and press F1.
INSIDE EACH HELP PAGE

Purpose. Syntax. Parameters.
Use cases. Examples. Limitations.

Browse the keyword reference

YOUR NEXT LINE STARTS HERE

Meet your new
old-school workspace.

Bring Python 3.12 or newer.
The source and dependencies take care of the rest.

Need Python?

The package installs GBASIC and ghost-basic. Activate the environment to use either command directly.

TERMINAL
git clone https://github.com/tusharv/GBASIC.git
cd GBASIC
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
GBASIC
POWERSHELL
git clone https://github.com/tusharv/GBASIC.git
cd GBASIC
py -3 -m venv .venv
.venv\Scripts\python.exe -m pip install -e .
.venv\Scripts\GBASIC.exe

Uses the environment directly; PowerShell activation is optional.

F3 Open an example. F5 Run it. F1 Find your next answer.

A CLEAR PICTURE

Classic inspiration. Honest compatibility.

Ghost BASIC is an independent interpreter with a growing GW-BASIC-style subset. It is not yet a complete GW-BASIC or QBasic implementation. Execution currently requires numbered BASIC. Unnumbered QBasic files can be viewed and edited; procedures, graphics, and synthesized audio remain planned. Optional Code Magic connects to Ollama Cloud for explanations and reviewed code suggestions.

Read the compatibility report