Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ Release notes and changelogs are published on the **[project blog](https://fulll

Each release entry covers the motivation, new features, breaking changes (if any), and upgrade notes.

| Version | Blog post |
| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| v2.0.0 _(pending)_ | _Hierarchical team-prefix grouping (nested `/` chains, auto-nesting, `--pick-team` at every level) — breaking change to `--group-by-team-prefix` / JSON `section` shape. Blog post pending, see [EPIC #125](https://github.com/fulll/github-code-search/issues/125)._ |
| [v1.12.0](https://fulll.github.io/github-code-search/blog/release-v1-12-0) | Mouse-driven TUI, team re-pick/undo, query-title heading and matched token in output, regex quoting fixes |
| [v1.11.0](https://fulll.github.io/github-code-search/blog/release-v1-11-0) | Team pick mode, `--exclude-template-repositories`, security hardening and Windows installer fixes |
| [v1.10.0](https://fulll.github.io/github-code-search/blog/release-v1-10-0) | Native regex syntax `/pattern/flags` — automatic term extraction, top-level alternation and `--regex-hint` |
| [v1.9.0](https://fulll.github.io/github-code-search/blog/release-v1-9-0) | Windows support — native x64, x64-modern, x64-baseline and ARM64 binaries with one-line PowerShell installer |
| [v1.8.3](https://fulll.github.io/github-code-search/blog/release-v1-8-3) | Fix TUI layout: header/footer anchoring, viewport packing, narrow-terminal clipping, active-row contrast |
| [v1.8.2](https://fulll.github.io/github-code-search/blog/release-v1-8-2) | Fix rate-limit errors aborting multi-page searches; auto-wait and retry with live progress |
| [v1.8.1](https://fulll.github.io/github-code-search/blog/release-v1-8-1) | Fix silent hang after pagination bar — concurrency cap + progress bar for line-number resolution |
| [v1.8.0](https://fulll.github.io/github-code-search/blog/release-v1-8-0) | Purple TUI theme, fetch progress bar, position indicator, line-anchored file links, Esc to close help |
| [v1.7.0](https://fulll.github.io/github-code-search/blog/release-v1-7-0) | Shell completions (bash/zsh/fish) + extended syntax highlighting (PHP, C/C++, Swift, Terraform/HCL, Dockerfile) |
| [v1.6.1](https://fulll.github.io/github-code-search/blog/release-v1-6-1) | Fix TUI only displaying first text fragment when a file has multiple matches |
| [v1.6.0](https://fulll.github.io/github-code-search/blog/release-v1-6-0) | Power navigation: global fold/unfold, gg/G top/bottom, paged scroll, open-in-browser |
| [v1.5.0](https://fulll.github.io/github-code-search/blog/release-v1-5-0) | Advanced filter targets, regex mode, word-jump, scroll fix |
| [v1.4.0](https://fulll.github.io/github-code-search/blog/release-v1-4-0) | TUI visual overhaul, community files, demo animation |
| [v1.3.0](https://fulll.github.io/github-code-search/blog/release-v1-3-0) | Team-prefix grouping, replay command, JSON output |
| [v1.0.0](https://fulll.github.io/github-code-search/blog/release-v1-0-0) | Initial release |
| Version | Blog post |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [v2.0.0](https://fulll.github.io/github-code-search/blog/release-v2-0-0) | Hierarchical team-prefix grouping (nested `/` chains, auto-nesting, `--pick-team` at every level, `--pick-team-auto`, `--exclude-team-prefixes`), `GCS_DEFAULT_ORG`, `gh auth token` fallback — breaking change to `--group-by-team-prefix` / JSON `section` shape |
| [v1.12.0](https://fulll.github.io/github-code-search/blog/release-v1-12-0) | Mouse-driven TUI, team re-pick/undo, query-title heading and matched token in output, regex quoting fixes |
| [v1.11.0](https://fulll.github.io/github-code-search/blog/release-v1-11-0) | Team pick mode, `--exclude-template-repositories`, security hardening and Windows installer fixes |
| [v1.10.0](https://fulll.github.io/github-code-search/blog/release-v1-10-0) | Native regex syntax `/pattern/flags` — automatic term extraction, top-level alternation and `--regex-hint` |
| [v1.9.0](https://fulll.github.io/github-code-search/blog/release-v1-9-0) | Windows support — native x64, x64-modern, x64-baseline and ARM64 binaries with one-line PowerShell installer |
| [v1.8.3](https://fulll.github.io/github-code-search/blog/release-v1-8-3) | Fix TUI layout: header/footer anchoring, viewport packing, narrow-terminal clipping, active-row contrast |
| [v1.8.2](https://fulll.github.io/github-code-search/blog/release-v1-8-2) | Fix rate-limit errors aborting multi-page searches; auto-wait and retry with live progress |
| [v1.8.1](https://fulll.github.io/github-code-search/blog/release-v1-8-1) | Fix silent hang after pagination bar — concurrency cap + progress bar for line-number resolution |
| [v1.8.0](https://fulll.github.io/github-code-search/blog/release-v1-8-0) | Purple TUI theme, fetch progress bar, position indicator, line-anchored file links, Esc to close help |
| [v1.7.0](https://fulll.github.io/github-code-search/blog/release-v1-7-0) | Shell completions (bash/zsh/fish) + extended syntax highlighting (PHP, C/C++, Swift, Terraform/HCL, Dockerfile) |
| [v1.6.1](https://fulll.github.io/github-code-search/blog/release-v1-6-1) | Fix TUI only displaying first text fragment when a file has multiple matches |
| [v1.6.0](https://fulll.github.io/github-code-search/blog/release-v1-6-0) | Power navigation: global fold/unfold, gg/G top/bottom, paged scroll, open-in-browser |
| [v1.5.0](https://fulll.github.io/github-code-search/blog/release-v1-5-0) | Advanced filter targets, regex mode, word-jump, scroll fix |
| [v1.4.0](https://fulll.github.io/github-code-search/blog/release-v1-4-0) | TUI visual overhaul, community files, demo animation |
| [v1.3.0](https://fulll.github.io/github-code-search/blog/release-v1-3-0) | Team-prefix grouping, replay command, JSON output |
| [v1.0.0](https://fulll.github.io/github-code-search/blog/release-v1-0-0) | Initial release |

> For the full list of commits between releases, see the
> [GitHub Releases page](https://github.com/fulll/github-code-search/releases).
6 changes: 6 additions & 0 deletions docs/blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Full release notes and changelogs are always available on

---

## v2 series

| Release | Highlights |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| [v2.0.0](./release-v2-0-0) | Hierarchical `--group-by-team-prefix` grouping (nested headings, auto-pick, exclusions), `GCS_DEFAULT_ORG`, gh CLI token fallback — breaking change |

## v1 series

| Release | Highlights |
Expand Down
101 changes: 101 additions & 0 deletions docs/blog/release-v2-0-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: "What's new in v2.0.0"
description: "Hierarchical team-prefix grouping with nested headings, auto-pick, and exclusions — plus GCS_DEFAULT_ORG and gh CLI token fallback. Breaking change to --group-by-team-prefix and JSON output."
date: 2026-09-19
---

# What's new in github-code-search v2.0.0

> Full release notes: <https://github.com/fulll/github-code-search/releases/tag/v2.0.0>

This is a **major** release: `--group-by-team-prefix` now supports a full hierarchy instead of a single flat level, which changes the markdown heading structure and the JSON output shape for anyone already using it. See [Breaking changes](#breaking-changes) below before upgrading.

## Highlights

### Hierarchical team-prefix grouping

`--group-by-team-prefix` now accepts a small chain grammar instead of a flat, comma-separated prefix list:

- `/` nests levels **within one chain** — group by the first prefix, then sub-group each section by the next prefix.
- `,` separates **independent chains** — each grouped on its own, against whatever repos earlier chains haven't already claimed.

```bash
# Group by tribe- first, then by squad- within each tribe
github-code-search "useFeatureFlag" --org fulll \
--group-by-team-prefix tribe-/squad-
```

Markdown output renders one heading level per depth (`##`, `###`, `####`, … capped at H6), and JSON output now carries the full hierarchy per result as a `section` array:

```json
{
"repo": "myorg/mobile-app",
"section": ["tribe-b", "squad-core + squad-mobile"],
"matches": [{ "path": "src/index.ts", "url": "...", "line": 1, "col": 1 }]
}
```

Team names that overlap within one level (e.g. `squad-a` and `squad-a-legacy`) are now **combined automatically** into one section instead of appearing as unrelated siblings.

### `--pick-team` at every hierarchy level

`--pick-team` and interactive pick mode (`p`) now resolve combined sections at **any depth** of the hierarchy, not just the top level — the same workflow from v1.11.0, extended to nested chains.

### `--pick-team-auto` — resolve ambiguous sections automatically

New flag: auto-resolves combined sections whose team names share a common prefix (e.g. `tribe-a + tribe-a-p1` → `tribe-a`), without an explicit `--pick-team`. It also clusters combos that share a recurring team across siblings even without a literal common prefix, and always defers to an explicit `--pick-team` for the same section.
Comment on lines +44 to +46

```bash
github-code-search "useFeatureFlag" --org fulll \
--group-by-team-prefix tribe-/squad- \
--pick-team-auto
```

### `--exclude-team-prefixes` — strip noisy team names before grouping

Some orgs have many closely related, deeply-overlapping team names under one prefix. `--exclude-team-prefixes` removes matching teams from consideration **before** grouping runs, reducing ambiguous combos at the source:

```bash
github-code-search "useFeatureFlag" --org fulll \
--group-by-team-prefix tribe-/squad- \
--exclude-team-prefixes squad-validators-
```

### `GCS_DEFAULT_ORG` — skip `--org` on every call

If you mostly search a single organization, set it once and omit `--org` entirely:

```bash
export GCS_DEFAULT_ORG=my-org
github-code-search "useFeatureFlag"
```

An explicit `--org` flag always takes precedence.

### `GITHUB_TOKEN` fallback via the GitHub CLI

If `GITHUB_TOKEN` isn't set and the [GitHub CLI](https://cli.github.com/) is installed and authenticated, `github-code-search` now retrieves a token automatically via `gh auth token` — no extra setup needed. Applies to the search commands and the `upgrade` subcommand.

### Also in this release

- Fixed a systematic ~2 s exit delay after printing results, in both interactive and non-interactive (`--no-interactive` / CI) mode.
- Removed the `picocolors` dependency in favor of a native `util.styleText` facade — no behavior change, one less external dependency.
- Bumped the minimum required Bun version to **1.4** (native `Bun.stringWidth` / `stripANSI` / `sliceAnsi` and `util.styleText` are used at runtime).
- Routine dependency upgrades.

## Breaking changes

- **Removed** `--group-by-team-prefix-consolidate` and the underlying consolidated-rendering mode. In practice, `--pick-team-auto` covers the real need (resolving ambiguous combined sections) more reliably — if you used the consolidate flag, switch to `--pick-team-auto` and/or `--exclude-team-prefixes`.
- Markdown output can now render **more than one heading level** (`##`/`###`/`####`…) when a multi-level chain (`tribe-/squad-`) is used, instead of always a single flat `##` level.
- JSON output gains a **`section` array** per result when `--group-by-team-prefix` is used (previously JSON carried no section/team information at all).

Plain, single-level `--group-by-team-prefix squad-` usage (no `/`) is unaffected — you'll only notice a difference if you adopt the new chain syntax or previously relied on `--group-by-team-prefix-consolidate`.

## Upgrade

```sh
github-code-search upgrade
```

Or download the latest binary from
[GitHub Releases](https://github.com/fulll/github-code-search/releases/tag/v2.0.0).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-code-search",
"version": "1.12.0",
"version": "2.0.0",
"description": "Interactive GitHub code search with per-repo aggregation",
"keywords": [
"bun",
Expand Down
Loading