慣性聚合 高效追蹤和閱讀你感興趣的部落格、新聞、科技資訊
閱讀原文 在慣性聚合中打開

推薦訂閱源

Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
博客园 - 叶小钗
MyScale Blog
MyScale Blog
V
Visual Studio Blog
月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
I
InfoQ
有赞技术团队
有赞技术团队
阮一峰的网络日志
阮一峰的网络日志
Jina AI
Jina AI
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
博客园 - Franky

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor GitHub - GenAI-Gurus/awesome-eu-ai-act: Curated tools, official sources, OSS, templates, and guides for EU AI Act compliance. Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims IatroBench: Pre-Registered Evidence of Iatrogenic Harm from AI Safety Measures What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders How to Switch AI Chatbots and Why You Might Want To GitHub - MattMessinger1/agentic_refund_guardrail: Safe refund policy layer for AI agents — Python + TypeScript. Same behavior, shared tests. Adam/papers/emergent_values_whitepaper.md at master · strangeadvancedmarketing/Adam Ask HN: How do you stop playing 20 questions with your AI coding tools How far can automation and AI support psychotherapy? - @theU GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits A Mac Studio for Local AI — 6 Months Later A History of the Early Years of AI at the University of Edinburgh Why AI Coding Tools Still Feel Stuck on Localhost MSN AI Datacenters Are Becoming Strategic Targets twitter.com Penn Researchers Use AI to Surface Unreported GLP-1 Side Effects in Reddit Posts Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 AI models are terrible at betting on soccer—especially xAI Grok GitHub - xialeistudio/echoic GitHub - HimashaHerath/github-dev-wrapped: AI-powered weekly GitHub activity reports deployed to GitHub Pages
GitHub - peterxcli/ccost: 將本地 AI 編程會話日誌轉換為可搜尋的終端 UI,並使用成本透鏡。
peterxcli · 2026-05-25 · via Hacker News - Newest: "AI"

在幾秒內尋找舊的Codex和Claude Code會話,然後查看哪些會話消耗了最多的代碼片段。

ccost將本地AI編程會話日誌轉換為可搜尋的終端UI,並帶有成本視角。使用它來恢復過去的提示,檢查昂貴的運行,並了解哪些會話、模型和網絡搜索調用導致了您的支出。

codex-cost-demo.mov
brew install --cask peterxcli/tap/ccost
ccost

為何使用它?

  • 尋找您修復過錯誤、探索過 API 或遇到有用錯誤的會話.
  • 根據預計成本、代碼片段、時間、模型、網路搜尋、會話 ID 或第一個提示來排序會話.
  • 瀏覽 Codex 和 Claude Code 日誌,而無需上傳提示、路徑、堆疊追蹤或來源上下文.
  • 透過持續的搜尋索引保持啟動快速,該索引僅重新索引變更過的檔案.

支援來源

來源 預設路徑
Codex $CODEX_HOME/sessions,或~/.codex/sessionsCODEX_HOME未設定
Claude Code ~/.claude/projects
自訂 JSONL 目錄 ccost --sessions /path/to/jsonl/sessions

安裝

brew install --cask peterxcli/tap/ccost

升級:

brew update
brew upgrade --cask ccost

其他安裝路徑正在規劃中:

  • cargo install ccost
  • cargo binstall ccost
  • Linux 執行檔
  • Shell 安裝腳本

執行

開啟預設的Codex會話目錄:

ccost

明確選擇來源:

ccost --codex
ccost --claude

使用自定義會話目錄:

ccost --sessions /path/to/jsonl/sessions

在...時使用它:

尋找舊的修復方案

你記得曾經詢問Codex或Claude Code關於JWT refresh,但不知道它是在哪個專案或會話中。

按下/,輸入:

JWT refresh

尋找昂貴的會議

按成本排序,查看哪些執行使用了最多的預計支出

按下:

s

直到排序完成cost.

檢查網路搜尋密集的會議

按網路搜尋排序,找出搜尋呼叫對預計支出有貢獻的會議

隱私

ccost是本地優先。

  • 不需要 API 金鑰
  • 不需要遙測
  • 不需要網絡呼叫
  • 不需要上傳
  • Session JSONL 檔案仍然是真實來源
  • 快取檔案是可拋棄的,並儲存於本地

如果偵測到快取格式偏離或損毀,請刪除 TUI 中顯示的快取資料夾。原始的會話記錄沒有被修改

