@tanagram/cli 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/commands/run.go +2 -2
- package/commands/sync.go +1 -1
- package/config/config.go +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -129,6 +129,29 @@ If you prefer to manually edit your settings, add this to your `~/.claude/settin
|
|
|
129
129
|
}
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
+
For example, your full `settings.json` file might look like this:
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"alwaysThinkingEnabled": true,
|
|
137
|
+
"hooks": {
|
|
138
|
+
"PostToolUse": [
|
|
139
|
+
{
|
|
140
|
+
"matcher": "Edit|Write",
|
|
141
|
+
"hooks": [
|
|
142
|
+
{
|
|
143
|
+
"type": "command",
|
|
144
|
+
"command": "tanagram"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
If you have existing hooks, you can merge this hook into your existing config.
|
|
154
|
+
|
|
132
155
|
|
|
133
156
|
## How It Works
|
|
134
157
|
|
package/commands/run.go
CHANGED
|
@@ -75,7 +75,7 @@ func Run() error {
|
|
|
75
75
|
// Get API key once upfront before parallel processing
|
|
76
76
|
apiKey, err := config.GetAPIKey()
|
|
77
77
|
if err != nil {
|
|
78
|
-
return
|
|
78
|
+
return err
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
fmt.Printf("\nSyncing policies with LLM (processing %d changed file(s) in parallel)...\n", len(filesToSync))
|
|
@@ -214,7 +214,7 @@ func Run() error {
|
|
|
214
214
|
// Get API key once upfront before checking
|
|
215
215
|
apiKey, err := config.GetAPIKey()
|
|
216
216
|
if err != nil {
|
|
217
|
-
return
|
|
217
|
+
return err
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
// Check changes against policies (both regex and LLM-based)
|
package/commands/sync.go
CHANGED
|
@@ -235,7 +235,7 @@ func FindInstructionFiles(gitRoot string) ([]string, error) {
|
|
|
235
235
|
func getAPIKey() (string, error) {
|
|
236
236
|
apiKey, err := config.GetAPIKey()
|
|
237
237
|
if err != nil {
|
|
238
|
-
return "",
|
|
238
|
+
return "", err
|
|
239
239
|
}
|
|
240
240
|
return apiKey, nil
|
|
241
241
|
}
|
package/config/config.go
CHANGED