How ramzygirgis/cli-coding-agent works
This is an in-terminal Gemini coding agent. A user prompt enters the loop in main.py; the agent sends it to Gemini, executes requested filesystem or Python tools, returns tool results to Gemini, and prints the final response. The tools operate within the configured calculator/ working directory, which is the sample project the README describes. The graph reflects the documented inspect-edit-run workflow; wiring beyond the sampled tool implementations is limited to what the README and visible dispatch code support.
Main entry points: main.py Agent loop · call_function.py Tool dispatcher · calculator Working directory · calculator/main.py Calculator CLI
Components 14
Agent loop
- Agent loop
main.py - Agent config
config.py - System prompt
prompts.py
Model integration
- Gemini API
Workspace tools
- Tool dispatcher
call_function.py - List files
functions/get_files_info.py - Read file
functions/get_file_content.py - Write file
functions/write_file.py - Run Python
functions/run_python_file.py
Sample project
- Working directory
calculator - Calculator CLI
calculator/main.py - Calculator engine
calculator/pkg/calculator.py - JSON renderer
calculator/pkg/render.py
Other components
- User
Connections 17
- User → Agent loop: submits prompt
- Agent loop → Agent config: reads settings
- Agent loop → System prompt: loads instructions
- Agent loop → Gemini API: sends prompt
- Gemini API → Agent loop: returns response
- Agent loop → Tool dispatcher: dispatches calls
- Tool dispatcher → List files: invokes tool
- Tool dispatcher → Read file: invokes tool
- Tool dispatcher → Write file: invokes tool
- Tool dispatcher → Run Python: invokes tool
- List files → Working directory: lists entries
- Read file → Working directory: reads files
- Write file → Working directory: writes files
- Run Python → Working directory: executes within
- Agent loop → User: prints answer
- Calculator CLI → Calculator engine: evaluates expression
- Calculator CLI → JSON renderer: formats result