v1.10.2

Group Code User Guide

Navigate and organize your codebase by functionality across files and languages. Tag related code sections with special comments and browse them through a unified tree view — without changing any file structure.

✓ 40+ languages
✓ GitHub Copilot integration
✓ Hierarchical groups
✓ Zero config required

See Group Code in action

A 1-minute 25-second walkthrough of adding groups, navigating across files, searching, favorites, renaming, and getting started with Copilot.

A map of your features, inside VS Code Fresh captures of the functionality hierarchy, with English narration, captions and quiet instrumental music. The Copilot segment shows the suggestion command; it requires an available Copilot model. Watch on YouTube · Download video · Captions (SRT) · Captions (VTT)
Read the video transcript

Finding a feature shouldn't mean searching through dozens of files. Meet Group Code, the Visual Studio Code extension that organizes your codebase by what it does.

Start with a simple comment. Add an @group annotation above your code, give it a name, and describe its purpose. Use the greater-than separator to create a hierarchy, like Checkout, then Payments.

Your groups appear in the sidebar. Related code can live in TypeScript, SQL, or HTML, while still belonging to the same feature. Expand a feature to explore all of its source files.

Click a group to jump straight to its code. Search to narrow the list, and favorite the groups you use most.

Need to reorganize? Rename a parent group, and its child annotations follow. Your edits stay available for review and undo.

For a faster starting point, the Copilot integration can suggest group annotations. Review the proposed changes, then save when you're ready.

Group Code keeps its index up to date as eligible files change, and respects your workspace's ignore rules.

Turn a collection of files into a map of your features. Find Group Code in the Visual Studio Code Marketplace.

Overview

Group Code is a VS Code extension that lets you annotate code sections with @group comments, then instantly browse and jump to all annotated sections from a dedicated sidebar. It creates a logical map of your entire codebase organized by feature or functionality — not by file or folder structure.

Instead of hunting through dozens of files to find all code related to "Authentication", you tag each piece with // @group Authentication, and the extension surfaces them all in one tree view. Click any entry to jump directly to that line.

🖿
Cross-File Organization
Tag code across any number of files under a shared group name.
📈
Hierarchical Grouping
Nest groups with Parent > Child > Grandchild syntax up to any depth.
✨
AI-Powered
Generate group comments across your entire workspace with one command via GitHub Copilot.
🔍
Smart Search
Filter all groups in real time across the tree view with instant results.
📄
40+ Languages
Works with TypeScript, Python, C#, Java, Go, Rust, HTML, CSS, and many more.
🌟
Favorites
Star important groups for quick access. Favorites persist across sessions.

Installation

From the VS Code Marketplace

  1. Open Extensions

    Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac) to open the Extensions sidebar.

  2. Search for Group Code

    Type Group Code in the search box. Look for the publisher thechandanbhagat.

  3. Install

    Click the Install button. The extension activates immediately — no restart required.

  4. Open a workspace

    Open any folder in VS Code. The Group Code icon (compass) appears in the Activity Bar on the left.

From Open VSX Registry

Visit open-vsx.org to install on VSCodium or any Open VSX-compatible editor.

ℹ

Requirements: VS Code 1.99.1 or higher with a filesystem workspace. Browser-only and virtual workspaces are unsupported. AI features additionally require an available language model, such as GitHub Copilot with an active subscription.

Group Code hierarchy and source entries in the checkout example
Group Code in VS CodeAfter installation, open a workspace to begin scanning and organizing annotations.

Quick Start

Get up and running in under two minutes.

  1. Open a code file

    Open any source file in your workspace (e.g., a TypeScript, Python, or JavaScript file).

  2. Add your first @group comment

    Above any function or block, type a comment using the @group syntax (see Comment Syntax for all formats).

  3. Watch the sidebar update

    The Group Code Explorer in the Activity Bar updates automatically within half a second of your edit — no manual refresh needed.

  4. Click to navigate

    Click any item in the tree view to jump to that code location in the editor.

// A basic @group comment in TypeScript
// @group Authentication : Handles user login and token validation
export function login(email: string, password: string) {
  // ...
}

