claude-intern 1.0.0 → 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 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
@@ -2,7 +2,23 @@
2
2
 
3
3
  Your AI intern for automatically implementing JIRA tasks using Claude. Supports both single task processing and batch processing of multiple tasks through JQL queries or explicit task lists. Pulls task details and feeds them to Claude for implementation with full automation of the development workflow.
4
4
 
5
- ## Setup
5
+ ## Installation
6
+
7
+ ### Global Installation (Recommended)
8
+
9
+ Install globally via npm to use from any directory:
10
+
11
+ ```bash
12
+ # Install globally
13
+ npm install -g claude-intern
14
+
15
+ # Or use directly without installing
16
+ npx claude-intern PROJ-123
17
+ ```
18
+
19
+ ### Local Development Setup
20
+
21
+ For development or contributing to the project:
6
22
 
7
23
  1. Install Bun (if not already installed):
8
24
 
@@ -10,19 +26,71 @@ Your AI intern for automatically implementing JIRA tasks using Claude. Supports
10
26
  curl -fsSL https://bun.sh/install | bash
11
27
  ```
12
28
 
13
- 2. Install dependencies:
29
+ 2. Clone and install dependencies:
14
30
 
15
31
  ```bash
32
+ git clone https://github.com/danii1/claude-intern.git
33
+ cd claude-intern
16
34
  bun install
17
35
  ```
18
36
 
19
- 3. Copy `.env.sample` to `.env` and configure your JIRA credentials:
37
+ 3. (Optional) Install development version globally:
38
+
39
+ ```bash
40
+ bun run install-global
41
+ ```
42
+
43
+ ## Configuration
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
+
65
+ ### Environment File Setup
66
+
67
+ The tool searches for `.env` files in the following order:
68
+
69
+ 1. **Custom path** (if specified with `--env-file`)
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**
74
+
75
+ Configuration options:
20
76
 
21
77
  ```bash
78
+ # Option 1: Project-specific (recommended)
79
+ claude-intern init # Creates .claude-intern/.env
80
+
81
+ # Option 2: Current directory
22
82
  cp .env.sample .env
83
+
84
+ # Option 3: Global configuration
85
+ cp .env.sample ~/.env
86
+
87
+ # Option 4: Custom location
88
+ claude-intern PROJ-123 --env-file /path/to/custom.env
23
89
  ```
24
90
 
25
- 4. Update `.env` with your JIRA details:
91
+ ### Required Configuration
92
+
93
+ Update your `.env` file with your JIRA details:
26
94
 
27
95
  - `JIRA_BASE_URL`: Your JIRA instance URL (e.g., https://yourcompany.atlassian.net)
28
96
  - `JIRA_EMAIL`: Your JIRA email address
@@ -31,122 +99,145 @@ cp .env.sample .env
31
99
  Optional PR integration:
32
100
  - `GITHUB_TOKEN`: GitHub personal access token for creating pull requests
33
101
  - `BITBUCKET_TOKEN`: Bitbucket app password for creating pull requests
34
- - `JIRA_PR_STATUS`: Auto-transition JIRA status after PR creation (e.g., "In Review")
35
102
 
36
103
  The `.env.sample` file includes helpful comments and optional configuration options.
37
104
 
38
- 5. (Optional) Install globally to use from any directory:
105
+ **Note:** JIRA PR status transitions are now configured per-project in `settings.json` (see below).
39
106
 
40
- ```bash
41
- bun run install-global
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
+ }
42
122
  ```
43
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
+
44
131
  ## Usage
45
132
 
46
133
  ### Single Task Processing
47
134
 
48
135
  ```bash
49
- # Run with a JIRA task key (automatically runs Claude)
50
- bun start TASK-123
136
+ # Global installation usage (recommended)
137
+ claude-intern TASK-123
51
138
 
52
- # Development mode (same as start with Bun)
53
- bun run dev TASK-123
139
+ # Or use with npx (no installation needed)
140
+ npx claude-intern TASK-123
54
141
 
55
142
  # Skip Claude and just fetch/format the task
56
- bun start TASK-123 -- --no-claude
143
+ claude-intern TASK-123 --no-claude
57
144
 
