brainfuck-cli

Crates.iobrainfuck-cli
lib.rsbrainfuck-cli
version1.0.0
created_at2025-04-10 17:08:44.762115+00
updated_at2025-04-10 17:26:56.313925+00
descriptionA simple Brainfuck CLI interpreter written in Rust
homepage
repositoryhttps://github.com/pedroafabri/brainfuck-cli
max_upload_size
id1628611
size17,231
Pedro Augusto Fabri (pedroafabri)

documentation

README

Brainfuck CLI

A simple and educational Brainfuck interpreter written in Rust.
Supports both file execution and an interactive REPL mode.


✨ Features

  • Fully functional Brainfuck interpreter
  • REPL mode with built-in commands
  • File execution via CLI
  • Clean and minimal interface
  • Written 100% in Rust 🦀

🚀 Installation

With Cargo:

cargo install brainfuck-cli

This will install the brainfuck command globally.

🧰 Manual Installation (No Cargo)

If you don't have Rust installed or prefer not to use cargo, you can download a precompiled binary from the Releases page.

Linux/macOS:

wget https://github.com/pedroafabri/brainfuck-cli/releases/download/<version>/brainfuck
chmod +x brainfuck
sudo mv brainfuck /usr/local/bin/

Remember to change the version accordingly.

Windows:

  1. Download brainfuck.exe from the Releases page.
  2. Move it to a folder in your PATH (e.g. C:\Windows\System32 or C:\Program Files\brainfuck).
  3. Optionally, add the folder to your PATH environment variable if not already included.

Once installed, you can run brainfuck from your terminal or command prompt.

wget https://github.com/pedroafabri/brainfuck-cli/releases/download/vX.Y.Z/brainfuck
chmod +x brainfuck
sudo mv brainfuck /usr/local/bin/


---

## 🧠 Usage

### Execute a Brainfuck file:

```bash
brainfuck path/to/program.bf

Start REPL mode:

brainfuck

💬 REPL Commands

Once inside the REPL, the following commands are available:

.help   -> Display this message
.reset  -> Reset the current Brainfuck interpreter to its initial state
.exit   -> Exit this REPL session

You can also type and run Brainfuck code interactively:

+++++++[>++++++++<-]>.

📄 Example

$ brainfuck hello.bf
Hello, World!
$ brainfuck
Brainfuck Interpreter - v0.1.0
Type '.help' for available commands.
> +++++++[>++++++++<-]>.
A

🛠️ Project Status

This project is a personal learning project and a tribute to minimalism.
Contributions and suggestions are welcome!


📜 License

MIT

Commit count: 17

cargo fmt