Skip to main content

Simple, free, local-first AI coding assistant. Perfect for beginners.

Project description

DevCLI

The Free, Local-First AI Coding Assistant

Claude Code's powerful interface + Free open-source models = DevCLI

License: MIT Python 3.8+ Code style: black


๐ŸŒŸ What is DevCLI?

DevCLI brings AI-powered coding assistance to everyone - completely free and private. Unlike cloud-based alternatives, DevCLI runs entirely on your machine using local models via Ollama.

The Best of Both Worlds:

  • Claude Code's intuitive chat interface โœจ
  • 100% free open-source models ๐Ÿ†“
  • Complete privacy - never leaves your machine ๐Ÿ”’

โœจ Key Features

๐Ÿ†“ Completely Free

No API costs, no subscriptions, no hidden fees. Use powerful models like DeepSeek, Llama, and Qwen without spending a dime.

๐Ÿ”’ Privacy First

Your code never leaves your machine. No telemetry, no tracking, no cloud uploads.

๐Ÿ’ฌ Interactive Chat Mode

Just type devcli and start chatting - like Claude Code, but free!

๐ŸŽฏ Project-Aware

Understands your entire codebase. Get answers with specific file names and line numbers.

๐Ÿค– Auto-Discovery

Automatically finds and configures your Ollama models. No manual setup!

๐Ÿ“Š Three Output Modes

  • Normal - Beautiful, interactive
  • Quiet - Clean, pipeable (--quiet)
  • JSON - Structured, automatable (--json)

๐Ÿš€ Quick Start

Installation

# Install DevCLI from PyPI (recommended)
pip install devcli

# Or use quick install script
curl -sSL https://raw.githubusercontent.com/YOUR_USERNAME/devcli/main/install.sh | bash

# Or install from source for development
git clone https://github.com/YOUR_USERNAME/devcli.git
cd devcli
pip install -e .

Setup

# Install Ollama (if you haven't)
# Visit: https://ollama.ai

# Pull some models
ollama pull llama3.1
ollama pull deepseek-r1:7b

# Auto-discover models
devcli models-sync

Start Chatting!

# Interactive mode (just type devcli!)
$ devcli

Welcome to DevCLI! ๐Ÿค–
Model: llama3.1
Project context: โœ“ loaded

> what does this project do?
[AI explains your project...]

> where is the authentication code?
[AI provides specific file paths...]

> exit
Goodbye! ๐Ÿ‘‹

๐Ÿ“– Usage

Interactive Mode (Recommended)

# Just type devcli to start chatting
devcli

# In-chat commands:
> /model deepseek-r1    # Switch models
> /nocontext           # Toggle project context
> /reset               # Clear history
> help                 # Show commands
> exit                 # Quit

One-Shot Questions

# Normal mode
devcli ask "what does this project do?"

# With specific model
devcli ask "where is the auth logic?" --model deepseek-r1

# Without context (generic question)
devcli ask "explain async/await" --no-context

Automation & Scripting

# Quiet mode - clean output for pipes
devcli ask "list all functions" --quiet | grep important

# JSON mode - structured data for scripts
devcli ask "analyze code" --json | jq '.response'

# Use in scripts
RESPONSE=$(devcli ask "check tests" --json | jq -r '.response')
echo "AI says: $RESPONSE"

Project Understanding

# Scan your project
cd /path/to/your/project
devcli init

# Now ask context-aware questions
devcli ask "how does the config system work?"
# โ†’ AI responds with specific file names and line numbers!

๐ŸŽฏ Comparison

DevCLI Claudish Claude Code GitHub Copilot
Cost ๐Ÿ†“ Free ๐Ÿ’ฐ API costs ๐Ÿ’ฐ $20/month ๐Ÿ’ฐ $10/month
Privacy ๐Ÿ”’ 100% local โ˜๏ธ Cloud โ˜๏ธ Cloud โ˜๏ธ Cloud
Dependencies โœ… Standalone โŒ Needs Claude Code โœ… Standalone โŒ Needs IDE
Models ๐Ÿ”“ Any Ollama model ๐Ÿ”“ OpenRouter ๐Ÿ”’ Anthropic only ๐Ÿ”’ OpenAI only
Interactive Chat โœ… Built-in โŒ Via Claude Code โœ… Yes โŒ No
Project Context โœ… Custom scan โœ… Via Claude Code โœ… Yes โš ๏ธ Limited
Offline โœ… Yes โŒ No โŒ No โŒ No
Auto-Discovery โœ… Yes โŒ No N/A N/A
JSON Output โœ… Yes โœ… Yes โŒ No โŒ No

๐Ÿ“š Commands

Core Commands

devcli                          # Interactive chat (default!)
devcli ask "question"           # One-shot question
devcli init                     # Scan project
devcli models-sync              # Auto-discover models

Configuration