功能

  • 可在本地會話記錄中進行全文搜尋.
  • 前綴匹配、匹配高亮顯示以及可見搜尋光標.
  • 根據總成本、時間、令牌、網路搜尋、模型、會話 ID 或第一個提示進行成本感知排序.
  • Codex 和 Claude Code 預設值,以及自訂 JSONL 會話目錄.
  • 內建價格表,支援本地 JSON 覆蓋.
  • 可選--no-web-cost 模式用於僅僅是 token 的估計。
  • 單寫者緩存鎖帶有唯讀和強制寫逃逸閘門。

為何它很快。

  • Rust 終端 UI。
  • 持續的全文索引。
  • FST 終端索引用於緊湊前綴搜尋。
  • 持續的默克爾樹和檔案監視器,因此未變更的會話可重用,變更的會話檔案則增量重新索引。

控制

動作
/ 進入搜尋模式
Enter 返回瀏覽模式,或在瀏覽時切換詳情
Up / Downj / k 移動選擇
Tab 切換清單/細節焦點
s 下一排序鍵
S 反向排序方向
r 重新載入
Esc 清除搜尋或返回
q 退出

選項

ccost [--codex | --claude | --sessions PATH] [--pricing PATH] [--no-web-cost] [--read-only-index] [--force-index]
  • --codex: 開啟預設 Codex 會話目錄.
  • --claude: 開啟預設 Claude Code 專案文字記錄目錄.
  • --sessions PATH:打開包含 JSONL 檔案的客製化 Codex 或 Claude Code 會話目錄。
  • --pricing PATH:載入本地定價 JSON 覆蓋檔。
  • --no-web-cost:在估計中禁用網路搜尋呼叫成本。
  • --read-only-index:不寫入持續搜尋快取開啟。
  • --force-index:無鎖寫入。僅在確認沒有其他 TUI 執行後使用。

Pricing

成本是基於本機會議紀錄中的代碼使用和模型數據估算的。內建定價包含 GPT-5.5、GPT-5.4、Claude Opus/Sonnet/Haiku 模型系列,以及網路搜尋預設值。覆蓋本機表格:--pricing pricing.json

{
  "web_search_per_1k": 10.0,
  "models": {
    "gpt-5.5": {
      "input_per_m": 5.0,
      "cache_creation_input_per_m": 0.0,
      "cached_input_per_m": 0.5,
      "output_per_m": 30.0,
      "long_context_threshold": 272000,
      "long_context_input_multiplier": 2.0,
      "long_context_output_multiplier": 1.5
    },
    "gpt-5.4": {
      "input_per_m": 2.5,
      "cache_creation_input_per_m": 0.0,
      "cached_input_per_m": 0.25,
      "output_per_m": 15.0,
      "long_context_threshold": 272000,
      "long_context_input_multiplier": 2.0,
      "long_context_output_multiplier": 1.5
    },
    "claude-sonnet-4-5": {
      "input_per_m": 3.0,
      "cache_creation_input_per_m": 3.75,
      "cached_input_per_m": 0.30,
      "output_per_m": 15.0
    }
  }
}

對於較舊的定價覆蓋,long_context_multiplier 仍然被接受,並且適用於所有代碼類別,當輸入/輸出特定欄位被省略時。cache_creation_input_per_m 是選擇性的,預設為 0.0

Benchmark

Benchmark 數字應在命名機器上使用可重現數據集進行測量,然後才可用作證據。docs/github-launch.md 中的啟動清單包含表格,一旦這些數字可用即可填寫。

這有什麼不同?

工具 專注
ccusage 針對多個代理的令牌及成本使用報告
CodeBurn 跨AI程式編寫工具的成本可觀察性儀表板
ccost 搜尋及瀏覽Codex和Claude Code會話的快速本地TUI,具備成本感知排序

路線圖

  • 使用過濾數據的靜態README螢幕截圖
  • GitHub 社交預覽圖片
  • cargo install ccost
  • Linux 发布工件
  • 示範固定裝置或 ccost --demo
  • JSON/CSV 匯出
  • 專案級成本總結
  • 光標、OpenCode、Gemini CLI 和 Goose 日誌支持
  • 可配置主題
  • 持續整合中的基準測試

貢獻

歡迎貢獻,特別是新的日誌來源和匯出格式。請參考CONTRIBUTING.md

如果ccost幫助您恢復舊的會話或理解憑證去哪裡了,一顆星可以幫助表明它值得維護。