58
145
  # Skip git branch creation
59
- bun start TASK-123 -- --no-git
146
+ claude-intern TASK-123 --no-git
60
147
 
61
148
  # Use custom .env file
62
- bun start TASK-123 -- --env-file /path/to/custom.env
149
+ claude-intern TASK-123 --env-file /path/to/custom.env
63
150
 
64
151
  # Specify custom output file
65
- bun start TASK-123 -- -o my-task.md
152
+ claude-intern TASK-123 -o my-task.md
66
153
 
67
154
  # Verbose output for debugging
68
- bun start TASK-123 -- -v
155
+ claude-intern TASK-123 -v
69
156
 
70
157
  # Custom Claude CLI path
71
- bun start TASK-123 -- --claude-path /path/to/claude
158
+ claude-intern TASK-123 --claude-path /path/to/claude
72
159
 
73
160
  # Increase max turns for complex tasks
74
- bun start TASK-123 -- --max-turns 50
161
+ claude-intern TASK-123 --max-turns 50
75
162
 
76
163
  # Skip automatic commit after Claude completes
77
- bun start TASK-123 -- --no-auto-commit
164
+ claude-intern TASK-123 --no-auto-commit
78
165
 
79
166
  # Create pull request after implementation
80
- bun start TASK-123 -- --create-pr
167
+ claude-intern TASK-123 --create-pr
81
168
 
82
169
  # Create pull request targeting specific branch
83
- bun start TASK-123 -- --create-pr --pr-target-branch develop
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
178
+ ```
179
+
180
+ #### Local Development Usage
181
+
182
+ ```bash
183
+ # Run with Bun during development
184
+ bun start TASK-123
185
+
186
+ # Development mode (same as start)
187
+ bun run dev TASK-123
188
+
189
+ # All options work with bun as well (note the -- separator)
190
+ bun start TASK-123 -- --no-claude --verbose
84
191
  ```
85
192
 
86
193
  ### Batch Processing (Multiple Tasks)
87
194
 
88
195
  ```bash
89
196
  # Process multiple specific tasks
90
- bun start PROJ-123 PROJ-124 PROJ-125
197
+ claude-intern PROJ-123 PROJ-124 PROJ-125
91
198
 
92
199
  # Process tasks matching JQL query
93
- bun start -- --jql "project = PROJ AND status = 'To Do'"
200
+ claude-intern --jql "project = PROJ AND status = 'To Do'"
94
201
 
95
202
  # Complex JQL with custom fields and conditions
96
- bun start -- --jql "project = \"My Project\" AND cf[10016] <= 3 AND labels IN (FrontEnd, MobileApp)"
203
+ claude-intern --jql "project = \"My Project\" AND cf[10016] <= 3 AND labels IN (FrontEnd, MobileApp)"
97
204
 
98
205
  # Batch process with PR creation
99
- bun start -- --jql "assignee = currentUser() AND status = 'To Do'" --create-pr
206
+ claude-intern --jql "assignee = currentUser() AND status = 'To Do'" --create-pr
100
207
 
101
208
  # High-complexity batch processing with extended turns
102
- bun start -- --jql "labels = 'refactoring' AND type = Story" --max-turns 500 --create-pr
209
+ claude-intern --jql "labels = 'refactoring' AND type = Story" --max-turns 500 --create-pr
103
210
 
104
211
  # Batch process with skipped clarity checks for faster processing
105
- bun start PROJ-101 PROJ-102 PROJ-103 -- --skip-clarity-check --create-pr
212
+ claude-intern PROJ-101 PROJ-102 PROJ-103 --skip-clarity-check --create-pr
106
213
  ```
107
214
 
108
- ### Examples
215
+ #### Local Development Batch Processing
109
216
 
110
217
  ```bash
111
- # Fetch JIRA task and run Claude automatically
112
- bun start PROJ-456
113
-
114
- # Just fetch and format (useful for reviewing before Claude runs)
115
- bun start PROJ-456 -- --no-claude
116
-
117
- # Then manually run Claude with the formatted output
118
- claude -p --dangerously-skip-permissions --max-turns 10 < task-details.md
218
+ # Process multiple tasks with Bun
219
+ bun start PROJ-123 PROJ-124 PROJ-125
119
220
 
