Skip to main content

LuckyD Code

CI Python License: MIT PyPI

A full-featured AI coding assistant for your terminal and browser, powered by the DeepSeek API. Features 35+ built-in tools, a semantic knowledge graph, Playwright browser automation, multi-agent orchestration, Docker sandboxing, and a live Web UI.


Features

  • AI Chat — Conversational coding assistant with streaming responses and thinking/reasoning mode
  • Smart Model Routing — Auto-classifies prompt complexity into 4 tiers, escalating from cheap/fast to powerful/reasoning models
  • Knowledge Graph — Automatically indexes your codebase into a searchable vector graph; falls back to a keyword graph if vector dependencies aren't installed
  • Memory System — Persistent memory across sessions with auto-save and relevance search
  • Cost Tracking — Per-session and cumulative cost tracking across models
  • Web UI — Browser-based interface with cost panel, memory management, and model routing info
  • 35+ Built-in Tools — File operations, search, code analysis, shell commands, and more
  • MCP Support — Model Context Protocol for extending with custom tools
  • Plugin System — Drop Python files into ~/.claude/plugins/ to register additional tools at runtime
  • Context Management — Auto-compaction with summarization to stay within context windows
  • Background Agents — Run tasks asynchronously while continuing to chat
  • Orchestrator — Researcher → Coder → Reviewer pipeline for complex tasks
  • Hooks System — Pre/post tool use, pre/post chat, and session lifecycle hooks
  • Sandboxing — Docker-based secure command execution
  • Session Management — Save and load conversations
  • Undo — Revert file writes and edits
  • Export — Export conversations to Markdown or HTML
  • Shell Detection — Auto-detects Git Bash → WSL → cmd.exe on Windows; rewrites interactive commands so the correct shell is always used
  • Analytics — Code health scoring, code smell detection, and trend tracking

Prerequisites


Quick Start — No setup required

Windows — double-click one of these:

  • Install and Run - Windows.bat — CLI mode
  • Install and Run Web UI - Windows.bat — browser UI

Mac — double-click Install and Run - Mac.command (first time: right-click → Open to bypass Gatekeeper)

Linux — run in terminal:

chmod +x "Install and Run - Linux.sh"
"./Install and Run - Linux.sh"

The launcher automatically creates a virtual environment, installs dependencies, and prompts for your API key on first run.


Installation

From PyPI

pip install luckyd-code

From source

git clone https://github.com/Dylanchess0320/LuckyD-Code
cd luckyd-code
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -e .

Optional dependencies

# RAG support (semantic memory search)
pip install -e ".[rag]"

# Full RAG with FAISS vector search and file watching
pip install -e ".[rag-full]"

# Browser automation (Playwright)
pip install -e ".[browser]"

# Development dependencies
pip install -e ".[dev]"

Usage

CLI mode

luckyd-code
# or
ldc
# or
python main.py

Web UI mode

luckyd-code --web
# or
python main.py --web

Then open http://localhost:8000 in your browser.

Commands

Once in the CLI, use slash commands:

Command Description
/help Show available commands
/model Switch model or view current model
/cost Show session cost
/memory View or search memory
/session Save, load, or list sessions
/export Export conversation
/undo Undo last file write/edit
/orchestrate Run multi-agent pipeline
/analytics Run code health analysis
/clear Clear conversation
/quit Exit

Environment variables

Copy .env.example to .env and set your API key:

cp .env.example .env

Then edit .env:

DEEPSEEK_API_KEY=sk-your-deepseek-key-here

Built-in Tools

LuckyD Code includes 35+ tools for interacting with your codebase:

  • File operations: Read, Write, Edit, Glob, Grep, Delete, Move, Copy
  • Code analysis: Lint, TypeCheck, Complexity, Coverage
  • Search: Semantic search, keyword search, file search
  • Shell: Bash execution, PowerShell, Git operations
  • Web: Playwright browser automation, HTTP requests
  • Knowledge: Knowledge graph query, memory search
  • Project: Project scan, dependency analysis, code smell detection
  • Utility: Undo, Export, Session management

Project Structure

luckyd_code/
├── cli.py               # Terminal UI and REPL
├── cli_commands/        # Slash-command handlers
├── web_app.py           # Web UI server (FastAPI)
├── web_routes/          # Web UI route handlers
├── api.py               # API streaming client
├── router.py            # Model routing
├── config.py            # Configuration
├── context.py           # Conversation context
├── cost_tracker.py      # Cost tracking
├── hooks.py             # Lifecycle hooks
├── model_registry.py    # Model definitions
├── memory/              # Persistent memory
├── brain/               # Knowledge graph & RAG
├── tools/               # Tool registry (35+ tools)
├── mcp/                 # MCP client
├── permissions/         # Permission system
├── skills/              # Review & security
├── analytics/           # Usage analytics
├── templates/           # Web UI assets
└── background/          # Background agents

Development

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# With coverage
pytest --cov=luckyd_code --cov-report=term

# Type checking
mypy luckyd_code

# Build distribution
make build

Contributing

See CONTRIBUTING.md for detailed guidelines.

  1. Fork the repository
  2. Create a feature branch from main
  3. Write tests for new functionality
  4. Ensure all existing tests pass
  5. Submit a pull request

License

MIT License — see LICENSE for details.


Security

See SECURITY.md for supported versions and how to report vulnerabilities.


Changelog

See CHANGELOG.md for a history of changes.

Metadata

Release files for luckyd-code 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luckyd-code 1.2.2
File Size Uploaded Provenance Actions
luckyd_code-1.2.2.tar.gz 267.1 kB Without provenance Details for luckyd_code-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for luckyd-code 1.2.2
File Interpreter ABI Platform Actions
luckyd_code-1.2.2-py3-none-any.whl Python 3 none any Details for luckyd_code-1.2.2-py3-none-any.whl

Total release size: 523.9 kB

Release files / luckyd_code-1.2.2.tar.gz

Download URL luckyd_code-1.2.2.tar.gz
Size 267.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d431dc2f6f09e3bd4008fb09467f1ea2b89dba2761bfc6fe2c2d0a255a8830c7
BLAKE2b-256 checksum
How to use checksums
6d9684c1f8c5d28a2f42da0a30c2f534152200c7f4251be8c08c42a8adcb7f08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Release files / luckyd_code-1.2.2-py3-none-any.whl

Download URL luckyd_code-1.2.2-py3-none-any.whl
Size 256.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dc945fd9f519229fb2f6872c340b2cc5d50150344f7d94d2c8305af31596af0
BLAKE2b-256 checksum
How to use checksums
c2f0250accad9e3808705368df7ac6416b03d183c8e2d265e5cdb497564c274e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.0

Security for luckyd-code 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page