Metadata-Version: 2.4
Name: vedant-codex
Version: 0.3.0
Summary: Local AI-agent for science & technology
Author-email: Vedant Chitre <arunakchitre@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/Probro-2009/local-codex
Project-URL: Repository, https://github.com/Probro-2009/local-codex
Project-URL: Issues, https://github.com/Probro-2009/local-codex/issues
Keywords: ollama,agent,codex,cli,ai
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: rich>=13.7.1
Requires-Dist: python-docx>=1.1.2
Requires-Dist: python-pptx>=0.6.23
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: Pillow>=10.4.0
Requires-Dist: playwright>=1.52.0
Dynamic: license-file

# Vedant Codex

A lightweight **AI-powered coding assistant CLI** inspired by tools like Codex and Cursor.

Vedant Codex allows developers to interact with an AI agent directly from the terminal to analyze projects, edit files safely, search codebases, and automate development tasks.

It integrates with **Ollama** and tool-enabled models to provide a local or hybrid AI coding workflow.

---

## Features

- AI coding assistant inside your terminal
- Safe file editing using **unified diff patches**
- File system access restricted to **allowlisted directories**
- Native .docx Word document creation and editing
- Native .pptx PowerPoint creation and editing
- Native .xlsx Excel workbook creation and editing
- Native image inspection and OCR-style readability
- Browser automation for real webpage interaction
- Built-in tools:
  - create files
  - read files
  - read Word documents (.docx)
  - read PowerPoint decks (.pptx)
  - read Excel workbooks (.xlsx)
  - inspect images (.png, .jpg, .jpeg, .webp, .gif, .bmp, .tiff)
  - browser automation (open, inspect, click, type, select, wait, read, scroll, back, keypress, screenshot)
  - search files
  - list project structure
  - apply patches
  - write Word documents (.docx)
  - write PowerPoint decks (.pptx)
  - write Excel workbooks (.xlsx)
  - run commands
  - open files in browser
  - start development servers
  - web search
- Supports **tool-calling capable models**
- Session logging
- Rolling token-based quota window
- Cross-platform support

---

## Installation
### Recommended (pipx)

Install using `pipx` for isolated CLI environments.
1. pip install pipx
2. pipx ensurepath
3. pipx install vedant-codex

### Alternative (pip)
1. pip install vedant-codex

## Run 
1. vedant

## Prerequisites
-Python (Python 3.10 or newer is recommended.)

-Ollama (Vedant Codex requires Ollama to run AI models.)

Install Ollama:

https://ollama.com/download

Initialize and download ollama.exe. 

## Usage

## Start the assistant: vedant
## Example prompts: 

Create a login.html page with modern glassmorphism UI
Search for TODO comments in this repository
Start a Python development server
List files in this project

## Configuration

Environment variables can customize behavior.

Example .env (default):
MODEL=qwen3-coder:480b-cloud
VISION_MODEL=qwen3-vl:235b-cloud
OLLAMA_HOST=http://127.0.0.1:11434
ALLOWLIST_ROOTS={{add C:/Users/path/to/workingspace or implicitly give permission to model to use any path you want.}}
DAILY_MAX_TOKENS=200000
BROWSER_MODE=
BROWSER_CHANNEL=
BROWSER_HEADLESS=0
BROWSER_USE_SAVED_PROFILE=0
BROWSER_USER_DATA_DIR=
BROWSER_PROFILE_DIR=
BROWSER_CDP_URL=
COMMERCE_BROWSER_HEADLESS=0
COMMERCE_BROWSER_USER_DATA_DIR=
COMMERCE_BROWSER_PROFILE_DIR=Default
COMMERCE_DEFAULT_PAYMENT=cod

Browser automation requires Playwright browsers after install:
`python -m playwright install chromium`

You can also drive an installed Microsoft Edge or Chrome browser channel. Useful browser settings:

- `BROWSER_MODE=background` for a dedicated persistent automation profile
- `BROWSER_MODE=personal_edge` to attach to a live personal Edge session over CDP
- `BROWSER_CHANNEL=msedge` to prefer Microsoft Edge
- `BROWSER_HEADLESS=1` to keep browser automation in the background
- `BROWSER_USE_SAVED_PROFILE=1` to try reusing the browser's regular saved profile when supported
- `BROWSER_PROFILE_DIR=Default` to target a specific browser profile inside the user data directory
- `BROWSER_USER_DATA_DIR=...` to point at a dedicated browser user-data folder if you do not want to reuse the default profile
- `BROWSER_CDP_URL=http://127.0.0.1:9222` for the personal Edge attach endpoint

Commerce/browser-shopping defaults:

- `mode="commerce"` opens a dedicated Microsoft Edge AI-agent profile instead of your personal profile
- `COMMERCE_BROWSER_USER_DATA_DIR=app\storage\browser-profiles\msedge-ai-agent` to pin the dedicated Edge agent profile location
- `COMMERCE_BROWSER_PROFILE_DIR=Default` to keep a single reusable profile directory inside that agent profile
- `COMMERCE_DEFAULT_PAYMENT=cod` to make cash on delivery the default checkout preference
- On the first commerce run, sign in manually once on the sites you use; the dedicated profile keeps those logins for later sessions

For reliable background shopping, prefer a dedicated automation profile over your everyday Edge `Default` profile. A common Windows setup is:
`BROWSER_MODE=background`
`BROWSER_CHANNEL=msedge`
`BROWSER_HEADLESS=1`
`BROWSER_USER_DATA_DIR=app\storage\browser-profiles\msedge-shopping`

Use `BROWSER_USE_SAVED_PROFILE=1` only if you explicitly want to try the normal Edge profile and are okay with launch failures when Edge is already open or the profile is locked.

For personal Edge mode, start Edge yourself with remote debugging enabled and then let the agent attach after you explicitly approve it. Example on Windows:
`msedge.exe --remote-debugging-port=9222`

With that running, the agent can use `mode="personal_edge"` and your real logged-in Edge session.

From this repo on Windows `cmd`, the simplest launcher is:
`start-personal-edge-debug.cmd`

Then verify the debug endpoint:
`curl http://127.0.0.1:9222/json/version`

For real shopping and account flows, the browser agent can navigate, search, fill non-sensitive forms, add to cart, and reach checkout across sites like Amazon, Flipkart, and Myntra. It will stop before final payment or order placement unless the user explicitly confirms the risky step.

For commerce and travel flows in `v0.3.0`, the agent can also keep a dedicated Edge AI-agent profile for sites like `amazon.in`, `flipkart.com`, `myntra.com`, `irctc.co.in`, `cleartrip.com`, and `makemytrip.com`. Use `browser_set_checkout_context` plus `browser_review_checkout` so the agent tracks COD/card preference, reviews detected payment options, and asks for a final confirmation before any order, booking, or subscription activation.

## Security

Vedant Codex is designed with safety in mind.

File system access is restricted to allowlisted directories

File edits must use reviewable diff patches

Command execution can be restricted with allowlists

Token quotas prevent runaway automation

## Development

Clone the repository: git clone https://github.com/Probro-2009/local-codex
Then: cd local-codex
Then: pip install -e .
Then: vedant

## Roadmap

Planned improvements:

persistent memory

improved tool orchestration

better project indexing

model auto-detection

improved Windows / Termux compatibility

plugin system

## Contributing

Pull requests are welcome.

If you find a bug or want a new feature, email at arunakchitre@gmail.com.
