A small experimental terminal chat tool built to demonstrate how FunctionGemma (via Ollama tool/function calling) can be used from the command line to run simple “tools” (system/utility functions) and render results nicely in the terminal.
This project is for demo / exploration purposes only—it is not production-ready and it intentionally keeps the conversation stateless (each request is sent without previous context).
- This is a minimal CLI wrapper around
ollama.chat(...)that exposes a few Python functions as tools. - This is meant to help you quickly test how a tool-calling model behaves in a terminal workflow.
- This is not a secure shell, remote admin tool, or a production chatbot.
- This does not maintain chat context across turns (by design).
- Interactive terminal UI (prompt, history, markdown rendering)
- Ollama chat integration with tools/function calling
- Built-in demo tools:
find_largest_file(directory)— find the largest file under a directory (usesfind/du/sort)get_system_info()— basic OS/CPU/memory/disk infocheck_website(url)— HTTP status + latency check
- Python 3.8+
- Ollama installed and running
- A tool-calling capable model (default:
functiongemma)
git clone https://github.com/digitalstudium/functiongemma-shell
cd functiongemma-shell
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtPull the model:
ollama pull functiongemmapython chat.pyYou should see an interactive prompt:
You:— your inputAssistant:— formatted tool output (Markdown rendered viarich)
/help— show help/model <name>— switch Ollama model at runtime/exit— quit
Try natural language—FunctionGemma decides whether to call a tool.
- Largest file:
- “Find the largest file in /home”
- “Largest file in ./”
- System info:
- “Show system info”
- “CPU cores and memory”
- Website check:
- “Check google.com”
- “Is https://github.com reachable?”
- Stateless by design: the script does not feed previous messages back to the model.
- Local-only demo: tools run on your machine with your permissions.
- Shell command usage:
find_largest_fileuses shell commands (find,du,sort). This is a demo and not hardened against malicious input. - Tool coverage is minimal: only three tools are included to demonstrate the concept.
.
├── chat.py
└── requirements.txt
This is an experimental demo tool showing how FunctionGemma-style tool calling can be used from a terminal. Use at your own risk. Do not run it on machines where executing local commands could be unsafe.