🚧 SITE UNDER CONSTRUCTION — New content being added progressively. Stay tuned! 🚧
Plan9Basic Alien
╯ plan9basic — terminal

Write code like it's the 80s.
Run it like it's now.

A free, cross-platform BASIC interpreter with 4,000+ functions, a full GUI toolkit, AI integration, and retro coding vibes. For Windows, Linux, and Android.

⬇ Download ▶ Get the Source 📖 Documentation 💡 Examples
Plan9 Alien
👽 PLAN 9 ALIEN SAYS:

"Greetings, earthling!" I've traveled across the galaxy to bring you the simplest way to create apps. No complex frameworks, no endless configuration — just pure BASIC joy. I come in peace... and with 4,000+ built-in functions. Ready to code?


Simple. Powerful. Everywhere.

⌨️

Dead Simple

If you can type PRINT "HELLO", you can program. No boilerplate, no ceremony. Three data types, structured programming, and an interactive command-line just like the old days.

📱

Cross-Platform

Write once, run on Windows, Linux, and Android. A native engine that creates real applets. Full GUI controls, shapes, effects, animations, and media.

🤖

AI-Powered

12+ AI providers with a RAG-powered engine. Connect your own API key and chat with any of the included models. Ask questions or get coding help.


From Code to App in Minutes