120
- # Development mode (same as start with Bun)
121
- bun run dev PROJ-456
221
+ # JQL queries (note -- separator for options)
222
+ bun start -- --jql "project = PROJ AND status = 'To Do'"
223
+ bun start -- --jql "assignee = currentUser()" --create-pr
122
224
  ```
123
225
 
124
- ### Global Usage (from any directory)
125
-
126
- After installing globally, you can run the tool from any directory (especially useful when working in your project's git repository):
226
+ ### Quick Examples
127
227
 
128
228
  ```bash
129
- # Single task processing
130
- claude-intern PROJ-123
131
-
132
- # Multiple task processing
133
- claude-intern PROJ-123 PROJ-124 PROJ-125
229
+ # Fetch JIRA task and run Claude automatically
230
+ claude-intern PROJ-456
134
231
 
135
- # JQL query processing
136
- claude-intern --jql "project = PROJ AND status = 'To Do'"
137
- claude-intern --jql "assignee = currentUser() AND labels = 'frontend' AND type = Bug"
232
+ # Just fetch and format (useful for reviewing before Claude runs)
233
+ claude-intern PROJ-456 --no-claude
138
234
 
139
- # All the same options work with batch processing
140
- claude-intern PROJ-123 PROJ-124 --no-claude --verbose
141
- claude-intern --jql "status = 'To Do'" --create-pr --pr-target-branch develop
142
- claude-intern --jql "priority = High" --max-turns 300 --skip-clarity-check
235
+ # Then manually run Claude with the formatted output
236
+ claude -p --dangerously-skip-permissions --max-turns 10 < task-details.md
143
237
 
144
238
  # Advanced batch scenarios
145
239
  claude-intern --jql "\"Epic Link\" = PROJ-100" --create-pr
146
240
  claude-intern --jql "sprint in openSprints() AND assignee = currentUser()" --max-turns 500
147
-
148
- # Uninstall when no longer needed
149
- bun run uninstall-global # (run from claude-intern directory)
150
241
  ```
151
242
 
152
243
  ## What it does
@@ -161,13 +252,27 @@ bun run uninstall-global # (run from claude-intern directory)
161
252
 
162
253
  3. Creates a feature branch named `feature/task-id` (e.g., `feature/proj-123`)
163
254
 
164
- 4. Runs `claude -p` with enhanced permissions and extended conversation limits for automatic implementation
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)
165
260
 
166
- 5. Automatically commits all changes with a descriptive commit message after Claude completes successfully
261
+ 5. Runs `claude -p` with enhanced permissions and extended conversation limits for automatic implementation
167
262
 
168
- 6. Pushes the feature branch to remote repository (when creating PRs)
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)
169
266
 
170
- 7. Optionally creates pull requests on GitHub or Bitbucket with detailed implementation summaries
267
+ 7. Automatically commits all changes with a descriptive commit message after Claude completes successfully
268
+
269
+ 8. Pushes the feature branch to remote repository (when creating PRs)
270
+
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
171
276
 
172
277
  ## Requirements
173
278
 
@@ -178,10 +283,12 @@ bun run uninstall-global # (run from claude-intern directory)
178
283
 
179
284
  ## Quick Start
180
285
 
181
- 1. Install globally: `bun run install-global`
182
- 2. Copy `.env.sample` to your project directory as `.env`
183
- 3. Configure your JIRA credentials in `.env`
184
- 4. Run from your project directory: `claude-intern PROJ-123`
286
+ 1. Install globally: `npm install -g claude-intern`
287
+ 2. Initialize your project: `claude-intern init`
288
+ 3. Configure your JIRA credentials in `.claude-intern/.env`
289
+ 4. Run from any directory: `claude-intern PROJ-123`
290
+
291
+ **Alternative:** For global configuration across all projects, place `.env` in your home directory (`~/.env`)
185
292
 
186
293
  See [USAGE.md](./USAGE.md) for detailed usage scenarios and troubleshooting.
187
294
  See [GLOBAL_USAGE.md](./GLOBAL_USAGE.md) for quick reference on global installation.