refactor!: rename module to github.com/theirongolddev/cburn

Change module path from 'cburn' to 'github.com/theirongolddev/cburn'
to enable standard Go remote installation:

  go install github.com/theirongolddev/cburn@latest

This is a BREAKING CHANGE for any external code importing this module
(though as a CLI tool, this is unlikely to affect anyone).

All internal imports updated to use the new module path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
teernisse
2026-02-23 10:09:13 -05:00
parent 16cc4d4737
commit 083e7d40ce
29 changed files with 64 additions and 62 deletions

View File

@@ -4,7 +4,7 @@ package cmd
import (
"fmt"
"cburn/internal/config"
"github.com/theirongolddev/cburn/internal/config"
"github.com/spf13/cobra"
)

View File

@@ -3,8 +3,8 @@ package cmd
import (
"fmt"
"cburn/internal/cli"
"cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/spf13/cobra"
)

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"cburn/internal/cli"
"cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/spf13/cobra"
)

View File

@@ -3,8 +3,8 @@ package cmd
import (
"fmt"
"cburn/internal/cli"
"cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/spf13/cobra"
)

View File

@@ -3,8 +3,8 @@ package cmd
import (
"fmt"
"cburn/internal/cli"
"cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/spf13/cobra"
)

View File

@@ -6,10 +6,10 @@ import (
"path/filepath"
"time"
"cburn/internal/cli"
"cburn/internal/model"
"cburn/internal/pipeline"
"cburn/internal/store"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/model"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/store"
"github.com/spf13/cobra"
)

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"sort"
"cburn/internal/cli"
"cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/spf13/cobra"
)

View File