╯ my_app.bas
' A simple temperature converter
LET frm# = form#("Converter", 320, 240)
label#(frm#, "Celsius:", 20, 20)
LET e# = edit#(frm#, 20, 50, 260, 36)
LET b# = button#(frm#,"Convert", 20, 100, 260, 44)
LET r# = label#(frm#, "", 20, 160)
button_onclick#(b#, "doConvert")
form_show(frm#)
END ' End of the applet
' Auxiliary function for conversion
FUNCTION doConvert(sender#) LOCAL c, f
  LET c = val(edit_text$(e#))
  LET f = c * 9 / 5 + 32
  label_text#(r#, str$(c)+"°C = "+str$(f)+"°F")
END FUNCTION
▶ Approximate result on any of the platforms
Celsius
36.5
Convert
36.5°C = 97.7°F

13 lines of code → a native app on Windows, Linux, or Android.
No build tools. No dependencies. No complexity.

Every example, with its source →


More Than You'd Expect From BASIC

4,000+
Built-in Functions

Strings, math, dates, file I/O, regex, base64, gzip — all included, no imports needed.

30+
GUI Controls

Forms, buttons, labels, text fields, lists, checkboxes, switches, images, grids, sliders, media players.

40+
Visual Effects

Blur, glow, shadow, emboss, pixelate, ripple, swirl, wave, and 20+ animated transitions.

12+
AI Providers

OpenAI, Claude, Gemini, Mistral, Groq, DeepSeek, Ollama, LM Studio, and more.

6
Animation Types

Color, float, integer, bitmap list, path, and rect animations for smooth, dynamic interfaces.

5
Color Themes

Green, Amber, White, Blue, and Pink phosphor themes. Like choosing your favorite 80s monitor.

Nostalgia

Line numbers, GOTO, GOSUB, LIST, RUN, LOAD, SAVE — the commands you remember.

0
Cost

Plan9Basic is free. No license fees, no subscriptions, no ads. Just download and create.

🤖 Built-in AI Libraries

Connect to any AI provider, from cloud giants to on-premises models. The AI engine can validate code, detect errors, correct text, and much more.

Read the AI applets, source and all →

╯ ai assistant
' Ollama (local, free) or any cloud provider
LET PROVIDER$ = "ollama"
LET MODEL$ = "gemma3:4b"
LET APIKEY$ = ""
' Create a client and send a question
LET ai# = ai_client#(PROVIDER$, APIKEY$)
LET ai# = ai_model#(ai#, MODEL$)
LET reply$ = ai_complete$(ai#, "What is the meaning of life?")
IF ai_ok(ai#) = 1 THEN
  PRINTLN reply$
ELSE
  PRINTLN ai_errormsg$()
END IF
ai_free(ai#)

Learn at Your Own Pace

📚

Language Reference

Complete syntax guide — variables, control structures, functions, data types, operators, and every keyword.

🎯

Library Guides

Detailed docs for every library — strings, math, HTTP, JSON, SQLite, GUI, effects, animations, AI. Added progressively.

💡

Example Programs

Complete programs to copy, paste, and run. From "Hello World" to GUI apps, API clients, and AI tools.


Build It Yourself

💻
The IDE
editor, output, file manager
📁 Plan9Basic.dpr
Open it in RAD Studio and press F9
The Applet Runner
one form, no editor
📁 runner/
What you ship an applet inside
The Engine
interpreter and standard library
📁 engine/
Embed it in your own Delphi application
⬇ Download it, or build it yourself →
╯ quick start
Plan9Basic v1.8 (BETA) — Ready.
> HELP
Plan9 BASIC Commands:
---------------------

NEW             Clear program
LIST [n-m]      List program
RUN             Execute program
LOAD "file"     Load from file
SAVE "file"     Save to file
FILES           List .bas files
DELETE n[-m]    Delete line(s)
RENUM [s,i]     Renumber lines
CLS             Clear screen
EDITOR          Editor mode
COMMAND         Command mode
THEME [name]    Change theme
BYE             Exit

Function Keys:
--------------

F1=Help F2=Save F3=Load/FindNext
F5=Run F7=Mode F8=Theme

Editor: Ctrl+F = Search & Replace
        Ctrl+H = Search & Replace

Themes: GREEN AMBER WHITE
        BLUE PINK

Ready.
> _

What's New

2026.08.31

⬇ The Binaries Are Back

Windows 64-bit, Windows 32-bit, Linux 64-bit and Android — each one self-contained file, with no runtime and nothing to install. They came down when the source went up, which was the wrong trade: the source shows how Plan9Basic works, and only a running copy shows what it is like. Download →

DOWNLOADS
2026.08.29

✏️ Seven New Language Features

Compound assignment with +=, -=, *= and /=, on variables and on array elements. A bare RETURN. LET with a list of names. ELSE on the same line as its IF, and ELSEIF as one word. Text joined to numbers with +. And CONST for named literals, where assigning to the name is a compile error. All seven are additions — existing programs are unaffected. Read the reference →

LANGUAGE
2026.08.29

⚡ Engine Two to Four Times Faster

A game step, timed the way a device runs it, went from 2065 ms to 516 ms. Arithmetic is 2.04x faster and array access 2.16x. Building a string in a loop is no longer quadratic — 160,000 appends went from 2.2 seconds to 18 milliseconds. Benchmarks are in the repository under tests/bench.

ENGINE
2026.08.26

👾 Tractor

A fixed shooter in the 1981 arcade tradition, and the first game here written from nothing rather than converted. Enemies fly in along curved paths instead of appearing in place; the formation breathes; the green leaders open a capture beam. Sit in it and they take your fighter — shoot that leader on its next dive and it comes back alongside you, two ships firing two shots a volley. Every ship is drawn by the program from rectangles and ellipses, with no image file anywhere. It plays on a phone too: three buttons at the foot of the screen and a tap to start again. See it running, and read the source →

EXAMPLES
2026.08.23

⛏ Space Mines, and the games in the flesh

A management game from page 24 of Computer Spacegames (Usborne, 1982), converted from a 71-line ZX81 listing: ten years running a mining colony, four decisions a year, and a colony that answers back. The rules are the book’s — every random range was measured against the listing rather than eyeballed, 20,000 samples of each. The panel is not: the same figures sit in the same place every year, so what a year cost you is something the eye can follow. And the games are now photographed rather than described: every card on the examples page carries a frame of the program running.

EXAMPLES
2026.08.22

🤖 AI and RAG, on your own machine

AILib and RAGLib now run against a local model through Ollama — no API key, and nothing leaving the machine. A new example builds a small knowledge base, retrieves only what one question needs within a token budget, and then asks the model that question twice: once bare, once with the retrieved text in front of it. The difference between the two answers is the point. Both libraries also work in a host with no window at all.

AI
2026.08.20

📁 The example catalogue, one tap away

The IDE's file picker now opens the online catalogue directly. All 97 examples are browsable and downloadable without leaving the editor — the first row of the picker, above your own files.

IDE
2026.08.20

✅ Every registered name is now exercised

6,193 assertions across the interpreter, the GUI libraries, a local model and the HTTP verbs. Coverage of the registered surface went from 77.8% to 100%. The tests were not a formality: they found that every GUI event was dead, that 63 documented handlers could never have been called, that http_urlencode$ was doing form encoding, and that StrListLib had been missed when handles started being validated. All fixed, each pinned by a test.

TESTS
2026.08.19

📦 One repository

The interpreter, the IDE and the applet runner now build from a single tree. A change stops travelling between repositories, and one command builds every target and runs every check.

STRUCTURE
2026.08.19

🧩 The interpreter no longer needs FireMonkey

Dialogs are supplied by the host application rather than reached for by the engine, and a console build proves the interpreter links without a windowing system. The groundwork for a Plan9Basic that runs anywhere, including with no screen.

ENGINE
2026.08.18

📚 The documentation is checked against the code

The reference is now verified rather than asserted: every stated signature is compared against what the interpreter actually registers, and the documentation's own code blocks are compiled. 987 internal links and 1,749 anchors resolve. Six of the applets this site hands out did not compile — they do now.

DOCS
2026.03.22

🔗 Source Code Now on GitHub

The Plan9Basic language engine and a standalone Applet Runner are now open source under the MIT License. The repository contains the full interpreter source — tokenizer, code generator, and stack-based VM — along with a cross-platform Delphi/FMX host application for running and testing Plan9Basic scripts locally. View on GitHub →

OPEN SOURCE
2026.03.16

🎮 Arcade Games

Nine fully playable arcade classics — Asteroids, Snake, Space Invaders, Breakout, Flappy Bird, 2048, Lunar Lander, Missile Command, and Whack-a-Mole — written entirely in Plan9Basic. Browse the source with syntax highlighting, copy it, or launch the game directly from the Examples page.

EXAMPLES
2026.03.01

🔧 Library Documentation Series

Deep dives into each library — GUI, effects, HTTP, JSON, AI. Published progressively.

LAUNCH
2026.02.17

🚀 Plan9Basic Website Launches

The official home of Plan9Basic is live! Download, explore the docs, and start coding.

LAUNCH
2026.02.17

📖 Core Language Documentation

Complete reference for variables, types, operators, control structures, and functions.

DOCS

Built From a Memory

In 1985, a copy of Micro Sistemas magazine arrived with a handful of BASIC games printed inside, nothing sophisticated, the typical text-based programs that circulated among hobbyists at the time. But they were enough to plant something.

Shortly after, a book arrived as a gift, more magazine than book, called Computer Spacegames (The edition I read at the time was the one released in Brazil, translated into Portuguese). One of those games was Space Mines. The player managed a mining operation on a distant planet, running cycles where decisions about workers' pay, entertainment, and conditions directly affected production. Improve salaries and morale climbed; morale climbed and output rose; output rose and word spread, drawing more miners to the colony, which made the next cycle harder to balance. Inevitably, the tipping point came: costs outran revenue, workers left, and the whole operation unravelled. The narrative it created was surprisingly rich for a few dozen lines of BASIC. My brothers and I spent hours there.

Plan9Basic is, at its core, a sentimental rescue. A way of bringing back the language that was the first door into technology, not out of nostalgia for its limitations, but out of respect for the directness it represented.

This project is truly 100% nostalgia and passion. I'm not trying to change the world here, or create a new technology that will be crucial to any area or segment. The purpose here is to remember a time that was full of learning and fun for me and that shaped my professional career. And in doing so, why not have fun during the process?

The goal has always been the same: keep the floor as low as possible while raising the ceiling as high as it can go. More libraries, more platforms, richer tooling, but always with the same principle underneath: the complexity should live in what you build, not in getting started.

A project that grows by addition for long enough stops being one project. Plan9Basic had reached three repositories — the interpreter, the IDE that hosts it, and a runner for shipping applets — with the interpreter pulled into the other two as a submodule. That is tidy on a diagram. In practice a one-line fix to the interpreter took three commits across three places, and forgetting the third produced no error at all: the runner simply kept building the previous version, quietly, for as long as nobody noticed.

So 2026 was the year the project got measured rather than extended. That turned out to be a different kind of work, and most of what it found was not where it was expected to be.

Several language bugs were sitting in plain sight, and in nearly every case the documentation was right and the code was wrong. instr was documented as returning a position and returned a flag — the implementation had computed the position and then thrown it away. Four string predicates took their arguments in the opposite order from the one every page described. A pair of functions that saved text and read it back was not, quite, a round trip. Fixing those meant changing the interpreter to match its own manual, which says something good about the manual and something poor about the tests.

So the tests came next, and the ones that already existed were audited rather than trusted. One had been passing for months while proving nothing. It claimed to show the interpreter needed no graphics framework, by compiling with that framework removed from the search path — except the compiler keeps those files beside the standard library, so nothing was ever removed. It linked 58 of them on every run and reported success. Another kept a list of known problems and never noticed that five of the files on the list had been deleted.

The lesson generalises, and it is not a comfortable one: a check is not evidence until it has been watched failing. Everything added since gets deliberately broken once, first, to see it go red.

The three repositories are one. A single command builds both applications, runs a thousand assertions, and checks that every documented function exists, that every code example on this site compiles, and that every worked result it promises is what the interpreter actually prints. These pages are verified against the language on every run, which is the only honest reason to claim they are accurate.

None of this is visible in a program you write. That is rather the point.

♡ INDIE • FREE • OPEN

One Developer.
A Lifetime of BASIC.

Plan9Basic is designed, built, and maintained by a single professional software developer — someone who has spent years working in the industry and still codes for the love of it.

The motivation for building it was simple: a BASIC interpreter that combined the immediacy of those early home computers with the capabilities expected from a modern language didn’t exist. So one was built.

Every part of it — the language engine, the standard libraries, the GUI toolkit, the AI integration, the documentation, and this website — was written by one person, in spare time, with no outside funding and no commercial pressure. That independence is not a limitation. It’s what keeps the focus on doing things right rather than doing things fast.

💖
INDEPENDENTLY DEVELOPED
Created with a focus on quality and usability
🏭
FREE TO USE
No fees, no ads
🚀
CONTINUOUSLY IMPROVING
Ongoing updates and new features
🤝
COMMUNITY SPIRIT
Feedback will certainly help with future developments
╯ about the developer
10 LET dev$ = "one person"
20 LET fuel$ = "passion + coffee"
30 LET cost = 0
40 PRINT "Made with " + fuel$
50 PRINT "Free to use."
60 GOTO 40
Back to top
BACK TO TOP ▲