@polka-codes/cli
v0.10.26
Published
[](https://www.npmjs.com/package/@polka-codes/cli) [](https://www.npmjs.com/package/@polka-codes/cli) [ with AI-powered feedback.
polka review # Review local changes
polka review --pr 123 # Review GitHub PR
polka review --range HEAD~5..HEAD # Review commit range
polka review --loop 3 # Re-review until clean
polka review --json # JSON output for automationFeatures:
- Reviews staged changes, unstaged changes, or commit ranges
- GitHub PR review with
ghintegration - Iterative remediation with
--loop - Can automatically apply fixes
commit
Generate a commit message based on your staged changes.
polka commit # Generate message for staged changes
polka commit -a # Stage all changes first
polka commit --context "Fixed login bug" # Add contextpr
Create a GitHub pull request with AI-generated title and description.
polka pr
polka pr --context "Implements user authentication"workflow
Run custom workflow files.
polka workflow -f my-workflow.workflow
polka workflow -f custom.workflow -w customWorkflowCheckpoint Commands
checkpoints
List available checkpoints for resuming work.
polka checkpoints # List all checkpoints
polka checkpoints --verbose # Show detailed infoOutput shows:
- Checkpoint name and timestamp
- Completed, failed, and pending tasks
- Instructions to resume
continue
Resume work from a checkpoint.
polka continue # Resume latest checkpoint
polka continue <checkpoint-name> # Resume specific checkpoint
polka continue --list # List checkpoints in continue modeFeatures:
- Shows task status (completed, failed, pending)
- Provides instructions to restore state
- Helps continue from where you left off
Utility Commands
init
Initialize Polka Codes configuration.
polka init # Create local config
polka init --global # Create global config
polka init script my-script # Generate script template
polka init skill # Generate skill templaterun
Run custom scripts from .polkacodes.yml.
polka run # List available scripts
polka run deploy # Run specific script
polka run deploy -- --prod # Pass arguments to scriptskills
Manage agent skills.
polka skills # List available skills
polka skills create # Create new skillAdvanced Commands
mcp-server
Start Polka Codes as an MCP server for Claude Code.
polka mcp-serverConfigure with Claude Code:
claude mcp add polka polka mcp-serverOr manually edit ~/.claude/config.json:
{
"mcpServers": {
"polka": {
"command": "polka",
"args": ["mcp-server"]
}
}
}Exposes workflows as MCP tools for use with Claude Code.
agent
Run autonomous agent for continuous improvement.
polka agent "Fix all failing tests"Note: This is experimental and primarily used for task discovery and planning.
Git Integration
commit
Generate a commit message based on your staged changes.
# Generate commit message for staged changes
polka commit
# Generate commit message with additional context
polka commit "closes #123"
# Stage all changes and commit
polka commit -apr
Create a pull request with an AI-generated title and description.
# Create PR for the current branch
polka pr
# Create PR with additional context
polka pr "implements feature #456"Configuration
Provider Setup
Polka Codes supports multiple AI providers:
- DeepSeek (Recommended)
- Anthropic (Claude 3 Sonnet recommended)
- OpenRouter
Configure your provider in .env:
# Required
POLKA_API_KEY=your_api_key_here
# Optional - override defaults
POLKA_API_PROVIDER=deepseek # or anthropic, openrouter, openai
POLKA_MODEL=deepseek-chat # or claude-3-7-sonnet-20250219Project Configuration
Create .polkacodes.yml in your project root:
# AI provider settings
defaultProvider: deepseek # default provider
defaultModel: deepseek-chat # default model
# Custom commands available to AI
commands:
test:
command: bun test
description: Run tests. Pass file path to run specific tests.
check:
command: bun typecheck
description: Run type checker
format:
command: bun fix
description: Format code
# Additional rules/guidelines for AI
rules: |
- Use TypeScript for all new files
- Follow project's existing code style
- Add tests for new featuresGlobal vs Local Configuration
- Global config (
~/.config/polkacodes/config.yml): Store API keys and default settings - Local config (
.polkacodes.yml): Project-specific settings and commands
Features
- 🤖 Multiple AI provider support
- 🧠 Intelligent workflow execution
- 💻 Code generation, planning, and bug fixing
- 🔄 Git workflow integration (commit messages and PRs)
- 🔎 Pull request reviews
- 📊 Project-specific configuration and commands
- 🔑 Secure API key management
- 📝 Detailed logging with
--verbose
Usage Tips
For general tasks, let Polka figure it out:
polka "add a dark mode toggle to the settings page"Create a plan before implementing a large feature:
polka plan "migrate the frontend from Vue to React"Combine with your git workflow:
git add . && polka commit && polka prGet help with a failing test:
polka fix "bun test tests/checkout.test.ts" --verbose
Requirements
- Bun (v1.0.0+)
git(forcommitandprcommands)GitHub CLI (gh)(forprcommand)
This README was generated by polka.codes
