Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ Optional daemon services (feature-gated via config):
- **AICodeOtelServer**: gRPC OTEL collector for AI coding CLI metrics/logs (Claude Code, Codex)
- **HeartbeatResyncService**: Periodic resync of failed heartbeats (30-min interval)
- **CleanupTimerService**: Periodic log file cleanup (24-hour interval)
- **CCUsageService**: Integration with ccusage CLI

Services initialize in `cmd/daemon/main.go`: check enabled flag → create → start → defer stop. All run concurrently with graceful shutdown on SIGINT/SIGTERM.

Expand Down
12 changes: 0 additions & 12 deletions cmd/daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func main() {

daemon.Init(daemonConfigService, version)
model.InjectVar(version)
cmdService := model.NewCommandService()

// When the bolt storage engine is enabled, the daemon owns the bolt-backed
// command store for its lifetime (bbolt holds an exclusive file lock).
Expand Down Expand Up @@ -132,17 +131,6 @@ func main() {

go daemon.SocketTopicProcessor(msg)

// Start CCUsage service if enabled (v1 - ccusage CLI based)
if cfg.CCUsage != nil && cfg.CCUsage.Enabled != nil && *cfg.CCUsage.Enabled {
ccUsageService := model.NewCCUsageService(cfg, cmdService)
if err := ccUsageService.Start(ctx); err != nil {
slog.Error("Failed to start CCUsage service", slog.Any("err", err))
} else {
slog.Info("CCUsage service started")
defer ccUsageService.Stop()
}
}

// Start AICodeOtel service if enabled (OTEL gRPC passthrough for Claude Code, Codex, etc.)
var aiCodeOtelServer *daemon.AICodeOtelServer
if cfg.AICodeOtel != nil && cfg.AICodeOtel.Enabled != nil && *cfg.AICodeOtel.Enabled {
Expand Down
24 changes: 1 addition & 23 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,6 @@ Quota sync is automatic and has no configuration switch. It runs only when:

The Codex access token never goes to ShellTime. The daemon uses it only for the direct Codex request, then sends ShellTime a summary containing the plan, the windows Codex returned, their usage percentages and reset times, and credit status. The set and duration of windows are dynamic; for example, an account may return only a weekly window, so ShellTime does not synthesize a 5-hour window.

### CCUsage (Legacy)

CLI-based collection (older method):

```yaml
ccusage:
enabled: false
```

### Code Tracking

Track coding activity heartbeats:
Expand Down Expand Up @@ -357,7 +348,7 @@ Credentials can be embedded in the URL, e.g. `http://user:pass@proxy:8080` or `s
- SOCKS4 is not supported.
- An invalid proxy URL is logged as a warning, and the environment-variable proxy is used instead.
- The daemon reads the proxy on startup, so restart it after changing this setting.
- The optional OTEL metrics exporter (`enableMetrics`) and the `ccusage` subprocess only honor the environment variables.
- The optional OTEL metrics exporter (`enableMetrics`) only honors the environment variables.
- Put a machine-specific proxy in `config.local.yaml` to keep it out of a shared config.

---
Expand Down Expand Up @@ -466,9 +457,6 @@ aiCodeOtel:
grpcPort: 54027
debug: false

ccusage:
enabled: false

codeTracking:
enabled: false
# apiEndpoint: "https://api.custom-heartbeat.com" # Optional: custom endpoint
Expand Down Expand Up @@ -535,16 +523,6 @@ Or unset your token:
token: ""
```

### What's the difference between AICodeOtel and CCUsage?

| Feature | AICodeOtel | CCUsage |
|---------|------------|---------|
| Method | gRPC passthrough | CLI parsing |
| Performance | Better | More overhead |
| Data richness | Full OTEL data | Basic metrics |
| Sources | Claude Code, Codex, etc. | Claude Code only |
| Recommended | Yes | Legacy |

### How do I test my exclude patterns?

Use this Go regex tester with your patterns:
Expand Down
124 changes: 0 additions & 124 deletions model/ccusage_cov_test.go

This file was deleted.

Loading
Loading