@haystackeditor/cli 0.10.0 → 0.10.1
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 +117 -37
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @haystackeditor/cli
|
|
2
2
|
|
|
3
|
-
Set up Haystack for your project. When PRs are opened, Haystack automatically
|
|
3
|
+
Set up Haystack for your project. When PRs are opened, Haystack automatically reviews them for bugs, intent drift, and rule violations — then routes them to the right place.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -63,33 +63,6 @@ This uses GitHub's device flow - you'll get a code to enter at github.com/login/
|
|
|
63
63
|
haystack logout
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
### `haystack secrets`
|
|
67
|
-
|
|
68
|
-
Manage secrets that will be injected into your sandbox environment:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# List all secrets (keys only, values are never shown)
|
|
72
|
-
haystack secrets list
|
|
73
|
-
|
|
74
|
-
# Set a secret
|
|
75
|
-
haystack secrets set OPENAI_API_KEY sk-xxx
|
|
76
|
-
|
|
77
|
-
# Delete a secret
|
|
78
|
-
haystack secrets delete OPENAI_API_KEY
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Secrets are encrypted and stored securely. They're automatically injected as environment variables when the sandbox runs your app.
|
|
82
|
-
|
|
83
|
-
**Scopes**: By default, secrets are user-scoped. You can also scope to an org or repo:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# Org-scoped (available to all repos in the org)
|
|
87
|
-
haystack secrets set API_KEY xxx --scope org --scope-id myorg
|
|
88
|
-
|
|
89
|
-
# Repo-scoped (available only to this repo)
|
|
90
|
-
haystack secrets set API_KEY xxx --scope repo --scope-id owner/repo
|
|
91
|
-
```
|
|
92
|
-
|
|
93
66
|
### `haystack submit`
|
|
94
67
|
|
|
95
68
|
Create a PR from current changes. Runs pre-PR triage (code review, rules validation, intent drift), pushes your branch, and opens the PR.
|
|
@@ -136,6 +109,121 @@ haystack check-pending --json # Machine-readable JSON
|
|
|
136
109
|
haystack check-pending --clear # Clear pending state
|
|
137
110
|
```
|
|
138
111
|
|
|
112
|
+
### `haystack dismiss`
|
|
113
|
+
|
|
114
|
+
Dismiss analysis findings for a PR, moving it from "Issues Found" to "Good to Merge" in the feed. The override is tied to the PR's current HEAD commit.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
haystack dismiss 42 # Dismiss findings for PR #42
|
|
118
|
+
haystack dismiss acme/widgets#99 # Dismiss for specific repo
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### `haystack undismiss`
|
|
122
|
+
|
|
123
|
+
Clear all overrides (dismissed findings and/or review-not-needed) for a PR, returning it to its original feed bucket.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
haystack undismiss 42 # Undo overrides for PR #42
|
|
127
|
+
haystack undismiss acme/widgets#99 # Undo for specific repo
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### `haystack mark-reviewed`
|
|
131
|
+
|
|
132
|
+
Mark human review as not needed for a PR, moving it from "Needs Review" to "Good to Merge" in the feed. The override is tied to the PR's current HEAD commit.
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
haystack mark-reviewed 42 # Mark review not needed for PR #42
|
|
136
|
+
haystack mark-reviewed acme/widgets#99 # Mark for specific repo
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### `haystack pr-status`
|
|
140
|
+
|
|
141
|
+
Show what bucket a PR is in within the Haystack pipeline (analyzing, auto-fixing, good-to-merge, issues, needs-assignment, etc.):
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
haystack pr-status 42 # Current repo, PR #42
|
|
145
|
+
haystack pr-status acme/widgets#99 # Specific repo
|
|
146
|
+
haystack pr-status https://github.com/o/r/pull/1 # From URL
|
|
147
|
+
haystack pr-status 42 --json # Machine-readable output
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### `haystack config`
|
|
151
|
+
|
|
152
|
+
Manage user preferences:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Agentic tool selection
|
|
156
|
+
haystack config agentic-tool # Show current setting
|
|
157
|
+
haystack config agentic-tool opencode # Use Haystack billing (default)
|
|
158
|
+
haystack config agentic-tool claude-code # Use your Claude Max subscription
|
|
159
|
+
haystack config agentic-tool codex # Use your ChatGPT subscription
|
|
160
|
+
|
|
161
|
+
# Auto-merge for safe PRs
|
|
162
|
+
haystack config auto-merge # Show current status
|
|
163
|
+
haystack config auto-merge on # Enable auto-merge
|
|
164
|
+
haystack config auto-merge off # Disable auto-merge
|
|
165
|
+
|
|
166
|
+
# AI reviewer wait list
|
|
167
|
+
haystack config wait-for-reviewers # Show status
|
|
168
|
+
haystack config wait-for-reviewers add cursor # Wait for Cursor BugBot
|
|
169
|
+
haystack config wait-for-reviewers add cursor coderabbit # Add multiple
|
|
170
|
+
haystack config wait-for-reviewers remove cursor # Stop waiting
|
|
171
|
+
haystack config wait-for-reviewers clear # Wait for none
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### `haystack skills`
|
|
175
|
+
|
|
176
|
+
Manage AI skills for your coding CLI:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
haystack skills install # Auto-detect CLI and install
|
|
180
|
+
haystack skills install --cli codex # Install for Codex only
|
|
181
|
+
haystack skills install --cli manual # Show manual setup instructions
|
|
182
|
+
haystack skills list # List available skills
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### `haystack hooks`
|
|
186
|
+
|
|
187
|
+
Manage git hooks for AI agent quality checks:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Install hooks + Entire CLI
|
|
191
|
+
haystack hooks install # Install with pinned Entire version
|
|
192
|
+
haystack hooks install --force # Overwrite existing hooks
|
|
193
|
+
haystack hooks install --skip-entire # Only install Haystack hooks
|
|
194
|
+
|
|
195
|
+
# Status and updates
|
|
196
|
+
haystack hooks status # Check installation status
|
|
197
|
+
haystack hooks update # Update Entire CLI to latest
|
|
198
|
+
|
|
199
|
+
# Session hooks (check-pending on CLI start)
|
|
200
|
+
haystack hooks install-session # Auto-detect CLIs
|
|
201
|
+
haystack hooks install-session --cli claude # Claude Code only
|
|
202
|
+
haystack hooks install-session --cli all # All detected CLIs
|
|
203
|
+
haystack hooks session-status # Check session hook status
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### `haystack policy`
|
|
207
|
+
|
|
208
|
+
Manage review policies (`.haystack/review-policy.md`):
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# List and inspect
|
|
212
|
+
haystack policy list # List all policies
|
|
213
|
+
|
|
214
|
+
# Add policies
|
|
215
|
+
haystack policy add # Interactive add
|
|
216
|
+
haystack policy add "Database changes" # Start with name
|
|
217
|
+
haystack policy add-instruction "Never flag weak test coverage as needing review"
|
|
218
|
+
|
|
219
|
+
# Remove policies
|
|
220
|
+
haystack policy remove "Database changes"
|
|
221
|
+
|
|
222
|
+
# Initialize with defaults
|
|
223
|
+
haystack policy init # Create with sensible defaults
|
|
224
|
+
haystack policy init --force # Overwrite existing
|
|
225
|
+
```
|
|
226
|
+
|
|
139
227
|
---
|
|
140
228
|
|
|
141
229
|
## Configuration
|
|
@@ -145,15 +233,7 @@ The `setup` wizard writes `.haystack.json` to your repos with discovered rules,
|
|
|
145
233
|
```json
|
|
146
234
|
{
|
|
147
235
|
"version": "1",
|
|
148
|
-
"name": "my-app"
|
|
149
|
-
"dev_server": {
|
|
150
|
-
"command": "pnpm dev",
|
|
151
|
-
"port": 3000,
|
|
152
|
-
"ready_pattern": "Local:",
|
|
153
|
-
"env": {
|
|
154
|
-
"SKIP_AUTH": "true"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
236
|
+
"name": "my-app"
|
|
157
237
|
}
|
|
158
238
|
```
|
|
159
239
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Haystack CLI
|
|
4
4
|
*
|
|
5
|
-
* Set up your project for Haystack
|
|
6
|
-
*
|
|
5
|
+
* Set up your project for Haystack.
|
|
6
|
+
* Automated PR review, triage, and merge queue for AI-assisted development.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* npx @haystackeditor/cli init # Set up .haystack.json
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Haystack CLI
|
|
4
4
|
*
|
|
5
|
-
* Set up your project for Haystack
|
|
6
|
-
*
|
|
5
|
+
* Set up your project for Haystack.
|
|
6
|
+
* Automated PR review, triage, and merge queue for AI-assisted development.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* npx @haystackeditor/cli init # Set up .haystack.json
|
|
@@ -37,8 +37,8 @@ import { setupCommand } from './commands/setup.js';
|
|
|
37
37
|
const program = new Command();
|
|
38
38
|
program
|
|
39
39
|
.name('haystack')
|
|
40
|
-
.description('
|
|
41
|
-
.version('0.
|
|
40
|
+
.description('Haystack CLI — automated PR review, triage, and merge queue')
|
|
41
|
+
.version('0.10.1');
|
|
42
42
|
program
|
|
43
43
|
.command('init')
|
|
44
44
|
.description('Create .haystack.json configuration')
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haystackeditor/cli",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "Set up Haystack
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"description": "Set up Haystack for your project — automated PR review, triage, and merge queue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"haystack": "./dist/index.js"
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"haystack",
|
|
17
|
-
"
|
|
18
|
-
"sandbox",
|
|
17
|
+
"code-review",
|
|
19
18
|
"ai-agent",
|
|
20
|
-
"
|
|
19
|
+
"pull-request",
|
|
20
|
+
"triage",
|
|
21
21
|
"cli"
|
|
22
22
|
],
|
|
23
23
|
"author": "Haystack",
|