@@ -5,9 +5,9 @@ import (
"fmt"
"strings"
"cburn/internal/config"
"cburn/internal/source"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/config"
"github.com/theirongolddev/cburn/internal/source"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/huh"
"github.com/spf13/cobra"

View File

@@ -8,9 +8,9 @@ import (
"strings"
"time"
"cburn/internal/claudeai"
"cburn/internal/cli"
"cburn/internal/config"
"github.com/theirongolddev/cburn/internal/claudeai"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/config"
"github.com/charmbracelet/lipgloss"
"github.com/spf13/cobra"

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"os"
"cburn/internal/cli"
"cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/spf13/cobra"
)

View File

@@ -3,9 +3,9 @@ package cmd
import (
"fmt"
"cburn/internal/config"
"cburn/internal/tui"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/config"
"github.com/theirongolddev/cburn/internal/tui"
"github.com/theirongolddev/cburn/internal/tui/theme"
tea "github.com/charmbracelet/bubbletea"
"github.com/spf13/cobra"

2
go.mod
View File

@@ -1,4 +1,4 @@
module cburn
module github.com/theirongolddev/cburn
go 1.24.2

View File

@@ -148,7 +148,7 @@ func (c *Client) get(ctx context.Context, path string) ([]byte, error) {
req.Header.Set("Cookie", "sessionKey="+c.sessionKey)
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", "cburn/1.0")
req.Header.Set("User-Agent", "github.com/theirongolddev/cburn/1.0")
//nolint:gosec // URL is constructed from const baseURL
resp, err := c.http.Do(req)

View File

@@ -6,8 +6,8 @@ import (
"strings"
"time"
"cburn/internal/config"
"cburn/internal/model"
"github.com/theirongolddev/cburn/internal/config"
"github.com/theirongolddev/cburn/internal/model"
)
// Aggregate computes summary statistics from a slice of session stats,
@@ -51,7 +51,7 @@ func Aggregate(sessions []model.SessionStats, since, until time.Time) model.Summ
// Cache savings (sum across all models found in sessions)
for _, s := range filtered {
for modelName, mu := range s.Models {
stats.CacheSavings += config.CalculateCacheSavings(modelName, mu.CacheReadTokens)
stats.CacheSavings += config.CalculateCacheSavingsAt(modelName, s.StartTime, mu.CacheReadTokens)
}
}

View File

@@ -5,8 +5,8 @@ import (
"path/filepath"
"testing"
"cburn/internal/source"
"cburn/internal/store"
"github.com/theirongolddev/cburn/internal/source"
"github.com/theirongolddev/cburn/internal/store"
)
func BenchmarkLoad(b *testing.B) {

View File

@@ -8,8 +8,8 @@ import (
"sync"
"sync/atomic"
"cburn/internal/source"
"cburn/internal/store"
"github.com/theirongolddev/cburn/internal/source"
"github.com/theirongolddev/cburn/internal/store"
)
// CachedLoadResult extends LoadResult with cache metadata.
@@ -173,5 +173,6 @@ func CacheDir() string {
// CachePath returns the full path to the cache database.
func CachePath() string {
return filepath.Join(CacheDir(), "metrics.db")
// v2 includes historical pricing-aware cost calculations.
return filepath.Join(CacheDir(), "metrics_v2.db")
}

View File

@@ -6,8 +6,8 @@ import (
"sync"
"sync/atomic"
"cburn/internal/model"
"cburn/internal/source"
"github.com/theirongolddev/cburn/internal/model"
"github.com/theirongolddev/cburn/internal/source"
)
// LoadResult holds the output of the full data loading pipeline.

View File

@@ -8,8 +8,8 @@ import (
"os"
"time"
"cburn/internal/config"
"cburn/internal/model"
"github.com/theirongolddev/cburn/internal/config"
"github.com/theirongolddev/cburn/internal/model"
)
// Byte patterns for field extraction.
@@ -173,8 +173,9 @@ func ParseFile(df DiscoveredFile) ParseResult {
}
for _, call := range calls {
call.EstimatedCost = config.CalculateCost(
call.EstimatedCost = config.CalculateCostAt(
call.Model,
call.Timestamp,
call.InputTokens,
call.OutputTokens,
call.CacheCreation5mTokens,

View File

@@ -8,7 +8,7 @@ import (
"path/filepath"
"time"
"cburn/internal/model"
"github.com/theirongolddev/cburn/internal/model"
_ "modernc.org/sqlite" // register sqlite driver
)

View File

@@ -2,7 +2,7 @@
package components
import (
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/lipgloss"
)

View File

@@ -5,7 +5,7 @@ import (
"math"
"strings"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/lipgloss"
)

View File

@@ -5,7 +5,7 @@ import (
"strings"
"time"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/bubbles/progress"
"github.com/charmbracelet/lipgloss"

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"cburn/internal/claudeai"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/claudeai"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/bubbles/progress"
"github.com/charmbracelet/lipgloss"

View File

@@ -3,7 +3,7 @@ package components
import (
"strings"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/lipgloss"
)

View File

@@ -3,8 +3,8 @@ package tui
import (
"fmt"
"cburn/internal/config"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/config"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/huh"
)

View File

@@ -4,9 +4,9 @@ import (
"fmt"
"strings"
"cburn/internal/cli"
"cburn/internal/tui/components"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/tui/components"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/lipgloss"
)

View File

@@ -5,10 +5,10 @@ import (
"strings"
"time"
"cburn/internal/cli"
"cburn/internal/pipeline"
"cburn/internal/tui/components"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/pipeline"
"github.com/theirongolddev/cburn/internal/tui/components"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/lipgloss"
)

View File

@@ -6,10 +6,10 @@ import (
"strings"
"time"
"cburn/internal/cli"
"cburn/internal/config"
"cburn/internal/tui/components"
"cburn/internal/tui/theme"
"github.com/theirongolddev/cburn/internal/cli"
"github.com/theirongolddev/cburn/internal/config"
"github.com/theirongolddev/cburn/internal/tui/components"
"github.com/theirongolddev/cburn/internal/tui/theme"
"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"

View File

@@ -1,7 +1,7 @@
// cburn analyzes Claude Code usage from local JSONL session logs.
package main
import "cburn/cmd"
import "github.com/theirongolddev/cburn/cmd"
func main() {
cmd.Execute()