npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

candela-cline

v0.1.0

Published

Cline plugin for Candela — LLM cost tracking, session attribution, and budget enforcement

Readme

candela-cline

Cline plugin for Candela — LLM cost tracking, session attribution, and budget enforcement for Cline users.

License


Quick Start: Provider Config (No Plugin Needed)

The fastest way to route Cline through Candela — just configure the provider:

  1. Open Cline settings (gear icon in sidebar)
  2. Select "OpenAI Compatible" as API Provider
  3. Set Base URL: http://localhost:8181/proxy/anthropic/v1
  4. Set API Key: candela (placeholder — Candela injects ADC credentials for Vertex AI)
  5. Set Model ID: claude-sonnet-4-20250514

Every Cline request now routes through Candela with full observability.

Provider URLs

| Provider | Base URL | |----------|----------| | Anthropic (via Vertex AI) | http://localhost:8181/proxy/anthropic/v1 | | Anthropic Vertex (native) | http://localhost:8181/proxy/anthropic-vertex/v1 | | Anthropic Direct | http://localhost:8181/proxy/anthropic-direct/v1 | | Anthropic (via AWS Bedrock) | http://localhost:8181/proxy/anthropic-bedrock/v1 | | OpenAI | http://localhost:8181/proxy/openai/v1 | | Gemini (OpenAI-compat) | http://localhost:8181/proxy/gemini-oai/v1 |


Plugin Features (Enhanced)

On top of provider routing, this plugin adds:

| Feature | Description | |---------|-------------| | Session cost summary | Token/cost breakdown for the current session | | Rich budget status | Daily spend, active grants, reset countdowns, color-coded urgency | | Health check | Verify Candela is reachable |

Usage as Custom Tools

import { getSessionSummary, getBudgetStatus, checkCandelaHealth } from "candela-cline";

// Get cost summary for the last hour
const summary = await getSessionSummary();
// 📊 Candela Session Summary (last 1h)
//    Tokens: 142.3K (98.2K in / 44.1K out)
//    Cost: $0.47 · Cache savings: $0.12
//    Requests: 12
//
//    Model breakdown:
//      claude-sonnet-4 (anthropic): 98.2K tokens, $0.31
//      gemini-2.5-pro (google): 44.1K tokens, $0.16

// Check budget (includes grants and reset countdown)
const budget = await getBudgetStatus();
// 💰 Candela Budget Status
//    [████████████████░░░░] 80%
//    Used: $40.00 of $50.00 daily limit
//    Active grants: +$10.00 (resets in 3d 14h)
//    Remaining (waterfall): $20.00
//    ⚠️ Budget is running low!

// Health check
const health = await checkCandelaHealth();
// ✅ Candela is running at http://localhost:8181

Programmatic API

import { initCandelaPlugin } from "candela-cline";

const candela = await initCandelaPlugin();

if (candela.alive) {
  console.log(await candela.summary());
  console.log(await candela.budget());
}

Custom Headers

Add these headers for session attribution in Cline's OpenAI-compatible provider settings:

| Header | Value | Purpose | |--------|-------|---------| | X-Session-Id | Auto-generated UUID | Groups requests in Candela dashboard | | User-Agent | Cline/1.0 | Identifies traffic source |


Prerequisites

  1. Candela running locallycandela start (recommends candela v0.4.6+ for optimized performance; older versions supported via legacy fallback)
  2. Authentication — run candela auth login once to set up Google OAuth credentials (no gcloud CLI required)

Related


License

Apache License 2.0. See LICENSE for details.