# plan

Generate a migration plan from an inventory file.

## Usage

```bash
bb2gh plan [OPTIONS]
```

## Options

| Option                   | Description                                |
| ------------------------ | ------------------------------------------ |
| `--inventory FILE`       | Inventory file from discover (required)    |
| `--target-org TEXT`      | GitHub organization name (required)        |
| `--user-mapping FILE`    | CSV file mapping Bitbucket users to GitHub |
| `--output FILE`          | Output file for plan (default: plan.json)  |
| `--max-complexity LEVEL` | Skip repos above complexity level          |
| `--max-size-gb NUMBER`   | Skip repos larger than size                |
| `--dry-run`              | Validate plan without saving               |

## Examples

```bash
# Basic plan
bb2gh plan \
  --inventory inventory.json \
  --target-org my-github-org \
  --output plan.json

# With user mapping
bb2gh plan \
  --inventory inventory.json \
  --target-org my-github-org \
  --user-mapping users.csv \
  --output plan.json

# Filter complex repositories
bb2gh plan \
  --inventory inventory.json \
  --target-org my-github-org \
  --max-complexity medium \
  --max-size-gb 5
```

## User Mapping File

Create a CSV file mapping Bitbucket users to GitHub:

```csv
bitbucket_username,github_username,email
jsmith,john-smith,john@company.com
mjones,mary-jones,mary@company.com
```

See [User Mapping Guide](/bb2gh/guides/user-mapping.md) for details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://n8-group.gitbook.io/bb2gh/commands/plan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
