#interpreter #befunge-interpreter #befunge #esoteric #terminal

app bft

A collection of command line tools for executing, analyzing, and visualizing Befunge code

2 unstable releases

Uses new Rust 2024

0.2.0 Aug 2, 2025
0.1.0 Jul 5, 2025

#319 in Command-line interface

Download history 9/week @ 2025-10-13 2/week @ 2025-10-20

82 downloads per month

MIT license

150KB
4K SLoC

Befunge Tools - bft

A collection of command line tools for executing, analyzing, and visualizing Befunge code.

Befunge

Befunge 93 is an esoteric programming language where

  • programs are 2-dimensional grids of u8 cells, not sequences of lines;
  • the program counter is 2-dimensional and can move up, down, left, or right!
  • instructions are ASCII characters and occupy a single cell in the grid;
  • instructions pop/push from a stack of i32 cells;
  • programs can modify themselves to store data and change program flow.

Befunge Tools currently targets Befunge 93 except that programs may be larger than 80x25. In the future, this may be updated to a new dialect with a Befunge 93 compatibility mode.

Befunge Tools

Befunge Tools is a collection of command line tools for executing, analyzing, and visualizing Befunge code.

  • the run command which is a no-frills Befunge interpreter.
    • (Planned) support use in shebang interpreter directive
  • the debug command which launches an interactive TUI environment.
    • command tab with debugger run/step/pause functionality
    • console tab with interactive virtual terminal
    • (Planned) timeline tab with time-travel debugging
    • program visualization with path-aware highlighting
    • stack visualization sidebar
    • breakpoint support

Run

Execute bft run ./path/to/file.b93 in your terminal.

Runs the program and

  • reads input from standard input,
  • writes output to standard output,
  • logs interpreter errors to standard error,
  • exits with status code 0 unless the interpreter encounters an error.

Debug - TUI Debugger

Execute bft debug ./path/to/file.b93 2> log.txt in your terminal.

(Logging will probably become configurable or automatically placed in files in the future, but for now it is printed to standard error by default for development purposes and redirecting it is recommended/expected)

Launches the interactive debugger Terminal User Interface (TUI) with the specified program loaded in.

A terminal window displaying the Terminal User Interface (TUI) of a debugger for the Befunge esoteric programming language. It is made up of Box Drawing Characters and styled with ANSI color codes. It has a main program area displaying a program for a simple guessing game that picks a random number that you try to guess,, a sidebar with an empty table titled Stack, and a set of tabs at the bottom called Console, Commands, and Timeline.
The interactive debugger UI. Click it to see a demo at asciinema.org!

Logging

The debugger automatically saves logs to ~/.bft/logs. The log level is controlled by the --log-level argument.

Dependencies

~5–10MB
~217K SLoC