# DevIntern Code Quick Start

**@devintern/code** is your AI intern for automatically implementing tasks. Point it at a local markdown file or a ticket in your task tracker, and it runs your AI agent, creates a feature branch, commits the changes, and can open a pull request.

For agent-assisted setup, use the [devintern-setup skill](https://github.com/getdevintern/devintern/tree/main/plugins/devintern/skills/devintern-setup). It covers prerequisites, source-control and tracker credentials, browser authorization when needed, and verifying worker activation. For changes to an existing worker's repositories, routing, automations, and policies, use [devintern-workspace](https://github.com/getdevintern/devintern/tree/main/plugins/devintern/skills/devintern-workspace).

See [Agent Skills](https://devintern.com/docs/code/agent-skills.md) for installation commands for Codex and Claude Code, prerequisites, and example prompts for setup, workspace changes, and delegation.

**Recommended for ongoing use:** set up a [workspace worker](https://devintern.com/docs/code/worker.md#quick-start), even for one repository, with relay-backed integrations. Start with `devintern worker init`; it includes tracker setup when needed and can install/start the service. The standalone CLI walkthrough below remains useful for an explicitly one-off task or trial run.

Supported task trackers today: **Jira** (default), **Linear**, **Trello**, **Asana**, **Azure DevOps**, **GitHub Issues**, **GitLab Issues**, and **local markdown files** (no PM account required).

## Prerequisites

- **[Bun](https://bun.sh) runtime** (required to run @devintern/code)
- A local markdown file, or a task tracker account with API access (Jira, Linear, Trello, Asana, Azure DevOps, GitHub Issues, or GitLab Issues)
- AI agent CLI installed (e.g., Claude Code, OpenCode, Codex, Cursor)
- Git repository for your project

## Installation

Install globally with Bun:

```bash
# Install Bun if not already installed
curl -fsSL https://bun.sh/install | bash

# Install @devintern/code globally
bun install -g @getdevintern/code
```

## Initialize Configuration

Navigate to your project directory and run:

```bash
devintern init
```

In a terminal, this starts an interactive setup wizard that:

- Detects an existing @devintern/pm configuration (`.devintern-pm/.env`) in the same project and offers to reuse those tracker credentials, so you skip straight to validation
- Asks which task tracker you use — local **markdown files** lead the menu as the zero-account way to try DevIntern in minutes, followed by Jira, Linear, GitHub Issues, GitLab Issues, Azure DevOps, Asana, and Trello
- Links you directly to the provider's token creation page and prompts for each credential, with a pointer to the matching setup guide in these docs
- Validates the connection with a real API call before finishing (you can retry, edit values, or skip)
- Offers an optional GitHub token for pull request creation
- Detects installed AI agent CLIs (and warns with install steps when none are found)
- Offers to sign in to DevIntern on the spot (`devintern login` equivalent)
- Finishes with a readiness checklist so your first run cannot fail on something setup could have caught
- Writes your answers to `.devintern-code/.env`, creates `settings.json` for per-project configuration, and adds a whitelist block to your `.gitignore` (`.devintern-code/*` plus `!settings.json` and `!.env.example` exceptions) so credentials and local run state never get committed, while `settings.json` and the `.env.example` template stay trackable

Not ready to connect a real task tracker yet? Choose **Markdown files** in the wizard. It configures a local task directory (`./tasks` by default), requires no tracker account or API credentials, and lets you switch to Jira, Linear, or another tracker later. See [Markdown File Tasks](https://devintern.com/docs/code/markdown-tasks.md) for the supported file format and workflow.

For scripted or CI setups, pass `--yes` (or `--no-interactive`) to skip the prompts and write a commented configuration template instead:

```bash
devintern init --yes
```

### Re-running init on an existing setup

Running `devintern init` in an already-configured project no longer refuses — it offers a short menu: **update** your current tracker's credentials (stored values become Enter-to-keep defaults), **switch** to a different tracker (your GitHub PR token carries over), or exit without changes. Updates are merged into `.env`, so comments, custom variables, and previously-skipped optionals are preserved.

## Connect Your Task Tracker

The wizard handles credentials for you. If you skip `init`, running a task in an unconfigured project from an interactive terminal offers to launch the guided setup inline before failing. If you used `--yes`, or want to change trackers later, edit `.devintern-code/.env` for the tracker you use. Optionally edit `.devintern-code/settings.json` for status or list transitions after a run.

| Tracker            | When to use                                               | Setup guide                                                 |
| ------------------ | --------------------------------------------------------- | ----------------------------------------------------------- |
| **Jira** (default) | Jira Cloud issues, JQL batch runs, story point estimation | [Jira Integration](https://devintern.com/docs/code/jira-integration.md)                   |
| **Linear**         | Linear issues by ID or URL, IssueFilter batch runs        | [Linear Integration](https://devintern.com/docs/code/linear-integration.md)               |
| **Trello**         | Trello cards by short link or URL                         | [Trello Integration](https://devintern.com/docs/code/trello-integration.md)               |
| **Asana**          | Asana tasks with project section transitions              | [Asana Integration](https://devintern.com/docs/code/asana-integration.md)                 |
| **Azure DevOps**   | Azure DevOps work items by ID or URL                      | [Azure DevOps Integration](https://devintern.com/docs/code/azure-devops-integration.md)   |
| **GitHub Issues**  | GitHub issues with status labels, PRs in the same repo    | [GitHub Issues Integration](https://devintern.com/docs/code/github-issues-integration.md) |
| **GitLab Issues**  | GitLab issues with status labels, MRs in the same repo    | [GitLab Integration](https://devintern.com/docs/code/gitlab-integration.md)               |
| **Markdown files** | Local `.md` specs, no PM account needed                   | [Markdown File Tasks](https://devintern.com/docs/code/markdown-tasks.md)                  |

**Jira:** add `JIRA_BASE_URL`, `JIRA_EMAIL`, and `JIRA_API_TOKEN`. You do not need to set `TASK_TRACKER` (it defaults to `jira`).

**Trello:** set `TASK_TRACKER=trello` plus `TRELLO_API_KEY` and `TRELLO_API_TOKEN`.

Shared options (GitHub/Bitbucket PRs, agent harness, output directory) are covered in [Configuration](https://devintern.com/docs/code/configuration.md).

## Run Your First Task

Not sure everything is wired up? Run `devintern doctor` for a readiness check (agent CLI, tracker credentials, sign-in) with a fix hint per issue. If a failure looks like a DevIntern defect rather than a setup problem, `devintern report` files a redacted report with the run and logs attached.

If you chose Markdown during setup, add `TASK-1.md` to your configured task directory and pass its filename without the extension:

```bash
devintern TASK-1
```

For a connected tracker, pass its task reference instead:

**Jira**

```bash
devintern PROJ-123 --create-pr
```

**Trello** (`TASK_TRACKER=trello` in `.devintern-code/.env`)

```bash
devintern AbCdEf12 --create-pr
```

## What's Next?

Turn the successful one-off run into a worker that watches for ready tasks and opens pull requests without you starting each run:

```bash
devintern worker init
devintern worker
```

- [Set up the worker](https://devintern.com/docs/code/worker.md): automate task pickup, pull request feedback, and recurring work
- [CLI reference](https://devintern.com/docs/code/usage.md): run individual tasks and queries on demand
- [Tracker setup guides](#connect-your-task-tracker): open the guide for the tracker you selected during setup