You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ go test ./internal/git/... -v -run TestFunctionName
21
21
22
22
## Architecture
23
23
24
-
Spark is a Go CLI tool (`module spark`, binary `spark`) for managing multiple Git repositories, AI agent configs, scripts, and task workflows. Built with **Cobra** (CLI), **Viper** (config), **PTerm** + **Bubble Tea** (TUI), tested with **Ginkgo/Gomega** (BDD).
24
+
Spark is a Go CLI tool (`module spark`, binary `spark`) for managing multiple Git repositories, scripts, and task workflows. Built with **Cobra** (CLI), **Viper** (config), **PTerm** + **Bubble Tea** (TUI), tested with **Ginkgo/Gomega** (BDD).
25
25
26
26
### Code Structure
27
27
@@ -30,33 +30,32 @@ Spark is a Go CLI tool (`module spark`, binary `spark`) for managing multiple Gi
30
30
-`cmd/git/` — Git repo management commands
31
31
-`cmd/magic/` — System utility commands (DNS flush, mirror switching)
32
32
-`cmd/script/` — Script management commands
33
-
-`cmd/agent.go`, `cmd/agent_profile.go`, `cmd/task.go` — Top-level commands in the root `cmd/` package
33
+
-`cmd/task.go` — Top-level task commands in the root `cmd/` package
34
34
-**`internal/`** — Business logic, separated by domain:
35
-
-`agent/` — AI agent config management (Claude Code, Codex, Kimi, GLM) and profile templates
└── magic [flush-dns|pip|go|node] # Mirror source switching + DNS
55
54
```
56
55
57
56
### Key Patterns
58
57
59
-
-**TUI mode**: `task`, `agent`, and other commands accept `--tui` flag for interactive mode with Bubble Tea selectors and PTerm spinners. CLI mode is the default.
58
+
-**TUI mode**: `task` and other commands accept `--tui` flag for interactive mode with Bubble Tea selectors and PTerm spinners. CLI mode is the default.
60
59
-**Config binding**: Flags are bound to Viper via `viper.BindPFlag()` in `init()` functions. Config keys use snake_case in YAML but camelCase in struct tags.
61
60
-**Script sources**: Scripts can come from `~/.spark.yaml` (`spark.scripts` or top-level `scripts`) or from a `scripts/` directory. Config scripts take precedence.
0 commit comments