devcli config-show              # View settings
devcli config-set key value     # Update setting
devcli model-add name --provider ollama --model llama3.1

Output Modes

devcli ask "question"           # Normal (beautiful)
devcli ask "question" --quiet   # Quiet (pipeable)
devcli ask "question" --json    # JSON (automatable)

See COMMANDS.md for complete reference.


๐ŸŽจ Examples

Example 1: Understand a New Codebase

$ cd unfamiliar-project/
$ devcli init
โœ“ Project initialized! 23 files scanned

$ devcli
> what does this project do?
[AI]: This is a REST API for task management built with FastAPI...

> where is the database connection code?
[AI]: The database connection is in `src/db/connection.py` lines 15-30...

> how does authentication work?
[AI]: Authentication uses JWT tokens. The logic is in:
      - `src/auth/jwt.py` (token generation)
      - `src/middleware/auth.py` (verification)

Example 2: Automation

# Find all TODO comments
devcli ask "list all TODO comments" --quiet | grep -i urgent > urgent.txt

# Check test coverage
COVERAGE=$(devcli ask "analyze test coverage" --json | jq -r '.response')
if echo "$COVERAGE" | grep -q "low"; then
    echo "โš ๏ธ  Low test coverage detected!"
fi

# Generate documentation
for file in src/*.py; do
    devcli ask "document $file" --quiet >> DOCS.md
done

Example 3: Multi-Model Comparison (Coming Soon)

# Try different models for the same task
devcli ask "optimize this function" --model llama3.1
devcli ask "optimize this function" --model deepseek-r1
devcli ask "optimize this function" --model qwen2.5

# Pick the best answer!

๐Ÿ—๏ธ Architecture

devcli/
โ”œโ”€โ”€ cli.py              # Main CLI with Typer
โ”œโ”€โ”€ config.py           # Configuration management (Pydantic)
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ scanner.py      # File scanning & filtering
โ”‚   โ””โ”€โ”€ context.py      # Project context building
โ””โ”€โ”€ providers/
    โ”œโ”€โ”€ base.py         # Provider interface
    โ””โ”€โ”€ ollama.py       # Ollama integration

Tech Stack:

  • CLI: Typer - Modern CLI framework
  • UI: Rich - Beautiful terminal output
  • Config: Pydantic - Type-safe configuration
  • Models: Ollama - Local LLM runtime

๐Ÿ—บ๏ธ Roadmap

โœ… v0.1.0 - Foundation

  • Project understanding & context
  • Ollama integration
  • Configuration system
  • Auto-discovery

โœ… v0.2.0 - Interactive

  • Interactive chat mode
  • Model switching
  • Conversation history

โœ… v0.3.0 - Polish (Current)

  • JSON output mode
  • Quiet mode
  • Professional documentation
  • MIT License

๐Ÿšง v0.4.0 - Advanced (Next)

  • Status line (model/cost/context)
  • Debug logging
  • Token usage tracking
  • Streaming responses

๐Ÿ”ฎ v0.5.0 - Power Features

  • Code editing
  • Model comparison
  • OpenRouter integration
  • RAG with embeddings

๐ŸŽฏ v1.0.0 - Production

  • PyPI release
  • CI/CD pipeline
  • Comprehensive tests
  • 1000+ GitHub stars

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Ways to contribute:

  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest features
  • ๐Ÿ“– Improve documentation
  • ๐Ÿ”ง Submit pull requests
  • โญ Star the repo!

๐Ÿ“„ License

MIT License - see LICENSE for details.


๐Ÿ™ Acknowledgments

Inspired by:

  • Claude Code - Brilliant UX and agentic workflows
  • Claudish - JSON output and quiet mode ideas
  • Aider - Pioneering AI pair programming
  • Ollama - Making local LLMs accessible

Built with:


๐ŸŒŸ Star History

Star the repo to support development! โญ


๐Ÿ“ž Support


Made with โค๏ธ by developers, for developers

Get Started ยท Documentation ยท Contributing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devcli_ai-0.3.1.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devcli_ai-0.3.1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file devcli_ai-0.3.1.tar.gz.

File metadata

  • Download URL: devcli_ai-0.3.1.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for devcli_ai-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1a2670a6da0da00809c2ecece424bf0e4b310c4231dcb2784e68bc6825aeb94d
MD5 2c0ada448ef6af10701cab3c2c6efccb
BLAKE2b-256 6e487ae3a2e456ad37c10d4231495251184e7b32ec661645c5579779478cf6bd

See more details on using hashes here.

File details

Details for the file devcli_ai-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: devcli_ai-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for devcli_ai-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a903a47559f22417f7f9289a5fd8b94424cf07825ba796d209628904c88549ca
MD5 c74197d140a2e9aeedc06bc00507bf79
BLAKE2b-256 0fd763c591321136e8b64fdaf251b3937c547a6221c12e7641aad14441582a27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page