// @group Authentication
export function validateToken(token: string) {
  // ...
}
Functionality groups beside annotated TypeScript source
Group Code Explorer and annotationsOpen the compass icon in the Activity Bar to browse groups while keeping the annotated source visible.

Comment Syntax

Group Code detects @group annotations inside comments. The extension automatically picks the right comment style for each file type.

Format

<comment-prefix> @group <GroupName> : <description>

The description is optional. Both parts are used in hover cards and tree labels.

Examples by Language

Language(s) Comment Format Example
JS / TS / Java / C# / C++ / Go / Rust / Swift / Kotlin // // @group Auth : Login handler
Python / Ruby / Shell / YAML / Makefile # # @group DatabaseOps : Query builder
HTML / XML / SVG <!-- --> <!-- @group Layout : Header section -->
CSS / SCSS / Less /* */ or // // @group Theme : Color variables
SQL -- -- @group Reporting : Monthly summary
PHP // // @group API : User endpoint

With Tags

Append optional hashtag-style tags after the description for additional categorization:

// @group Authentication : User login handler #auth #security #api
✓

Tip: Place the @group comment on the line immediately above the function, class, or block it belongs to. This makes hover cards and tree entries as precise as possible.

Two at-group annotations in the checkout TypeScript source
Annotations in contextThe walkthrough shows @group comments in the editor and their corresponding entries in the explorer.

Hierarchical Groups

Use the > separator to create nested group hierarchies of any depth. The tree view displays these as folders with collapsible children.

Syntax

// @group Parent > Child > Grandchild : Description

Examples

// Two-level
// @group Auth > Login : Handles credential validation

// Three-level
// @group Auth > Login > Validation : Email and password checks
// @group Auth > Login > API : Login API call

// Four-level
// @group Features > Dashboard > Widgets > Charts : Sales chart

How the Tree Looks

Parent groups use a stacked-layers icon. The tree preserves the functionality hierarchy and lists clickable source entries directly beneath each group:

Auth
  Login
    Validation  (2 groups)
      validateEmail.ts
      validatePassword.ts
    API  (1 group)
      loginUser.ts
  Signup
    Form Handling  (1 group)

Best Practices

⚠

Avoid mixed separators: Use only > as the hierarchy separator. Underscores or dashes in group names are treated as part of the name, not as hierarchy dividers.

Layer icons for parent groups and direct source entries beneath Payments
Expanded group hierarchyParents, children, and source entries remain navigable from the Group Code Explorer.

Tree Views

Group Code provides two views of the same functionality hierarchy. Both views are kept in sync — a filter applied in one applies to both.

ViewLocationDescription
Group Code Group Code Activity Bar panel Primary view. Groups organized by hierarchy. This is the main navigation view.
Group Code (Explorer) VS Code Explorer sidebar panel Mirror of the main Group Code view, embedded in the standard Explorer.

Switching Views

Click the Group Code icon (compass) in the Activity Bar to open the dedicated panel. The same functionality hierarchy is also available in the Group Code panel at the bottom of the standard VS Code Explorer. In either view, expand a group and click a source entry directly beneath it to jump to its @group annotation.

Tree View Toolbar

Each tree view has a toolbar with the following buttons:

ButtonAction
Search (magnifier icon)Open the filter input box to search groups by name
Clear filter (X icon)Clear the active filter and show all groups
Refresh (circular arrows)Rescan the workspace and rebuild the tree
Settings (gear icon)Open the Group Code Settings panel
Parent functionality groups with direct source entries
Functionality hierarchyExpand a group to find its source files, then click an entry to jump to its annotation.

Clicking any group entry in the tree view opens the corresponding file and scrolls to that exact line number.

Single-Click Navigation

Click any leaf node (file entry) in the tree view. VS Code opens the file and positions the cursor at the @group comment line.

Keyboard Navigation

Press Ctrl+Shift+G (or Cmd+Shift+G on Mac) to open a quick-pick list of all groups. Type to filter and press Enter to jump.

Functionality picker with consistent code-group icons
Navigate by functionalityThe keyboard picker lists group names with the same code-group symbols used elsewhere in the extension.

Command Palette

