# `homeboy changes`
## Synopsis
```sh
homeboy changes <componentId> [--since <tag>] [--git-diffs]
homeboy changes --cwd [--git-diffs]
homeboy changes --json <spec> [--git-diffs]
# Project mode
homeboy changes --project <projectId> [<componentIds...>] [--git-diffs]
homeboy changes <projectId> <componentId> [<componentId>...] [--git-diffs]
```
## Description
Show changes since the latest git tag for one component, multiple components (bulk JSON), all components attached to a project, or the current working directory.
This command reports:
- commits since the last tag (or a user-provided tag via `--since`)
- uncommitted changes in the working tree (including `uncommittedDiff`)
- optionally, a commit-range diff for commits since the baseline (via `--git-diffs`)
Release workflow note:
- `commits[]` is intended as input to help you author complete release notes.
- `uncommitted`/`uncommittedDiff` is a reminder that you have local edits; if they are intended for the release, commit them as scoped changes before version bumping. If they are not intended for the release, resolve them before version bumping.
## Options
- `--cwd`: use current working directory (ad-hoc mode, no component registration required)
- `--json <spec>`: bulk mode input
- Priority: `--cwd > --json > --project > positional`
- `<spec>` supports `-` (stdin), `@file.json`, or an inline JSON string
- Spec format: `{ "component_ids": ["id1", "id2"] }`
- `--project <projectId>`: show changes for all components attached to a project
- If you also pass positional `<componentIds...>`, Homeboy only returns changes for those components
- `--since <tag>`: tag name to compare against (single-component mode only)
- `--git-diffs`: include commit-range diff content in output
## JSON output
> Note: all command output is wrapped in the global JSON envelope described in the [JSON output contract](../json-output/json-output-contract.md). `homeboy changes` returns either a single `ChangesOutput` or a bulk `BulkChangesOutput` as `data`.
### Single-component output
```json
{
"component_id": "<componentId>",
"path": "<local path>",
"success": true,
"baselineRef": "<ref>|null",
"commits": [
{
"hash": "<sha>",
"subject": "<subject>",
"category": "Feature|Fix|Breaking|Docs|Chore|Other"
}
],
"uncommitted": {
"hasChanges": true,
"staged": ["..."],
"unstaged": ["..."],
"untracked": ["..."]
},
"uncommittedDiff": "<diff>",
"diff": "<diff>"
}
```
Notes:
- `uncommittedDiff` is present when the working tree has changes.
- `diff` is included only when `--git-diffs` is used.
- Optional fields like `warning` / `error` may be omitted when unset.
### Bulk output (`--json` or `--project`)
```json
{
"action": "changes",
"results": [
{
"id": "<componentId>",
"component_id": "<componentId>",
"path": "<local path>",
"success": true,
"commits": [...],
"uncommitted": {...},
"error": null
}
],
"summary": {
"total": 2,
"succeeded": 2,
"failed": 0
}
}
```
Notes:
- Each item in `results` contains `id` plus all `ChangesOutput` fields flattened in.
- `error` is set when that component failed; `success` and other fields are omitted on failure.
## Exit code
- `0` when the command succeeds and `summary.failed == 0`.
- `1` in bulk/project modes when `summary.failed > 0`.
## jq examples
Extract diffs for scripting:
```sh
# Single mode: extract uncommitted diff
# Single mode: extract commit-range diff
# Bulk mode: extract all diffs (one per component)
# Bulk mode: list components with uncommitted changes
## Related
- [git](git.md)
- [version](version.md)