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
This repo is the ShellTime CLI and daemon. Public-facing docs, command examples, and product references should use `ShellTime` and `shelltime.xyz`.
5
+
6
+
Code and imports currently use the module path `github.com/malamtime/cli`. Do not "fix" ShellTime branding in docs just because the module path says `malamtime`; the mismatch is intentional in the current repo state.
7
+
8
+
## Project Structure & Package Boundaries
4
9
This is a Go monorepo for the ShellTime CLI and daemon.
Keep new code in the existing package boundary; avoid mixing CLI wiring, daemon internals, and model logic.
11
+
-`cmd/cli/main.go`: CLI entrypoint for `shelltime`
12
+
-`cmd/daemon/main.go`: daemon entrypoint for `shelltime-daemon`
13
+
-`commands/`: CLI command definitions and user-facing command behavior
14
+
-`daemon/`: background services, socket handling, processors, and OTEL handlers
15
+
-`model/`: config, API clients, shell integrations, crypto, and shared domain logic
16
+
-`docs/`: user-facing docs such as `CONFIG.md` and `CC_STATUSLINE.md`
17
+
-`fixtures/`: reusable test fixtures
18
+
19
+
Keep new code inside the existing package boundary. Do not mix CLI wiring, daemon internals, and model logic in the same package.
14
20
15
21
## Build, Test, and Development Commands
22
+
16
23
-`go build -o shelltime ./cmd/cli/main.go`: build the CLI binary
17
24
-`go build -o shelltime-daemon ./cmd/daemon/main.go`: build the daemon binary
18
-
-`go test -timeout 3m -coverprofile=coverage.txt -covermode=atomic ./...`: run full test suite with coverage (matches CI)
19
-
-`go test ./commands/...` (or `./daemon/...`, `./model/...`): package-level tests
20
-
-`go test -run TestName ./daemon/`: run a single test
21
-
-`go fmt ./... && go vet ./...`: format and static checks
22
-
-`mockery`: regenerate mocks (configured by `.mockery.yml`)
23
-
-`pp g`: regenerate PromptPal-generated types before tests/releases
25
+
-`go test -timeout 3m -coverprofile=coverage.txt -covermode=atomic ./...`: run the full suite with coverage
26
+
-`go test ./commands/...`: run command-package tests
27
+
-`go test ./daemon/...`: run daemon-package tests
28
+
-`go test ./model/...`: run model-package tests
29
+
-`go test -run TestName ./daemon/`: run a targeted daemon test
30
+
-`go fmt ./...`: format Go code
31
+
-`go vet ./...`: run static analysis
32
+
-`mockery`: regenerate mocks when interfaces change
33
+
-`pp g`: regenerate PromptPal-generated artifacts when relevant
34
+
35
+
Use Go 1.26, as declared in `go.mod`.
24
36
25
37
## Coding Style & Naming Conventions
26
-
Use standard Go conventions and keep code `gofmt`-clean (tabs, canonical spacing/import grouping).
27
-
- File naming: lowercase with underscores or dotted qualifiers (for example `daemon.install.go`, `api.base.go`)
28
-
- Tests: `*_test.go` files with clear `TestXxx` names
29
-
- Commits and scopes should reflect touched package areas (`commands`, `daemon`, `model`, `docs`)
38
+
Use standard Go conventions and keep code `gofmt`-clean.
30
39
31
-
## Testing Guidelines
32
-
Testing uses Go `testing` plus `testify`.
40
+
- File naming: lowercase with underscores or dotted qualifiers such as `daemon.install.go` or `api.base.go`
41
+
- Tests: `*_test.go` with clear `TestXxx` names
33
42
- Prefer table-driven tests for pure logic
34
-
- Use suite-based tests (`suite.Suite`, `SetupTest`, `TearDownTest`) for stateful daemon flows
35
-
- Keep fixtures in `fixtures/` when payloads are reused
36
-
- Ensure `go test -timeout 3m -coverprofile=coverage.txt -covermode=atomic ./...` passes before opening PRs
43
+
- Use `testify` suites for stateful daemon flows
44
+
- Keep comments brief and only where they reduce real ambiguity
45
+
46
+
## Testing Guidance
47
+
48
+
- Put reusable payloads and fixtures under `fixtures/`
49
+
- Prefer package-level test runs while iterating, then run the full suite before finishing
50
+
- Ensure `go test -timeout 3m -coverprofile=coverage.txt -covermode=atomic ./...` passes before opening a PR or cutting a release
51
+
52
+
## Documentation Maintenance
53
+
When command behavior, setup flow, config formats, or integrations change, update the docs in the same change.
54
+
55
+
-`README.md`: concise user-facing overview, install/setup flow, current command surface, and links
56
+
-`docs/CONFIG.md`: detailed config semantics, file locations, defaults, and OTEL settings
57
+
-`docs/CC_STATUSLINE.md`: Claude Code statusline behavior, formatting, and platform notes
58
+
-`AGENTS.md`: contributor and agent workflow guidance for this repo
59
+
60
+
Do not leave `README.md` advertising commands that no longer exist, and do not document new commands only in code.
37
61
38
62
## Commit & Pull Request Guidelines
39
-
History follows Conventional Commits with scope, e.g. `fix(daemon): ...`, `feat(commands): ...`, `refactor(model): ...`.
40
-
- Write focused commits with one behavioral change each
41
-
- PRs should include: concise summary, why the change is needed, and test evidence
42
-
- Link related issues when applicable
43
-
- If behavior/output changes, include CLI examples or screenshots
44
-
- Regenerate artifacts (`pp g`, `mockery`) when relevant so CI stays green
63
+
History follows Conventional Commits with scope, for example:
64
+
65
+
-`fix(daemon): ...`
66
+
-`feat(commands): ...`
67
+
-`refactor(model): ...`
68
+
-`docs(readme): ...`
69
+
70
+
Keep commits focused on one behavioral change. PRs should include a short summary, why the change is needed, and test evidence. Link related issues when applicable. If behavior or output changes, include CLI examples or screenshots. Regenerate artifacts such as `pp g` and `mockery` when needed so CI remains green.
Track and analyze your DevOps workflow. [shelltime.xyz](https://shelltime.xyz)
6
+
ShellTime is a CLI and background daemon for tracking shell activity, syncing command history, and wiring AI coding tools into a shared telemetry stream. The public product and hosted service are ShellTime at [shelltime.xyz](https://shelltime.xyz).
7
+
8
+
The Go module path is `github.com/malamtime/cli`. That naming mismatch is intentional in this repo today; use `ShellTime` for product-facing docs and `github.com/malamtime/cli` for imports and module references.
0 commit comments