Open the Command Palette (Ctrl+Shift+P) and run:

SQL source opened by selecting its entry directly under Payments
Click directly into a source fileThe Payments entry opens its SQL annotation. Sources appear directly under their functionality group.

Favorites

Mark any group as a favorite to distinguish it visually and keep frequently-used groups easily identifiable. Favorites persist across VS Code sessions in your OS user profile (not in the workspace), so they never cause Git conflicts.

How to Favorite a Group

Visual Indicator

Favorite groups show a filled star icon next to their name in the tree view. Un-favoriting a group removes the star.

📌

Favorites are stored per-user in the OS profile directory (~/.groupcode/), not inside the workspace folder. This means they are personal and never committed to Git.

Starred Checkout hierarchy expanded beneath Favorites
Keep frequently used groups closeThe starred Checkout hierarchy stays at the top, with its source entries still directly accessible.

Rename Groups

Rename a group directly from the tree view. The rename updates all @group comments across every file in the workspace that references that group name.

How to Rename

⚠

Rename performs a workspace-wide text replacement of the group name inside @group comments. This modifies files on disk. Make sure your changes are committed before renaming.

Rename input for changing Checkout and its descendants to Commerce
Rename a functionality hierarchyChange the parent name once to update its child annotations across source files.

Quick Add Group

The Quick Add Group feature lets you annotate any code selection with a @group comment through a guided UI — without manually typing the comment syntax.

How to Use

  1. Select code in the editor

    Highlight any function, class, block, or line you want to tag.

  2. Right-click and choose "Add to Group..."

    The option appears near the top of the context menu under "Group Code".

  3. Choose Manual or AI-powered mode

    Select Manual to type the group name yourself, or AI-powered to let GitHub Copilot analyze the selected code and suggest a name and description.

  4. Fill in the details

    Enter the group name (or pick an existing one from the list), an optional description, and optional tags. Click OK. The comment is inserted above your selection automatically.

Manual Flow

The manual mode walks you through three prompts:

  1. Group name — Choose an existing group from the quick-pick list or create a new one. Hierarchy is supported: type Parent > Child.
  2. Description (optional) — A short description appended after the colon.
  3. Tags (optional) — Space-separated tags appended as #tag1 #tag2.

AI-Powered Flow

Requires GitHub Copilot. The extension sends the selected code to the language model and proposes a group name and description. You can review and edit both before confirming.

Keyboard Shortcut

You can also trigger Quick Add Group with Ctrl+Alt+K (or Cmd+Alt+K on Mac) when the editor is focused.

Add Code Group picker with code-group icons and a Create New Group option
Add a group from the editorChoose an existing functionality or create a new hierarchical group for the selected code.

Smart Autocomplete

The extension registers a completion provider that triggers inside comment lines. As you type @group, VS Code shows intelligent suggestions.

Trigger Characters

TriggerWhat Appears
@ Suggests the group keyword to complete to @group
After @group Lists all existing group names from the workspace, sorted by usage frequency
After > in a group name Suggests valid child nodes based on existing hierarchy paths

Hierarchy Autocomplete

When continuing a hierarchy path, the completion provider shows only the children of the already-typed parent, preventing typos and ensuring consistency.

// Type: // @group Auth >
// Completions show: Login, Signup, OAuth ...

// @group Auth > Login >
// Completions show: Validation, API, Session ...
ℹ

Autocomplete only activates inside comment lines. It will not fire inside string literals or regular code, preventing false triggers.

Native completion suggestions for an at-group annotation
Complete existing group namesThe editor suggests functionality names and child groups while you write an annotation.

Hover Cards New in v1.8.0

Hovering over any @group annotation shows a rich floating card with detailed information about the group — without leaving the current file.

What is Shown

How to Trigger

Move your cursor over the @group keyword on any comment line. The hover card appears automatically. It only activates on comment lines — not on regular code.

Hover card with rendered code-group, file and location icons
Inspect an annotationThe hover card shows the group path, description, source files and usage information with native icons.

Both functionality hierarchy views share a synchronized filter. Filtering either view updates both simultaneously.

