claude-intern 1.0.1 → 1.1.2

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 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
- # Optional: JIRA Status Transition After PR Creation
45
- # Set the status to transition the JIRA task to after successfully creating a PR
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. **Current working directory** (where you run the command)
51
- 3. **User home directory** (`~/.env`)
52
- 4. **Tool installation directory**
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
- For global installation, it's recommended to either:
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 2: Global configuration
84
+ # Option 3: Global configuration
63
85
  cp .env.sample ~/.env
64
86
 
65
- # Option 3: Custom location
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
@@ -186,6 +240,31 @@ claude-intern --jql "\"Epic Link\" = PROJ-100" --create-pr
186
240
  claude-intern --jql "sprint in openSprints() AND assignee = currentUser()" --max-turns 500
187
241
  ```
188
242
 
243
+ ### Automated Processing with Cron
244
+
245
+ You can set up automated task processing using cron jobs. This is useful for continuously picking up new tasks labeled for the intern to work on:
246
+
247
+ ```bash
248
+ # Example: Process tasks labeled "Intern" in open sprints every 10 minutes
249
+ # Add to crontab (run: crontab -e)
250
+ */10 * * * * cd /path/to/your/project && claude-intern --jql 'statusCategory = "To Do" AND sprint in openSprints() AND labels IN (Intern) ORDER BY created DESC' --max-turns 500 --create-pr --pr-target-branch master >> /tmp/claude-intern-cron.log 2>&1
251
+
252
+ # Example: Process assigned tasks every hour
253
+ 0 * * * * cd /path/to/your/project && claude-intern --jql 'assignee = currentUser() AND status = "To Do" AND labels IN (AutoImpl)' --create-pr >> /tmp/claude-intern-cron.log 2>&1
254
+
255
+ # Example: Process high-priority bugs twice daily
256
+ 0 9,17 * * * cd /path/to/your/project && claude-intern --jql 'type = Bug AND priority = High AND status = "To Do" AND labels IN (Intern)' --max-turns 300 --create-pr >> /tmp/claude-intern-cron.log 2>&1
257
+ ```
258
+
259
+ **Important notes for cron setup:**
260
+ - Always change to your project directory (`cd /path/to/your/project`) to ensure the correct `.claude-intern/.env` is loaded
261
+ - Use absolute paths or ensure PATH includes `claude-intern` and `claude` binaries
262
+ - Redirect output to a log file for monitoring (`>> /tmp/claude-intern-cron.log 2>&1`)
263
+ - Use the `ORDER BY created DESC` clause to process newest tasks first
264
+ - Consider using labels (e.g., `labels = "Intern"`) to mark tasks for automated processing
265
+ - Test your JQL query manually before adding to cron to ensure it returns the expected tasks
266
+ - Monitor the log file regularly to ensure the cron job is running successfully
267
+
189
268
  ## What it does
190
269
 
191
270
  1. Fetches the JIRA task details including:
@@ -198,13 +277,27 @@ claude-intern --jql "sprint in openSprints() AND assignee = currentUser()" --max
198
277
 
199
278
  3. Creates a feature branch named `feature/task-id` (e.g., `feature/proj-123`)
200
279
 
201
- 4. Runs `claude -p` with enhanced permissions and extended conversation limits for automatic implementation
280
+ 4. Runs optional feasibility assessment to validate task clarity (skippable with `--skip-clarity-check`)
281
+ - Posts assessment results to JIRA (skippable with `--skip-jira-comments`)
282
+ - Saves assessment results for debugging:
283
+ - `{output-dir}/{task-key}/feasibility-assessment.md` (formatted results with JSON)
284
+ - `{output-dir}/{task-key}/feasibility-assessment-failed.txt` (raw output on parse failure)
285
+
286
+ 5. Runs `claude -p` with enhanced permissions and extended conversation limits for automatic implementation
202
287
 
203
- 5. Automatically commits all changes with a descriptive commit message after Claude completes successfully
288
+ 6. Saves Claude's implementation summary to local files for analysis:
289
+ - `{output-dir}/{task-key}/implementation-summary.md` (successful)
290
+ - `{output-dir}/{task-key}/implementation-summary-incomplete.md` (incomplete/failed)
204
291
 
205
- 6. Pushes the feature branch to remote repository (when creating PRs)
292
+ 7. Automatically commits all changes with a descriptive commit message after Claude completes successfully
206
293
 
207
- 7. Optionally creates pull requests on GitHub or Bitbucket with detailed implementation summaries
294
+ 8. Pushes the feature branch to remote repository (when creating PRs)
295
+
296
+ 9. Optionally creates pull requests on GitHub or Bitbucket with detailed implementation summaries
297
+
298
+ 10. Posts implementation results back to JIRA as comments (skippable with `--skip-jira-comments`)
299
+ - Includes feasibility assessment results
300
+ - Includes implementation summary
208
301
 
209
302
  ## Requirements
210
303
 
@@ -216,14 +309,12 @@ claude-intern --jql "sprint in openSprints() AND assignee = currentUser()" --max
216
309
  ## Quick Start
217
310
 
218
311
  1. Install globally: `npm install -g claude-intern`
219
- 2. Get the sample environment file:
220
- ```bash
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)
312
+ 2. Initialize your project: `claude-intern init`
313
+ 3. Configure your JIRA credentials in `.claude-intern/.env`
225
314
  4. Run from any directory: `claude-intern PROJ-123`
226
315
 
316
+ **Alternative:** For global configuration across all projects, place `.env` in your home directory (`~/.env`)
317
+
227
318
  See [USAGE.md](./USAGE.md) for detailed usage scenarios and troubleshooting.
228
319
  See [GLOBAL_USAGE.md](./GLOBAL_USAGE.md) for quick reference on global installation.
229
320
  See [ENV_SETUP.md](./ENV_SETUP.md) for comprehensive environment configuration guide.