Metadata-Version: 2.4
Name: brainfuck-cli
Version: 0.1.1
Summary: Compile and run Brainfuck from the command line or over HTTP on localhost:9800
Keywords: brainfuck,interpreter,compiler,esolang,cli
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Interpreters
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# brainfuck-cli

Compile and run Brainfuck from the command line, or over HTTP on `localhost:9800`.

## Install

```bash
pip install brainfuck-cli
```

## Usage

```bash
brainfuck-cli                      # start the server on localhost:9800
brainfuck-cli --port 9801          # or pick another port
brainfuck-cli run hello.bf         # run a file and print its output
brainfuck-cli run hello.bf --input "abc"
```

Server endpoints (responses are `text/plain`):

```bash
curl -X POST --data-binary @hello.bf http://localhost:9800/run
curl "http://localhost:9800/run?code=%2B%2B%2B%2B%2B%2B%2B%2B%5B%3E%2B%2B%2B%2B%5D%3E%2E"
```

- `POST /run` takes the program as the request body.
- `GET /run?code=...` takes the program in the query string.
- Add `&input=...` to feed text to the `,` command.
- `GET /` prints a short usage note.

## Language notes

- 30,000 cells, each wrapping modulo 256.
- Reading past the end of input yields 0.
- Non-command characters are treated as comments.
- Programs that exceed 10,000,000 steps are stopped with an error.

## Development

```bash
make build      # build sdist and wheel into dist/
make upload     # twine upload dist/* (installs twine if needed)
```
