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/CLAUDE.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,26 +9,30 @@ The Slack CLI is a command-line interface for building apps on the Slack Platfor
9
9
## Development Commands
10
10
11
11
### Building
12
+
12
13
```bash
13
14
make build # Build the CLI (includes linting and cleaning)
14
15
make build-ci # Build for CI (skips lint and tests)
15
16
./bin/slack --version # Run the compiled binary
16
17
```
17
18
18
19
### Testing
20
+
19
21
```bash
20
22
make test# Run all unit tests
21
23
make test testdir=cmd/auth testname=TestLoginCommand # Run specific test
22
24
make coverage # View test coverage report
23
25
```
24
26
25
27
### Linting
28
+
26
29
```bash
27
30
make lint # Run golangci-lint
28
31
golangci-lint --version # Verify linter version
29
32
```
30
33
31
34
### Other Commands
35
+
32
36
```bash
33
37
make init # Initialize project (fetch tags, dependencies)
34
38
make clean # Remove build artifacts (bin/, dist/)
@@ -63,11 +67,13 @@ main.go Entry point with tracing and context setup
63
67
### Key Architectural Patterns
64
68
65
69
**Command Aliases**: Many commands have shortcut aliases defined in `cmd/root.go`'s `AliasMap`:
70
+
66
71
-`slack login` → `slack auth login`
67
72
-`slack deploy` → `slack platform deploy`
68
73
-`slack create` → `slack project create`
69
74
70
75
**Client Factory Pattern**: `internal/shared/clients.go` provides a `ClientFactory` that manages shared clients and configurations across commands:
76
+
71
77
-`API()` - Slack API client
72
78
-`Auth()` - Authentication client
73
79
-`AppClient()` - App management client
@@ -84,6 +90,7 @@ Commands receive the `ClientFactory` and use it to access functionality.
84
90
**Hook System**: `internal/hooks/` implements a lifecycle hook system that allows SDK projects to inject custom behavior at key points. The specification exists in `docs/reference/hooks` files.
85
91
86
92
**Experiment System**: Features can be gated behind experiments defined in `internal/experiment/experiment.go`:
93
+
87
94
- Add new experiments as constants
88
95
- Register in `AllExperiments` slice
89
96
- Enable permanently via `EnabledExperiments`
@@ -92,13 +99,15 @@ Commands receive the `ClientFactory` and use it to access functionality.
92
99
### Command Structure
93
100
94
101
Commands follow this pattern:
102
+
95
103
1. Define in `cmd/<category>/<command>.go`
96
104
2. Create a Cobra command with use/short/long descriptions
97
105
3. Add flags specific to that command
98
106
4. Implement `RunE` function that receives clients
0 commit comments