claude-intern 1.0.1 → 1.1.0
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/.env.sample +2 -5
- package/README.md +85 -19
- package/dist/index.js +299 -152
- package/package.json +2 -1
package/.env.sample
CHANGED
|
@@ -41,8 +41,5 @@ CLAUDE_CLI_PATH=claude
|
|
|
41
41
|
|
|
42
42
|
# Note: Bitbucket workspace is automatically detected from your git remote URL
|
|
43
43
|
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
# Common values: "In Review", "Code Review", "Under Review", "Ready for Review"
|
|
47
|
-
# Leave empty or comment out to skip status transition
|
|
48
|
-
# JIRA_PR_STATUS=In Review
|
|
44
|
+
# Note: JIRA PR status transitions are now configured per-project in .claude-intern/settings.json
|
|
45
|
+
# See settings.json for configuring different PR statuses for different JIRA projects
|
package/README.md
CHANGED
|
@@ -42,27 +42,49 @@ bun run install-global
|
|
|
42
42
|
|
|
43
43
|
## Configuration
|
|
44
44
|
|
|
45
|
+
### Quick Setup with Init Command
|
|
46
|
+
|
|
47
|
+
The easiest way to set up claude-intern for your project is using the `init` command:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Initialize project-specific configuration
|
|
51
|
+
claude-intern init
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This creates a `.claude-intern` folder in your current project with:
|
|
55
|
+
- `.env` - Your project-specific configuration file with JIRA credentials
|
|
56
|
+
- `.env.sample` - Template with all configuration options
|
|
57
|
+
- `settings.json` - Per-project settings (PR status transitions, etc.)
|
|
58
|
+
|
|
59
|
+
**Automatic .gitignore Protection:** The `init` command automatically adds `.claude-intern/.env` to your `.gitignore` file (or creates one if it doesn't exist) to prevent accidentally committing credentials to version control.
|
|
60
|
+
|
|
61
|
+
After running `init`:
|
|
62
|
+
1. Edit `.claude-intern/.env` with your JIRA credentials
|
|
63
|
+
2. (Optional) Edit `.claude-intern/settings.json` to configure per-project PR status transitions
|
|
64
|
+
|
|
45
65
|
### Environment File Setup
|
|
46
66
|
|
|
47
67
|
The tool searches for `.env` files in the following order:
|
|
48
68
|
|
|
49
69
|
1. **Custom path** (if specified with `--env-file`)
|
|
50
|
-
2. **
|
|
51
|
-
3. **
|
|
52
|
-
4. **
|
|
70
|
+
2. **Project-specific** (`.claude-intern/.env` - recommended)
|
|
71
|
+
3. **Current working directory** (`.env`)
|
|
72
|
+
4. **User home directory** (`~/.env`)
|
|
73
|
+
5. **Tool installation directory**
|
|
53
74
|
|
|
54
|
-
|
|
55
|
-
- Place `.env` in your project directory (most common)
|
|
56
|
-
- Place `.env` in your home directory (`~/.env`) for global access
|
|
75
|
+
Configuration options:
|
|
57
76
|
|
|
58
77
|
```bash
|
|
59
78
|
# Option 1: Project-specific (recommended)
|
|
79
|
+
claude-intern init # Creates .claude-intern/.env
|
|
80
|
+
|
|
81
|
+
# Option 2: Current directory
|
|
60
82
|
cp .env.sample .env
|
|
61
83
|
|
|
62
|
-
# Option
|
|
84
|
+
# Option 3: Global configuration
|
|
63
85
|
cp .env.sample ~/.env
|
|
64
86
|
|
|
65
|
-
# Option
|
|
87
|
+
# Option 4: Custom location
|
|
66
88
|
claude-intern PROJ-123 --env-file /path/to/custom.env
|
|
67
89
|
```
|
|
68
90
|
|
|
@@ -77,10 +99,35 @@ Update your `.env` file with your JIRA details:
|
|
|
77
99
|
Optional PR integration:
|
|
78
100
|
- `GITHUB_TOKEN`: GitHub personal access token for creating pull requests
|
|
79
101
|
- `BITBUCKET_TOKEN`: Bitbucket app password for creating pull requests
|
|
80
|
-
- `JIRA_PR_STATUS`: Auto-transition JIRA status after PR creation (e.g., "In Review")
|
|
81
102
|
|
|
82
103
|
The `.env.sample` file includes helpful comments and optional configuration options.
|
|
83
104
|
|
|
105
|
+
**Note:** JIRA PR status transitions are now configured per-project in `settings.json` (see below).
|
|
106
|
+
|
|
107
|
+
### Per-Project Settings (settings.json)
|
|
108
|
+
|
|
109
|
+
The `.claude-intern/settings.json` file allows you to configure project-specific behavior:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"projects": {
|
|
114
|
+
"PROJ": {
|
|
115
|
+
"prStatus": "In Review"
|
|
116
|
+
},
|
|
117
|
+
"ABC": {
|
|
118
|
+
"prStatus": "Code Review"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Configuration options:**
|
|
125
|
+
- `prStatus`: JIRA status to transition to after PR creation for a specific project
|
|
126
|
+
- Each project key can have its own status workflow
|
|
127
|
+
- If not configured, no status transition will occur
|
|
128
|
+
|
|
129
|
+
**Example:** If you work with multiple JIRA projects that have different workflows (e.g., "PROJ" uses "In Review" but "ABC" uses "Code Review"), configure each project's status in `settings.json`.
|
|
130
|
+
|
|
84
131
|
## Usage
|
|
85
132
|
|
|
86
133
|
### Single Task Processing
|
|
@@ -121,6 +168,13 @@ claude-intern TASK-123 --create-pr
|
|
|
121
168
|
|
|
122
169
|
# Create pull request targeting specific branch
|
|
123
170
|
claude-intern TASK-123 --create-pr --pr-target-branch develop
|
|
171
|
+
|
|
172
|
+
# Testing options - skip ALL JIRA comments (feasibility + implementation)
|
|
173
|
+
claude-intern TASK-123 --skip-jira-comments
|
|
174
|
+
|
|
175
|
+
# Local testing without PR (commits stay local, no push to remote)
|
|
176
|
+
# Simply omit --create-pr to skip pushing to remote
|
|
177
|
+
claude-intern TASK-123 --skip-jira-comments
|
|
124
178
|
```
|
|
125
179
|
|
|
126
180
|
#### Local Development Usage
|
|
@@ -198,13 +252,27 @@ claude-intern --jql "sprint in openSprints() AND assignee = currentUser()" --max
|
|
|
198
252
|
|
|
199
253
|
3. Creates a feature branch named `feature/task-id` (e.g., `feature/proj-123`)
|
|
200
254
|
|
|
201
|
-
4. Runs
|
|
255
|
+
4. Runs optional feasibility assessment to validate task clarity (skippable with `--skip-clarity-check`)
|
|
256
|
+
- Posts assessment results to JIRA (skippable with `--skip-jira-comments`)
|
|
257
|
+
- Saves assessment results for debugging:
|
|
258
|
+
- `{output-dir}/{task-key}/feasibility-assessment.md` (formatted results with JSON)
|
|
259
|
+
- `{output-dir}/{task-key}/feasibility-assessment-failed.txt` (raw output on parse failure)
|
|
260
|
+
|
|
261
|
+
5. Runs `claude -p` with enhanced permissions and extended conversation limits for automatic implementation
|
|
262
|
+
|
|
263
|
+
6. Saves Claude's implementation summary to local files for analysis:
|
|
264
|
+
- `{output-dir}/{task-key}/implementation-summary.md` (successful)
|
|
265
|
+
- `{output-dir}/{task-key}/implementation-summary-incomplete.md` (incomplete/failed)
|
|
202
266
|
|
|
203
|
-
|
|
267
|
+
7. Automatically commits all changes with a descriptive commit message after Claude completes successfully
|
|
204
268
|
|
|
205
|
-
|
|
269
|
+
8. Pushes the feature branch to remote repository (when creating PRs)
|
|
206
270
|
|
|
207
|
-
|
|
271
|
+
9. Optionally creates pull requests on GitHub or Bitbucket with detailed implementation summaries
|
|
272
|
+
|
|
273
|
+
10. Posts implementation results back to JIRA as comments (skippable with `--skip-jira-comments`)
|
|
274
|
+
- Includes feasibility assessment results
|
|
275
|
+
- Includes implementation summary
|
|
208
276
|
|
|
209
277
|
## Requirements
|
|
210
278
|
|
|
@@ -216,14 +284,12 @@ claude-intern --jql "sprint in openSprints() AND assignee = currentUser()" --max
|
|
|
216
284
|
## Quick Start
|
|
217
285
|
|
|
218
286
|
1. Install globally: `npm install -g claude-intern`
|
|
219
|
-
2.
|
|
220
|
-
|
|
221
|
-
# Download .env.sample from the repository
|
|
222
|
-
curl -o .env https://raw.githubusercontent.com/danii1/claude-intern/master/.env.sample
|
|
223
|
-
```
|
|
224
|
-
3. Configure your JIRA credentials in `.env` (or `~/.env` for global access)
|
|
287
|
+
2. Initialize your project: `claude-intern init`
|
|
288
|
+
3. Configure your JIRA credentials in `.claude-intern/.env`
|
|
225
289
|
4. Run from any directory: `claude-intern PROJ-123`
|
|
226
290
|
|
|
291
|
+
**Alternative:** For global configuration across all projects, place `.env` in your home directory (`~/.env`)
|
|
292
|
+
|
|
227
293
|
See [USAGE.md](./USAGE.md) for detailed usage scenarios and troubleshooting.
|
|
228
294
|
See [GLOBAL_USAGE.md](./GLOBAL_USAGE.md) for quick reference on global installation.
|
|
229
295
|
See [ENV_SETUP.md](./ENV_SETUP.md) for comprehensive environment configuration guide.
|