Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

qbsh icon

Docker Repository on Quay

QBSH - Quick BASIC Shell

This is an attempt at making a command line shell with QB64. Unhandled commands are offloaded to the native shell (bash, etc.). While it's reached a point of mild sanity, your mileage may vary, so use this at your own risk.

Try it with podman or docker:

podman run --pull=always --rm -it


To compile this with qb64 (Windows users, use qb64.exe):

qb64 -x $PWD/qbsh.bas -o $PWD/qbsh

It's also possible to load this into the QB64 GUI and then press F11 to compile it from there if a GUI is preferred.

Containerize it

qbsh is now available through You can now run it with podman or Docker:

podman run --pull=always --rm -it

Build it yourself

A portable Containerfile is provided for use in podman or docker with podman build -t qbsh . . Note that this is a multi-stage Containerfile so older Docker versions (such as in RHEL 7) will not work, but podman should generally work.

Once it's done, you can run it with:

podman run --rm -it localhost/qbsh

Shell Syntax

The syntax is very, well, basic. It's simple commands (usually upper-case) with simple arguments. If all else fails, it will attempt to run the command in the default system shell for the user (ie, bash, cmd, etc.), but anything interactive with the system shell likely won't work.


Typing "HELP" (or "help") will bring up a quick list of some command possibilities. While this is periodically updated, it is not an exhaustive list.

  • 8BALL - Answers to life's deepest questions
  • CALC - Add, Subtract, Multiply, and Divide
  • CHDIR - Change working directory (also, CD)
  • CLEAR - Clear the current screen
  • DATE - Today's Date
  • DELETE - Delete a file. (ERA and ERASE also work.)
  • DEVICES - Display info about attached input devices
  • ENV <Optional Key> - Print Environment
  • MAKEDIR <directory> - Make a new directory
  • OS - Print the operating system type
  • PIP <DEST>=<SRC> - Copy a file to a new path, CP/M style.
  • PLAY <Notes> - Make some music and rock out
  • PRINT - Output some text (is there an echo in here?)
  • RAND <Optional Limit> - Random number generator, defaults to 0-10 and supports negative numbers
  • READFILE <file> - Output some text file to terminal (cat and TYPE also work)
  • RENAME <File/Dir> <New Name> - Rename a file or directory (also, MOVE, NAME, or REN)
  • RMDIR <Directory> - Delete a directory
  • TIME - Current time
  • WHO AM I - Sometimes we all forget, right? (USER also works)

Commands can also be ran ad-hoc apart from scripting or interactive shell by passing them with qbsh -x.


qbsh can be scripted using the above commands in a file. See the examples directory to get started. To run a script just run qbsh with the script file.

$ qbsh examples/hello.qsh

Scripts can be padded with empty lines or indents. To add comments, just begin the line with a single quote (').

Scripting specific commands

Additional commands specific to scripts:

  • LPRINT - Output some text without a new space after. Useful for chaining command outputs on the same line of output.


Current code architecture is that the MAIN loop routes the input to the appropriate sub via GoSub and a loop, so no GoTo's are currently used. Eventually this may get big enough to refactor into other files, but for now all sub/labels are given alphabetically with a one line code comment above describing what they do.

Here's a list of low hanging fruit for ways this can be improved:

  • Optionally break out of the GUI window on launch and use existing terminal
  • Eliminate the file buffer from system shell calls as this is not great for security and less cross-compatible with Windows, etc.
  • Add native means of listing contents of the current directory
  • Add a means of storing output to a re-usable var in the shell
  • Feed commands through the shell in a script file
  • Ship container images on and/or Docker Hub


Run-time tests are in /test . They can be ran during Container build time with podman (or docker):

podman build --tag qbsh --skip-unused-stages=false .

How To Pronounce it

"Queue Bee Shell"