Configure @devintern/code for your project and tools
Configuration
@devintern/code uses per-project configuration stored in .devintern-code/.env in your project directory. This allows you to work with multiple projects without configuration conflicts.
Environment File Locations
The tool searches for .env files in the following order:
- Custom path (if specified with
--env-file) - Project-specific (
.devintern-code/.env— recommended) - Current working directory (
.env) - User home directory (
~/.env) - Tool installation directory
Required Configuration
Update your .env file with your Jira credentials:
JIRA_BASE_URL=https://yourcompany.atlassian.net
JIRA_EMAIL=your-email@company.com
JIRA_API_TOKEN=your-api-token
Get your Jira API token at https://id.atlassian.com/manage-profile/security/api-tokens
Optional PR Integration
Choose one authentication method for pull request creation:
GitHub Personal Access Token
For individual users:
GITHUB_TOKEN=your-github-token
- Classic token: Requires
reposcope - Fine-grained token (recommended): Requires
Pull requests: Read and writeandContents: Readpermissions - Create at: https://github.com/settings/tokens
GitHub App Authentication
For organizations:
GITHUB_APP_ID=123456
GITHUB_APP_PRIVATE_KEY_PATH=/secure/path/to/your-app.private-key.pem
Benefits:
- No individual tokens needed
- Fine-grained permissions
- Centralized control
- Audit trail
Setup steps:
- Go to Settings → Developer settings → GitHub Apps → New GitHub App
- Set repository permissions:
- Contents: Read
- Pull requests: Read and write
- Generate and save a private key
- Install the App on your repositories
For CI/CD environments, you can use a base64-encoded key:
GITHUB_APP_ID=123456
GITHUB_APP_PRIVATE_KEY_BASE64=LS0tLS1CRUdJTi4uLg==
To encode your key:
# macOS
base64 -i your-app.private-key.pem
# Linux
base64 -w 0 your-app.private-key.pem
Bitbucket
BITBUCKET_TOKEN=your-bitbucket-token
Requires Repositories: Write permission. Create at https://bitbucket.org/account/settings/app-passwords/
Per-Project Settings
The .devintern-code/settings.json file allows project-specific behavior:
{
"projects": {
"PROJ": {
"prStatus": "In Review"
},
"ABC": {
"prStatus": "Code Review"
}
}
}
Options:
prStatus: Jira status to transition to after PR creation for a specific projectinProgressStatus: Status to set when starting work (default: “In Progress”)todoStatus: Original status to reset to if needed
Output Directory
By default, task artifacts are saved to /tmp/devintern-tasks. You can customize this:
DEVINTERN_OUTPUT_DIR=./devintern-output
Output structure:
{output-dir}/{task-key}/
├── task-details.md # Formatted task for AI agent
├── feasibility-assessment.md # Clarity check results
├── implementation-summary.md # Success output
├── implementation-summary-incomplete.md # Failure output
├── auto-review-summary.json # Auto-review loop results
├── iteration-{N}/ # Auto-review iterations
│ ├── feedback.json
│ └── review-prompt.txt
└── attachments/ # Jira attachments
Troubleshooting
“Missing required environment variables”
- Ensure
.envfile exists in.devintern-code/or your current directory - Check that variable names match exactly (case-sensitive)
“Not in a git repository”
- Run
git initif starting a new project - Or use
--no-gitflag to skip git operations
“Claude CLI not found”
- Install your AI agent CLI
- Or specify path:
--claude-path /path/to/claude