/polka-codes

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Polka Codes - AI-Powered Coding Assistant

License: AGPL-3.0 Bun Version TypeScript

Warning This project is still in very early stages of development. Please use with caution as APIs and features may change frequently.

Polka Codes is a powerful TypeScript-based AI coding assistant framework that helps developers write, improve, and maintain code through natural language interactions. It provides:

  • ๐Ÿš€ Core AI services with multiple provider support
  • ๐Ÿ’ป Command-line interface for local development
  • ๐Ÿค– GitHub Action integration for CI/CD pipelines
  • ๐Ÿงฉ Extensible architecture for custom integrations

Quick Start

Installation

# Install globally using npm
npm install -g @polka-codes/cli

# Or run directly using npx
npx @polka-codes/cli "your task description"

Basic Usage

# Create a new project
pokla create my-project

# Initialize configuration
pokla init

# Run some task
pokla "improve README.md"

# Start interactive chat session
polka-codes

# Get help
pokla --help

For more information, see cli README

Features

  • ๐ŸŽฏ Project Creation: Easy project scaffolding with create command
  • ๐Ÿ”ง Simple Setup: Quick configuration with init command
  • ๐Ÿค– Multiple AI Providers: Supports DeepSeek (recommended), Anthropic Claude, Ollama, and OpenRouter
  • ๐Ÿ”ง CLI Interface: Interactive command-line tool with chat and task execution
  • ๐Ÿ”„ GitHub Action: Seamless integration with CI/CD pipelines
  • ๐Ÿ“ฆ Extensible Architecture: Modular design for adding new AI providers and tools
  • โšก Type Safety: Fully typed with TypeScript for better developer experience
  • ๐Ÿงช Testing: Comprehensive testing with bun:test and snapshot testing
  • ๐Ÿ” Code Analysis: Built-in tools for code understanding and improvement
  • ๐Ÿค MultiAgent System: Specialized AI agents working together seamlessly
    • Architect Agent for system design and high-level planning
    • Coder Agent for implementation and code maintenance
    • Intelligent task handover for complex development workflows

Project Structure

The project is organized as a monorepo with the following packages:

Package Description
core Core AI services, agent implementations, and tooling
cli Command-line interface for interacting with AI services

Getting Started

Prerequisites

  • Bun (v1.0.0 or higher)

Development Setup

# Clone and setup
git clone https://github.com/polka-codes/polka-codes.git
cd polka-codes
bun install

# Available scripts
bun run test      # Run tests across all packages
bun run check     # Run type checking and linting
bun run fix       # Fix linting issues

Configuration

A .polkacodes.yml configuration file can be used to customize the behavior of polka-codes. An example configuration file is provided in the repository as example.polkacodes.yml.

For detailed configuration options, refer to the example file which includes comprehensive comments for each setting.

Environment Variables

The following environment variables can be used to configure Polka Codes. Note that command line options take precedence over environment variables, which in turn take precedence over the configuration file.

Variable Description
POLKA_API_PROVIDER Specify the default AI service provider
POLKA_MODEL Specify the default AI model to use
POLKA_API_KEY Default API key for the selected provider
POLKA_BUDGET Set the budget limit for AI service usage (defaults to 1000)
ANTHROPIC_API_KEY API key for Anthropic Claude service
OPENROUTER_API_KEY API key for OpenRouter service
DEEPSEEK_API_KEY API key for DeepSeek service

License

This project is licensed under the AGPL-3.0 License.

Credits

This project is heavily inspired by the Cline project.


Generated by polka.codes