{"id":26250584,"url":"https://github.com/basemax/brainfuck-interpreter-python","last_synced_at":"2026-05-22T17:31:32.834Z","repository":{"id":282109721,"uuid":"947516326","full_name":"BaseMax/brainfuck-interpreter-python","owner":"BaseMax","description":"Brainfuck Interpreter in Python is a fully featured Brainfuck interpreter written in Python. It supports interactive mode, executing code from files, or running raw Brainfuck code passed as command-line arguments.","archived":false,"fork":false,"pushed_at":"2025-03-12T20:30:37.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T21:28:33.876Z","etag":null,"topics":["brainfuck","brainfuck-debugger","brainfuck-interpreter","brainfuck-interpreters","brainfuck-language","brainfuck-parser","brainfuck-programs","interpreter","interpreter-design","lexer","parser","py","py3","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-12T20:11:48.000Z","updated_at":"2025-03-12T21:08:43.000Z","dependencies_parsed_at":"2025-03-12T21:39:27.790Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/brainfuck-interpreter-python","commit_stats":null,"previous_names":["basemax/brainfuck-interpreter-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fbrainfuck-interpreter-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fbrainfuck-interpreter-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fbrainfuck-interpreter-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fbrainfuck-interpreter-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/brainfuck-interpreter-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243437969,"owners_count":20290864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brainfuck","brainfuck-debugger","brainfuck-interpreter","brainfuck-interpreters","brainfuck-language","brainfuck-parser","brainfuck-programs","interpreter","interpreter-design","lexer","parser","py","py3","python","python3"],"created_at":"2025-03-13T16:19:57.200Z","updated_at":"2025-12-26T17:42:39.972Z","avatar_url":"https://github.com/BaseMax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brainfuck Interpreter in Python\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nBrainfuck Interpreter in Python is a fully featured Brainfuck interpreter written in Python. This interpreter is a port and improvement over the original C version by Fabian Mastenbroek. It supports interactive mode, executing code from files, or running raw Brainfuck code passed as command-line arguments.\n\n## Features\n\n- **Interactive Console:** Launch an interactive session to enter Brainfuck code.\n- **File Mode:** Execute Brainfuck code stored in `.bf` files.\n- **Raw Code Execution:** Provide raw Brainfuck code directly on the command line.\n- **Piped Input:** Execute Brainfuck code provided via standard input.\n- **Error Handling:** Clear error messages for parse errors and runtime errors (e.g. tape overruns/underruns).\n- **Modular Codebase:** Clean, well-documented code split into modular functions for parsing, execution, and CLI handling.\n\n## Installation\n\n### Requirements\n\n- Python 3.6 or later\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/BaseMax/brainfuck-interpreter-python.git\ncd brainfuck-interpreter-python\n```\n\nThere is no additional installation step required; the interpreter is contained within a single Python script.\n\n## Usage\n\nYou can run the interpreter in several ways:\n\n### Interactive Mode\n\nIf you run the interpreter without any arguments, it will start in interactive mode:\n\n```bash\npython3 brainfuck-interpreter.py\n```\n\nThen, enter Brainfuck code at the prompt (\u003e\u003e ). Use Ctrl-D (or Ctrl-Z on Windows) to exit.\n\n### Running a File\n\nIf an argument ends with .bf, the interpreter treats it as a file containing Brainfuck code:\n\n```bash\npython3 brainfuck-interpreter.py program.bf\n```\n\n### Running Raw Code\n\nIf an argument does not end with .bf, it is treated as raw Brainfuck code:\n\n```bash\npython3 brainfuck-interpreter.py \"++++++++[\u003e++++++++\u003c-]\u003e+.[-]\u003c\"\n```\n\n### Piped Input\n\nYou can also pipe Brainfuck code into the interpreter:\n\n```bash\necho \"+++++[\u003e+++++\u003c-]\u003e.\" | python3 brainfuck-interpreter.py\n```\n\n## Command Line Options\n- `-h, --help`\n\nShow the help message.\n\n- `-v, --version`\n\nShow version information.\n\nThe interpreter automatically distinguishes between file paths (ending with .bf) and raw Brainfuck code provided as arguments.\n\n## Contributing\n\nContributions are welcome! If you have ideas for improvements or bug fixes, please fork the repository and open a pull request. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Author\n\n© 2025 Max Base (Seyyed Ali Mohammadiyeh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fbrainfuck-interpreter-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fbrainfuck-interpreter-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fbrainfuck-interpreter-python/lists"}