Metadata-Version: 2.4
Name: codegen-cli
Version: 0.3.2
Summary: Command-line coding agent with iterative reasoning, inspired by Claude Code and Cursor CLI, powered by Google Gemini API.
Project-URL: Homepage, https://github.com/vaishnavip-23/CodeGen-CLI
Project-URL: Documentation, https://github.com/vaishnavip-23/CodeGen-CLI/blob/main/docs/README.md
Project-URL: Repository, https://github.com/vaishnavip-23/CodeGen-CLI
Author-email: CodeGen CLI Team <vaishnavipullakhandam@gmail.com>
Maintainer-email: CodeGen CLI Team <vaishnavipullakhandam@gmail.com>
License: MIT
License-File: LICENSE
Keywords: agent,ai,assistant,cli,code,coding,development,go,javascript,natural-language,programming,python,rust,universal
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.13.5
Requires-Dist: google-genai<2.0.0,>=1.9.0
Requires-Dist: python-dotenv>=1.1.0
Requires-Dist: requests>=2.32.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# CodeGen-CLI - Coding Agent
[CodeGen-CLI PyPI Package](https://pypi.org/project/codegen-cli/)

A powerful command-line coding agent with **iterative reasoning** capabilities, inspired by Claude Code and Cursor CLI, powered by Google Gemini API. Published on PyPI for easy installation and updates.

> Think of it as an expert developer assistant that never gets tired.

**BYOK (Bring Your Own Key)**: This tool requires you to provide your own Google Gemini API key. CodeGen-CLI does not include or provide API keys. You are responsible for obtaining a key and managing your API usage and costs.

## Requirements
- Python 3.10 or higher
- Google Gemini API key (get one at https://aistudio.google.com/api-keys)

## Key features
- **Conversation Memory**: Like Claude Code! Maintains context across tasks - understands "that file", "the comment", "that function" from previous interactions
- **Agentic Loop**: Iterative reasoning where agent sees results and adapts strategy for decision making
- **Natural language REPL**: Ask questions in plain English
- **Multi-turn Conversations**: Natural follow-up requests without repeating context
  ```
  You: "create test.py with a hello function"
  Agent: ✓ Created test.py
  
  You: "add a docstring to that function"
  Agent: ✓ [Knows you mean hello() in test.py]
  ```
- **Auto-detection**: Automatically detects project type (Python, JS, Go, Rust, Java, C#, PHP, Ruby) and package managers (pip, poetry, npm, yarn, cargo, etc.)
- **12 Built-in Tools**:
  - File operations: read_file, write_file, edit_file, multi_edit, delete_file
  - Search tools: list_files (ls), find_files (glob), grep
  - Execution: run_command (bash)
  - Task management: manage_todos
  - Web helpers: fetch_url, search_web
- **Safety-first**: Previews edits, filters risky folders (.env), and asks for confirmation before destructive actions

## API and Installation Guide
Get a Gemini API key from Google AI Studio and choose one of the following options
### Option 1: Use the --set-key command 
```bash
codegen --set-key YOUR_API_KEY
```
This saves the key to `~/.config/codegen/.env` so it's available for all projects.

### Option 2: Project .env file
Create a `.env` file in your project root:
```bash
GEMINI_API_KEY=your_api_key
```
> There's a `.env.example` file for your reference in the project root. Make sure to add `.env` to your `.gitignore` file!

You can use the agent in both ways:
1. Package (PyPI) — users can install and run the published package:
```bash
pip install codegen-cli
codegen
```
2. Local (from source) — users can clone the repo and run it locally:
```bash
git clone https://github.com/vaishnavip-23/CodeGen-CLI.git
cd codegen-cli
python -m codegen_cli.main
```
Or run directly with uv:
```bash 
uv run -m codegen_cli.main
```
## How to Use
Once in the REPL, you can:
- Use natural language: "find all functions named test_*"
- Use tool names directly: "read README.md", "grep 'TODO'"
- Ask for help: Type "help" for guidance
- Exit: Press Ctrl+C or Ctrl+D to exit

## License
This project uses the **MIT License**. See the `LICENSE` file for details.

*Inspired by Claude Code and Cursor CLI. Powered by Gemini.*