Using the Filter

  1. Click the Search (magnifier) icon

    In the tree view toolbar, click the magnifier icon to open the search input box.

  2. Type your filter text

    The tree view updates in real time as you type. Matches are case-insensitive and search across group names, file types, and descriptions.

  3. Clear the filter

    Click the Clear Filter (X) icon in the toolbar to reset and show all groups.

What Gets Searched

✓

You can also open the filter by running the command Group Code: Search Groups from the Command Palette (Ctrl+Shift+P).

Payments search filter applied to the functionality hierarchy
Focus on matching groupsThe shared Payments filter narrows the tree while preserving the functionality hierarchy.

Chat Participant — @groupcode

AI Group Code registers a GitHub Copilot Chat participant named @groupcode. Open any Copilot Chat window and prefix your message with @groupcode to interact with your code groups using natural language.

ℹ

Requires GitHub Copilot with Chat support. The participant is sticky — once selected in chat, it remains active for subsequent messages.

Available Commands

Natural Language

You can also use plain English. The participant understands intent without slash commands:

@groupcode show me all groups in this workspace
@groupcode find anything related to authentication
@groupcode generate comment groups for this file
@groupcode analyze my groups for duplicates

AI Generate Groups

AI The Generate feature analyzes your code with GitHub Copilot and automatically inserts @group comments where none exist. It runs in two modes:

ModeBehaviorHow to Run
Safe Mode Adds missing groups only. Never modifies or removes existing @group comments. @groupcode /generate
Update Mode Regenerates all groups — replaces existing ones. Asks for confirmation first. @groupcode /generate update
Workspace Runs safe-mode generation on every file in the workspace. @groupcode /generate workspace

What the AI Does

Generated changes remain in edited documents for review and Undo. Save the documents to keep them. Requests that fail, are cancelled, or refer to a changed document cannot replace its source.

  1. Reads the entire file content and identifies logical code sections (functions, classes, blocks).
  2. Infers a meaningful group name and short description for each section.
  3. Inserts a correctly formatted @group comment above each section.
  4. Respects the file's comment syntax (e.g., # for Python, // for TypeScript).
✓

Run @groupcode /generate on a new file to instantly document its structure. Then refine the generated group names to match your project's naming conventions.

AI Suggest

AI Unlike Generate (which processes an entire file), Suggest focuses on your currently selected code and returns a targeted group recommendation.

How to Use

  1. Select code in the editor

    Highlight any code section you want to tag.

  2. Right-click and choose "Suggest Code Group with AI"

    Or run the command Group Code: Suggest Code Group with AI from the Command Palette. You can also use @groupcode /suggest in the Chat panel.

  3. Review the suggestion

    The AI returns a proposed group name and description. Accept, edit, or dismiss it.

  4. Comment is inserted

    If accepted, the @group comment is automatically placed above the selection.

Suggest Code Group with AI command selected in the VS Code Command Palette
Start an AI suggestionSelect the suggestion command, then review the proposed annotation when a Copilot model is available.

Language Model Tool

AI Group Code registers a Language Model Tool named groupcode_generate. This tool is available to GitHub Copilot Edit and any agent that supports VS Code's language model tools API.

When Copilot invokes this tool, it can:

You do not need to call this tool manually — Copilot uses it automatically when you open a file and ask Copilot to help organize or annotate your code.

📌

The language model tool requires VS Code 1.99.1 or newer and an available language model.

Workspace Scanning

Group Code scans your workspace files to build and maintain the group index. Scanning happens automatically on startup and after file changes, but you can also trigger it manually.

Automatic Scanning

Manual Scanning

ActionHowWhat it does
Refresh Click Refresh button in tree view toolbar, or run Group Code: Refresh Code Groups Re-scans the entire workspace and rebuilds the tree
Rescan Workspace Run Group Code: Rescan Entire Workspace from the Command Palette Clears all cached data (including the .groupcode/ directory) and performs a full cold scan. Asks for confirmation first.
Scan via Chat @groupcode /scan (current file) or @groupcode /scan workspace Scans and returns a summary in the Chat window

Git-Aware Filtering

The scanner respects .gitignore patterns and automatically skips common directories such as node_modules, dist, out, .git, build, and coverage. This keeps the scan fast and focused on source files.

