{"id":47940711,"url":"https://github.com/blockrunai/runcode","last_synced_at":"2026-04-04T08:01:38.506Z","repository":{"id":346264640,"uuid":"1188475888","full_name":"BlockRunAI/runcode","owner":"BlockRunAI","description":"brcc — BlockRun Claude Code. Run Claude Code with any model (GPT-5, Claude, Gemini, DeepSeek, Grok, 40+). No rate limits, no account needed. Pay per use with USDC on Base or Solana.","archived":false,"fork":false,"pushed_at":"2026-04-02T20:33:37.000Z","size":341,"stargazers_count":297,"open_issues_count":0,"forks_count":27,"subscribers_count":21,"default_branch":"main","last_synced_at":"2026-04-03T00:55:51.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blockrun.ai","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlockRunAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-22T05:57:55.000Z","updated_at":"2026-04-02T20:33:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/BlockRunAI/runcode","commit_stats":null,"previous_names":["blockrunai/brcc"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/BlockRunAI/runcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2Fruncode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2Fruncode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2Fruncode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2Fruncode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockRunAI","download_url":"https://codeload.github.com/BlockRunAI/runcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockRunAI%2Fruncode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31392188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T08:01:01.693Z","updated_at":"2026-04-04T08:01:38.499Z","avatar_url":"https://github.com/BlockRunAI.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/banner.png\" alt=\"RunCode\" width=\"600\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cp\u003e\u003cstrong\u003eOpen-source AI coding agent. 41+ models. Pay per use with USDC.\u003c/strong\u003e\u003c/p\u003e\n\n\u003cbr\u003e\n\n[![npm version](https://img.shields.io/npm/v/@blockrun/runcode.svg?style=flat-square\u0026color=cb3837)](https://npmjs.com/package/@blockrun/runcode)\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue?style=flat-square)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-3178c6?style=flat-square\u0026logo=typescript\u0026logoColor=white)](https://typescriptlang.org)\n[![x402](https://img.shields.io/badge/x402-Payments-purple?style=flat-square)](https://x402.org)\n[![Telegram](https://img.shields.io/badge/Telegram-Community-26A5E4?style=flat-square\u0026logo=telegram)](https://t.me/blockrunAI)\n\n\u003c/div\u003e\n\n---\n\n## Why RunCode?\n\n| | Claude Code | Cursor | Aider | **RunCode** |\n|---|---|---|---|---|\n| Models | Claude only | Mixed (limited) | Bring your key | **41+ models, one tool** |\n| Pricing | $200/mo subscription | $20/mo + usage | Free + API costs | **Pay per request** |\n| Payment | Credit card | Credit card | API keys | **USDC — no accounts** |\n| Open source | No | No | Yes | **Yes** |\n| Switch models mid-session | No | No | Yes | **Yes** |\n\nRunCode gives you the same agent capabilities — file editing, shell commands, web search, sub-agents — across every major model provider. You pay only for what you use, with stablecoin. No API keys to manage, no accounts to create, no subscriptions to cancel.\n\n## Quick Start\n\n```bash\nnpm install -g @blockrun/runcode\nruncode setup base     # Create a wallet (one-time)\nruncode                # Launch — picks model interactively\n```\n\nThat's it. Fund the wallet address with USDC on Base, or use free models immediately.\n\n## Features\n\n### Agent Capabilities\n\nRunCode is a full coding agent with 10 built-in tools:\n\n| Tool | Description |\n|------|-------------|\n| **Read** | Read files with line numbers |\n| **Write** | Create or overwrite files |\n| **Edit** | Targeted find-and-replace edits |\n| **Bash** | Run shell commands with timeout |\n| **Glob** | Find files by pattern |\n| **Grep** | Search file contents (uses ripgrep) |\n| **WebSearch** | Search the web |\n| **WebFetch** | Fetch and read web pages |\n| **Agent** | Spawn sub-agents for parallel tasks |\n| **Task** | Track tasks within a session |\n\n### Model Selection\n\nLaunch with the interactive model picker, or specify directly:\n\n```bash\nruncode                          # Interactive picker\nruncode -m sonnet                # Claude Sonnet 4.6\nruncode -m gpt                   # GPT-5.4\nruncode -m deepseek              # DeepSeek V3\nruncode -m free                  # Nemotron Ultra 253B (free)\n```\n\nSwitch models mid-session:\n\n```\n/model              # Interactive picker\n/model flash        # Switch to Gemini 2.5 Flash\n/cost               # Check session cost\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAll model shortcuts (30+)\u003c/strong\u003e\u003c/summary\u003e\n\n| Shortcut | Model | Price (in/out per 1M) |\n|----------|-------|----------------------|\n| `sonnet` | Claude Sonnet 4.6 | $3 / $15 |\n| `opus` | Claude Opus 4.6 | $5 / $25 |\n| `gpt` | GPT-5.4 | $2.5 / $15 |\n| `gemini` | Gemini 2.5 Pro | $1.25 / $10 |\n| `flash` | Gemini 2.5 Flash | $0.15 / $0.6 |\n| `deepseek` | DeepSeek V3 | $0.28 / $0.42 |\n| `r1` | DeepSeek R1 | $0.28 / $0.42 |\n| `haiku` | Claude Haiku 4.5 | $0.8 / $4 |\n| `mini` | GPT-5 Mini | $0.25 / $2 |\n| `nano` | GPT-5 Nano | $0.05 / $0.4 |\n| `o3` | O3 | $2 / $8 |\n| `o4` | O4 Mini | $1.1 / $4.4 |\n| `grok` | Grok 3 | varies |\n| `free` | Nemotron Ultra 253B | FREE |\n| `devstral` | Devstral 2 123B | FREE |\n| `qwen-coder` | Qwen3 Coder 480B | FREE |\n| `maverick` | Llama 4 Maverick | FREE |\n\n\u003c/details\u003e\n\n### Token Optimization\n\nSeven layers of automatic optimization keep context usage low and costs down:\n\n1. **Thinking block stripping** — removes old reasoning from history\n2. **Tool result budgeting** — caps large outputs at 50K chars with preview\n3. **Microcompaction** — clears old tool results (keeps last 8)\n4. **Time-based cleanup** — clears stale results after 60min idle\n5. **Auto-compact** — summarizes history when approaching context limit\n6. **Adaptive max_tokens** — starts at 8K, escalates to 64K on demand\n7. **Prompt-too-long recovery** — auto-compacts and retries up to 3x\n\n### Permission System\n\nBy default, read-only tools run automatically. Destructive tools (Write, Edit, Bash) prompt for permission:\n\n```\n  Permission required: Bash\n  Execute: rm -rf node_modules\n\n  Allow? [y]es / [n]o / [a]lways:\n```\n\nUse `--trust` to skip all prompts:\n\n```bash\nruncode --trust\n```\n\nConfigure rules in `~/.blockrun/runcode-permissions.json`:\n\n```json\n{\n  \"allow\": [\"Bash(git *)\"],\n  \"deny\": [\"Bash(rm -rf *)\"]\n}\n```\n\n### Streaming Tool Execution\n\nConcurrent-safe tools (Read, Glob, Grep) start executing while the model is still streaming. Sequential tools (Write, Edit, Bash) wait for the full response. This reduces latency on multi-tool turns.\n\n### Proxy Mode\n\nUse any model through Claude Code by running RunCode as a payment proxy. It translates between OpenAI and Anthropic formats, handles x402 payments, and adds automatic fallback when a model is unavailable.\n\n```bash\nruncode proxy                    # Start payment proxy on :8402\nruncode proxy -m deepseek        # With default model\n```\n\n**One-command setup for Claude Code:**\n\n```bash\nruncode init                     # Auto-configures Claude Code + LaunchAgent\n```\n\nThis writes the proxy endpoint into Claude Code's config and installs a macOS LaunchAgent so the proxy starts automatically on login. Run `runcode uninit` to undo.\n\n**How it works:**\n\n```\nClaude Code → RunCode proxy (:8402) → BlockRun API → 41+ models\n                 ↓\n          x402 payment (USDC)\n          SSE format translation\n          Auto-fallback on failure\n```\n\n## Payment\n\nRunCode uses the [x402](https://x402.org) protocol for pay-per-request payments with USDC stablecoins. No accounts, no API keys, no subscriptions.\n\n**Supported chains:**\n- **Base** (default) — Coinbase L2, low fees\n- **Solana** — also low fees\n\n**Setup:**\n\n```bash\nruncode setup base     # or: runcode setup solana\n```\n\nFund the wallet address with USDC. Free models work without funding.\n\n**What does it cost?**\n\n| Model | ~Cost per request |\n|-------|-------------------|\n| Free models (Nemotron, etc.) | $0 |\n| DeepSeek V3 | ~$0.001 |\n| Gemini Flash | ~$0.001 |\n| Claude Sonnet | ~$0.01 |\n| GPT-5.4 | ~$0.01 |\n| Claude Opus | ~$0.05 |\n\nTypical usage: **$5-20/month** for active development.\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `runcode` | Start the agent (interactive model picker) |\n| `runcode -m \u003cmodel\u003e` | Start with a specific model |\n| `runcode --trust` | Start in trust mode (no permission prompts) |\n| `runcode --debug` | Start with debug logging |\n| `runcode setup [base\\|solana]` | Create payment wallet |\n| `runcode balance` | Check USDC balance |\n| `runcode models` | List all models with pricing |\n| `runcode stats` | View usage statistics and savings |\n| `runcode config list` | View configuration |\n| `runcode proxy` | Run as payment proxy for Claude Code |\n| `runcode init` | Auto-configure Claude Code + LaunchAgent |\n| `runcode uninit` | Remove Claude Code proxy config |\n\n### Session Commands\n\n| Command | Description |\n|---------|-------------|\n| `/model` | Interactive model picker |\n| `/model \u003cname\u003e` | Switch model (shortcut or full ID) |\n| `/cost` | Show session cost and savings |\n| `/help` | List all commands |\n| `/exit` | Quit |\n\n## Architecture\n\n```\nsrc/\n├── agent/                  # Core agent loop, LLM client, token optimization\n├── tools/                  # 10 built-in tools (read, write, edit, bash, ...)\n├── ui/                     # Terminal UI + model picker\n├── proxy/                  # Payment proxy for Claude Code\n├── router/                 # Smart model routing\n├── commands/               # CLI commands (setup, balance, stats, ...)\n├── wallet/                 # Wallet management\n├── stats/                  # Usage tracking\n├── config.ts               # Global configuration\n└── index.ts                # Entry point\n```\n\n## Development\n\n```bash\ngit clone https://github.com/BlockRunAI/runcode.git\ncd runcode\nnpm install\nnpm run build\nnode dist/index.js --help\n```\n\n## Contributing\n\nContributions are welcome. Please open an issue first to discuss what you'd like to change.\n\n## License\n\n[Apache License 2.0](LICENSE)\n\n## Links\n\n- [BlockRun](https://blockrun.ai) — The AI gateway\n- [x402 Protocol](https://x402.org) — Internet-native payments\n- [npm](https://npmjs.com/package/@blockrun/runcode)\n- [Telegram](https://t.me/blockrunAI)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockrunai%2Fruncode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockrunai%2Fruncode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockrunai%2Fruncode/lists"}