FLASH (Fast Local Agent SHell) CLI is an AI-powered command-line interface that allows you to interact with local (or remote) Ollama models while having the ability to execute shell commands directly or through the AI.
- Interactive AI Chat: Chat with local or self-hosted models served by Ollama, directly from your terminal.
- Switchable Backend: Point Flash at
localhostor any remote Ollama server via a single config option. - Shell Command Execution:
- AI can use a
shelltool to execute commands and see their output. - Manually execute shell commands using the
!prefix.
- AI can use a
- Context Management: Automatic history trimming to stay within token limits.
- Markdown Support: Rich formatting for AI responses in the terminal.
-
Clone the repository:
git clone https://github.com/Natuworkguy/Flash cd Flash -
Install dependencies:
pip install -r requirements.txt
-
Install and start Ollama:
Flash talks to an Ollama server. Install Ollama, start it, and pull a model that supports tool calling:
ollama pull llama3.1
By default, Flash connects to a local server at
http://localhost:11434. To use a remote server, setOLLAMA_HOST(see Configuration).
python3 run.pyFLASH CLI is configured through environment variables. You can create a .flash.env file in your home directory:
MODEL=llama3.1
OLLAMA_HOST=http://localhost:11434- Local (default): leave
OLLAMA_HOSTunset, or set it tohttp://localhost:11434. - Remote server: set
OLLAMA_HOSTto the other machine, e.g.OLLAMA_HOST=http://192.168.1.50:11434orOLLAMA_HOST=https://ollama.example.com.
Make sure the target server is reachable and that MODEL has been pulled on it.
Start the CLI by running:
python run.py/helpor/?: Display the help message./model: Show the currently active model and Ollama host./clear: Clear the conversation history./bye: Exit the application.
You can run shell commands directly without AI intervention:
!ls -la!git status!echo "Hello"
Simply type your request. If the AI needs to see the contents of a file or run a command to answer your question, it can invoke the shell tool automatically. It can also search the web via Duck Duck Go and show it's reasoning.