Cache Location

Group data is persisted in a .groupcode/ directory at the root of the workspace. This directory is managed automatically and does not need to be edited manually. Add it to your .gitignore if you do not want to commit it.

Analysis Tools

Several advanced commands help you maintain group quality across large codebases. Run them from the Command Palette (Ctrl+Shift+P).

CommandDescription
Group Code: Analyze Group Naming Patterns Reports naming inconsistencies — detects mixed casing, abbreviation styles, and divergent naming conventions across your groups.
Group Code: Find Duplicate/Similar Groups Scans for semantically similar group names (e.g., "Auth" vs "Authentication") and consolidation suggestions.
Group Code: Find Orphaned Groups Identifies group names referenced in comments but no longer present in the live codebase, or groups in deleted files.
Group Code: Analyze Code Group Refactoring Provides restructuring suggestions — groups that could be merged, split, or reorganized into better hierarchies.
Group Code: Convert Flat Groups to Hierarchies Analyzes flat group names and suggests equivalent hierarchical representations. Applies the conversions if you confirm.
Group Code: Remove All Code Group Comments Strips all @group comments from workspace files. Use with caution — this modifies files on disk. A confirmation prompt is shown.
⚠

Remove All Groups is a destructive operation. Always commit or stash your changes before running it.

Available Group Code analysis and navigation commands
Inspect and maintain code groupsThe Command Palette exposes naming analysis, refactoring, navigation and refresh actions.

Settings

Open the Group Code Settings panel with the gear icon in the tree view toolbar, or run Group Code: Open Settings from the Command Palette.

Settings Panel Options

SettingDescription
Preferred AI Model Select which GitHub Copilot language model to use for generation and suggestions. The list is populated from the models available in your Copilot subscription.
Refresh Models Reload the available model list from Copilot. The list is cached for 24 hours to improve performance.
Open Settings File Open the raw .groupcode/settings.json file for manual editing.
Clear All Groups Remove all @group comments from the workspace. Equivalent to the Remove All Code Group Comments command.

Settings Storage

Settings are stored in <workspace-root>/.groupcode/settings.json. This is a workspace-scoped file — different settings per project are fully supported.

Set Preferred AI Model (Quick)

Run Group Code: Set Preferred AI Model from the Command Palette to pick a model without opening the full settings panel.

Group Code settings panel with scanning and model options
Configure scanning and modelsOpen the settings panel from the Group Code toolbar to adjust workspace behavior.

Status Bar Integration

A Group Code item appears in the VS Code status bar at the bottom of the window. Clicking it opens the quick-pick group navigator — the same as pressing Ctrl+Shift+G.

The status bar item shows the total number of code groups found in the workspace, giving you a quick at-a-glance count.

Updated Commerce hierarchy and Group Code compass status item
At-a-glance workspace statusThe Group Code status item reports the indexed group count at the bottom of VS Code.

Keyboard Shortcuts

ShortcutMacAction
Ctrl+Shift+G Cmd+Shift+G Show Code Groups (quick-pick navigator)
Ctrl+Alt+K Cmd+Alt+K Add Code Group Dialog (opens the Add Group dialog for the current cursor position)
F2 F2 Rename Group (when a group node is focused in the tree view)
✓

You can rebind any of these shortcuts from File > Preferences > Keyboard Shortcuts by searching for "Group Code".

Language Support

Group Code works with 40+ languages. The @group syntax is injected into the grammar of all supported file types, providing syntax highlighting in the editor.

📄
Web & Frontend
JavaScript, TypeScript, JSX, TSX, HTML, CSS, SCSS, Less
📄
Backend & Systems
Python, Java, C#, C, C++, Go, Rust, PHP, Ruby, Perl
📄
Mobile & Multi-platform
Swift, Kotlin, Dart, Scala
📄
Config & Infra
YAML, JSON, XML, SVG, SQL, Bash, Shell, Makefile, Dockerfile

Even for unsupported file types, the extension still detects @group comments and indexes them — it falls back to // @group style comment detection.


Group Code v1.9.0 — Published by thechandanbhagat — View on GitHub