coding-agent
coding-agent is a small CLI wrapper around Google GenAI (Gemini) to run prompt-based agents that may call out to local helper functions.
This repo provides an installable package with a coding-agent command-line entry point and a Python module coding_agent for programmatic usage.
⚠️ This project expects a Gemini API key in your environment (see Configuration).
Features
- Installable package via
pip(supports editable installs for development). - Console script
coding-agentfor quick prompt runs. - Includes a
call_functionhelper module so the model can request function execution. - Designed to be small and extensible.
Quick install
From PyPI (when published):
pip install coding-agent
From local source (editable, for development):
# inside a virtualenv
pip install -e .
From local source (non-editable wheel):
python -m build
pip install dist/coding_agent-0.1.0-py3-none-any.whl
Configuration
Create a .env file in the project root (or set environment variables). At minimum set:
GEMINI_API_KEY=your_real_gemini_api_key_here
The package uses python-dotenv to load .env at runtime.
Usage
CLI
After installing (and activating your virtualenv if needed):
# Run the CLI; wrap your prompt in quotes
coding-agent "Write a Python script for calculation"
If coding-agent is not available on your PATH, you can run it with the module mode:
python -m coding_agent "Write a Python script for calculation"
Programmatic
You can call the core runner from Python:
from coding_agent.cli import run
# run returns None and prints output; you can modify run() to return values for tests
run("Write a small script that computes factorial", verbose=True)
Development
Recommended project layout: use src/ layout to avoid accidental packaging of extra top-level folders.
coding-agent/
├─ pyproject.toml
├─ README.md
├─ LICENSE
├─ src/
│ └─ coding_agent/
│ ├─ __init__.py
│ ├─ cli.py
│ ├─ __main__.py
│ ├─ config.py
│ └─ functions/
│ └─ call_function.py
├─ streamlit_app.py
├─ main.py
└─ tests/
Install development dependencies and editable install:
# inside a virtualenv
pip install -r requirements-dev.txt
pip install -e .
Made with 💖 by Swikrit and open for contributions
Metadata
Release files for coding-agent-python 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coding_agent_python-0.1.0.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| coding_agent_python-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / coding_agent_python-0.1.0.tar.gz
| Download URL | coding_agent_python-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddaf843f9982b4a92aee410d3e81653cb3b26eb183775a56dce17c33e6ff9f63
|
|
BLAKE2b-256 checksum How to use checksums |
4663053f24ff60e72fdea0cb6811454881915439e8af35913a2829d47e67018f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / coding_agent_python-0.1.0-py3-none-any.whl
| Download URL | coding_agent_python-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18053d113e2a94f0a9b655887d34533c7816a63901023519bfcd1fa3282308d2
|
|
BLAKE2b-256 checksum How to use checksums |
295f7d17881a01422cf1c6eb7f7c78bd9b23960d13c3ece7ce299d787b4b927d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|