Basher is a CLI AI Agent that interacts with OpenAI-compatible LLM API for executing coding tasks.
The only tool Basher ever uses is Bash. Whether it’s finding, reading, or editing files, Basher always generates a small Bash script to get the job done.
To use Basher, ensure you have Python 3 installed. Basher only uses Python standard library. No other Python dependencies are required.
But Basher depends on these command line utils:
rgfd
Please make sure you have installed them.
First, you can create an AGENTS.md as context file.
To run Basher, you'll need to set a few environment variables prior to execution:
BASHER_API_ENDPOINT: The API endpoint for the OpenAI-compatible LLM service. e.g.https://openrouter.ai/api/v1/.BASHER_API_KEY: Your API key for authenticating with the LLM service.BASHER_MODEL: The model to use for interaction. e.g.moonshotai/kimi-k2.5.
You can run the Basher CLI from your terminal like this:
export BASHER_API_KEY='your_api_key_here'
python basher.py 'your task here`'Basher executes arbitrary Bash commands generated by LLM, which can be dangerous without proper isolation. We recommend running Basher inside a sandbox to protect your system.
This project provides a basher.firejail.profile for use with Firejail, a Linux security sandbox. The profile ensures that:
- Basher can only modify files in your current working directory;
- Basher cannot read other files in your home directory (your browser cookies, passwords, etc. are safe);
- Basher cannot modify
.gitin your current working directory. When Basher messed up your project, you can usegit resetto recover.
Run Basher with Firejail:
firejail --profile=basher.firejail.profile python basher.py "your task here"The MIT License
Copyright (c) 2026 Mistivia <i@mistivia.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.