Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@v6
with:
version: v1.62
version: v2.0

build:
strategy:
Expand Down
5 changes: 3 additions & 2 deletions cmd/ch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ var (

func main() {
// Set version info for CLI
cli.Version = version
v := version
if commit != "none" && len(commit) > 7 {
cli.Version = fmt.Sprintf("%s (%s, %s)", version, commit[:7], date)
v = fmt.Sprintf("%s (%s, %s)", version, commit[:7], date)
}
cli.SetVersion(v)

if err := cli.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
)

func init() {
listCmd.Flags().BoolVarP(&listAgents, "agents", "a", true, "Include agent/subagent conversations (default: true)")
listCmd.Flags().BoolVarP(&listAgents, "agents", "a", false, "Include agent/subagent conversations")
listCmd.Flags().StringVarP(&listProject, "project", "p", "", "Filter by project path")
listCmd.Flags().IntVarP(&listLimit, "limit", "n", 50, "Limit number of results")
listCmd.Flags().BoolVarP(&listGlobal, "global", "g", false, "List from all projects")
Expand Down
7 changes: 7 additions & 0 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ func Execute() error {
return rootCmd.Execute()
}

// SetVersion sets the version string for the CLI.
// Must be called before Execute() to take effect.
func SetVersion(v string) {
Version = v
rootCmd.Version = v
}

var rootCmd = &cobra.Command{
Use: "ch",
Short: "Claude History - view Claude Code conversation history",
Expand Down
Loading