Metadata-Version: 2.5
Name: bananamendy
Version: 1.0.1
Summary: CLI and OpenAI-compatible server for local CPU inference on BananaMind-2 checkpoints
Project-URL: Homepage, https://github.com/twardoch/bananamend
Project-URL: Repository, https://github.com/twardoch/bananamend.git
Project-URL: Issues, https://github.com/twardoch/bananamend/issues
Project-URL: Changelog, https://github.com/twardoch/bananamend/blob/main/CHANGELOG.md
Author-email: Adam Twardoch <adam+github@twardoch.com>
License: Apache-2.0
Keywords: cli,huggingface,inference,llm,openai,server
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: bananamendr==1.0.1
Requires-Dist: fastapi>=0.115
Requires-Dist: fire>=0.6
Requires-Dist: huggingface-hub>=0.26
Requires-Dist: platformdirs>=4.2
Requires-Dist: pydantic>=2.7
Requires-Dist: tomli-w>=1.0
Requires-Dist: uvicorn>=0.30
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# bananamendy

CLI and persistent OpenAI-compatible server for local CPU inference on the
**BananaMind-2** chat checkpoints, on top of the Rust core
[`bananamendr`](https://pypi.org/project/bananamendr/). No PyTorch at runtime.

```bash
uv pip install bananamendy

bananamendy pull nano                      # into the Hugging Face cache
bananamendy models                         # what is cached locally
bananamendy info                           # architecture facts
bananamendy chat --prompt "Why is the sky blue?"
bananamendy chat                           # REPL
bananamendy generate --prompt "Once upon a time"
bananamendy serve                          # OpenAI-compatible on 127.0.0.1:8377
```

Point any OpenAI client at it:

```bash
curl http://127.0.0.1:8377/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model": "nano", "messages": [{"role": "user", "content": "Hi"}], "stream": true}'
```

Implemented: `GET /v1/models`, `POST /v1/chat/completions`,
`POST /v1/completions` (both with SSE streaming), `GET /health`. Sampling
parameters left out of a request fall back to your config, so the server and the
CLI behave identically.

Configuration is TOML in the platformdirs location (`bananamendy init_config`
writes it; `bananamendy config` shows the effective values), overridable with
`BANANAMENDY_*` environment variables.

Weights live in the ordinary Hugging Face cache — `HF_HOME` / `HF_HUB_CACHE` are
respected, and a checkpoint you already have is not downloaded twice. Aliases
`nano`, `mini` and `pro` expand to the `BananaMind/BananaMind-2-*-Chat` repos;
any repo id or local directory works too.

Full documentation: <https://github.com/twardoch/bananamend>

## License

Apache-2.0
