3 pointsby itsdannyt2 hours ago1 comment
  • itsdannyt2 hours ago
    Hey HN - I built Costly because the existing API dashboards (Anthropic, OpenAI, etc.) show you what you spent but not why.

    I spent $97 last month on Anthropic calls and could see a massive spike on certain days, but had no way to know which feature caused it, whether I was running expensive models on simple tasks, or how much was duplicate prompts.

    Costly is an open-source TypeScript SDK that wraps your Anthropic client and logs every call asynchronously — zero added latency.

    It runs 7 waste detectors: prompt bloat, model overkill, duplicate queries, runaway features, error waste, output overgeneration, and cost trajectory warnings.

    Setup is one command: npx costly init

    GitHub: https://github.com/itsdannyt/costly.git

    Starting with Anthropic, adding OpenAI and other providers next. Happy to answer questions about the architecture or roadmap.