惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
N
Netflix TechBlog - Medium
博客园 - 聂微东
Y
Y Combinator Blog
罗磊的独立博客
博客园_首页
小众软件
小众软件
有赞技术团队
有赞技术团队
爱范儿
爱范儿
F
Fortinet All Blogs
C
Check Point Blog
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
M
MIT News - Artificial intelligence
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Cutting my AI spend to zero with an open-source Claude Co...
Ask Solution · 2026-04-25 · via DEV Community

I pay AUD$155/month for Claude Max. I have a MacBook Pro that runs large models fine. Two things bugged me about Claude Code:

  1. Even though Max was paid for, the API billed separately when I wired in third-party tools.
  2. My laptop sat idle while every refactor went to a remote API.

So I built OpenAgent. Terminal coding agent, 12+ providers, direct Max-subscription support, runs local models without a key.

GitHub logo ask-sol / openagent

Open-source agentic coding CLI for your terminal. Multi-provider (OpenAI, Anthropic, Gemini, Mistral, Groq, DeepSeek, xAI, Ollama, OpenRouter), token-efficient, with web search, MCP server support, local session resume, and built-in Reddit/X posting.

OpenAgent

The open-source Claude Code alternative that works with any AI provider.
Use your existing Claude Max subscription, OpenRouter, GPT-5, Gemini, Ollama, or any of 12 providers

Stars Version License

GitHub stars Total clones Unique users

Tracking since 2026-04-19 • 1,580 clones and 471 unique users in the last 14 days • updated 2026-04-25

OpenAgent Demo

InstallWhy OpenAgentProvidersFeaturesCommandsContributing


Why OpenAgent?

Already paying for Claude Max? OpenAgent lets you use your existing subscription directly — no separate API key, no extra cost. Just log in and code.

Want provider freedom? Switch between GPT-5, Claude, Gemini, Grok, DeepSeek, or local models with one command. No lock-in.

Want something open? OpenAgent is Apache 2.0 licensed. Fork it, extend it, self-host it.

OpenAgent vs Claude Code






















OpenAgent Claude Code
Providers 12+ (OpenAI, Anthropic, Gemini, Groq, Mistral, DeepSeek, xAI, Bedrock, Alibaba, Ollama, OpenRouter) Anthropic only
Use Max/Pro subscription ✅ No API key needed ✅ Built-in
Run





How the Max plan works

Anthropic ships a claude CLI that uses your subscription session. OpenAgent spawns it with --output-format stream-json and parses the result:

const child = spawn("claude", [
  "-p", prompt,
  "--model", modelAlias,
  "--output-format", "stream-json",
  "--verbose",
]);

Enter fullscreen mode Exit fullscreen mode

Each assistant event has cumulative token usage. The final result event has the real total_cost_usd from billing. No proxy, no OAuth dance, no scraped tokens. The CLI was always there.

Local models on Apple Silicon

Three local runtimes wired in: Ollama, LM Studio, MLX. OpenAgent installs them for you.

If you have an M5 Mac, Ollama crashes with llama runner process has terminated: %!w(<nil>). That's an upstream bug (PR #15581, unmerged). OpenAgent's MLX provider skips Ollama and talks to mlx_lm.server directly, which doesn't have the bug.

Pick MLX in setup, it runs pip install mlx-lm, downloads Gemma 4 E4B (3 GB), starts the server. Two minutes, $0.

Live cost tracking that isn't fake

Most agents estimate tokens by counting response characters and dividing by 4. That undercounts by ~60% because file contents and tool results never make it in.

OpenAgent reads the real usage field from each stream event, computes deltas, and reconciles against total_cost_usd at message end:

const deltaIn = totalInputTokens - lastEmittedInput;
const deltaOut = totalOutputTokens - lastEmittedOutput;
if (deltaIn > 0 || deltaOut > 0) {
  const deltaCost = (deltaIn * rate.in + deltaOut * rate.out) / 1_000_000;
  yield {
    type: "done",
    usage: { inputTokens: deltaIn, outputTokens: deltaOut, costUsd: deltaCost },
  };
}

Enter fullscreen mode Exit fullscreen mode

The number ticks up live and matches Anthropic's billing to four decimal places.

Token efficiency

Two-layer concise mode:

  1. The system prompt strips filler ("no thank-yous, no flattery, no recap") and bans decorative markdown.
  2. Streamed text is filtered client-side to drop <persisted-output> blocks and other internal markers before they ever reach your terminal.

About 30% fewer output tokens vs. an unfiltered session on the same Next.js refactor. Same code quality, less spend on conversational glue.

Install

macOS:

brew install ask-sol/openagent/openagent

Enter fullscreen mode Exit fullscreen mode

Linux:

curl -fsSL https://raw.githubusercontent.com/ask-sol/openagent/main/scripts/install-remote.sh | bash

Enter fullscreen mode Exit fullscreen mode

Repo: github.com/ask-sol/openagent
Docs: ask-sol.github.io/openagent

Apache 2.0. Issues and PRs welcome.

What's your setup?

I'm curious, how are you all handling AI costs for local development? Are you sticking with hosted APIs, or have you made the jump to local models on your workstation?

If you try OpenAgent, let me know if you run into any issues or have ideas for providers I should add next!