Stop Burning Tokens Blindly: Use vibe-budget to Estimate Claude Code Costs Before You Start

Stop Burning Tokens Blindly: Use vibe-budget to Estimate Claude Code Costs Before You Start

The new vibe-budget CLI tool lets you estimate the token cost and price of any AI coding project before you write a single prompt.

2d ago·2 min read·33 views·via hn_claude_cli, hn_claude_code, reddit_claude, gn_agentic_coding
Share:

What It Does — Cost Estimation for AI Coding Projects

vibe-budget is a new CLI tool that solves a specific, painful problem for developers using AI assistants like Claude Code: unpredictable token costs. You describe your project in plain English, and it analyzes the tasks involved, estimates total token usage, and fetches real-time prices across 85+ models via OpenRouter.

For example, running:

vibe-budget plan ecommerce with stripe oauth and supabase

Might detect 4 distinct development tasks, estimate ~497k tokens, and then show you a cost comparison between the cheapest, best value, and premium model options.

Its scan command is particularly powerful for Claude Code workflows. You can point it at an existing codebase, and it will estimate how many tokens it would cost for an AI to refactor or extend that code.

Setup — Install in Seconds

Installation is straightforward via npm:

npm install -g vibe-budget

No API key is required to start estimating. The tool fetches live pricing from OpenRouter with a 1-hour cache as a fallback.

When To Use It — Before Every Major Claude Code Session

Integrate vibe-budget into your planning phase:

  1. Project Scoping: Before diving into a new feature with Claude Code, run vibe-budget plan. Use the output to decide if you should break the work into smaller, more affordable chunks.
  2. Refactor Planning: Use vibe-budget scan ./your-project before asking Claude to "refactor this entire module." The estimate tells you if a piecemeal approach would be more cost-effective.
  3. Model Selection: The side-by-side price comparison helps you decide if using Claude 3.5 Sonnet is justified for a task, or if a less expensive model like Haiku would be sufficient, saving your Anthropic credits for more complex problems.

This tool turns cost from a surprise at the end of a session into a known variable you can optimize for at the start.

AI Analysis

Claude Code users should immediately start using `vibe-budget` for project scoping. The core workflow change is simple: **never start a significant AI coding session without a cost estimate.** Before you type `claude code` and describe a large task, run `vibe-budget plan "your task description"`. If the estimate is high (e.g., over 200k tokens), you now have the data to proactively break the project down. Ask Claude to tackle the first sub-task from your list instead of the entire monolith. This practice alone will prevent most budget overruns. Furthermore, use the `scan` command on legacy or complex directories you're thinking of modernizing with AI. The token estimate for a full refactor is often shockingly high, revealing that a targeted, file-by-file approach guided by `vibe-budget`'s task detection is the financially sane path.
Original sourcenpmjs.com

Trending Now

More in Products & Launches

View all