git-agent for AngularConventional commits for Angular components, services, and NgRx stores
git-agent understands Angular module structure, standalone component patterns, and NgRx effects, producing atomic conventional commits that reflect Angular's opinionated architecture.
diff example
diff --git a/src/app/users/user-list.component.ts b/src/app/users/user-list.component.ts
index 3a1b2c4..8d9e7f5 100644
--- a/src/app/users/user-list.component.ts
+++ b/src/app/users/user-list.component.ts
@@ -1,20 +1,22 @@
-import { Component, OnInit } from "@angular/core";
+import { Component, signal, computed, inject } from "@angular/core";
import { UserService } from "./user.service";
-import { Observable } from "rxjs";
+import { toSignal } from "@angular/core/rxjs-interop";
@Component({
selector: "app-user-list",
templateUrl: "./user-list.component.html",
- changeDetection: ChangeDetectionStrategy.Default,
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: true,
+ imports: [CommonModule, RouterLink],
})
export class UserListComponent implements OnInit {
- users$: Observable<User[]> = this.userService.getUsers();
- filteredUsers$: Observable<User[]> = this.users$;
+ private userService = inject(UserService);
+ readonly users = toSignal(this.userService.getUsers(), { initialValue: [] });
+ readonly searchTerm = signal("");
+ readonly filteredUsers = computed(() =>
+ this.users().filter((u) =>
+ u.name.toLowerCase().includes(this.searchTerm().toLowerCase())
+ )
+ );
}git-agent output
refactor(users): migrate UserListComponent to OnPush and signals
- switch to OnPush change detection for better performance on large lists
- replace async pipe and Observable with signal/toSignal pattern
- add searchTerm signal and filteredUsers computed for reactive filtering
- migrate to standalone component with inject() instead of constructor DI
The async pipe with Observable streams was causing unnecessary change
detection cycles; the signal-based approach provides granular reactivity
with zero overhead when the list is not actively changing.Why it works for Angular
- Understands NgRx store, effect, and reducer changes for accurate commit scoping
- Recognises standalone vs NgModule architecture differences
- Separates Angular Material and component library upgrades into chore commits
- Handles Angular CLI workspace configuration (angular.json) changes distinctly
install
brew install gitagenthq/tap/git-agent
# inside your Angular project
git-agent init # detects angular.json project structure and suggests scopesFAQ
Does git-agent handle Angular CLI generated files?Yes. Generated files from ng generate are recognised as scaffolded code. git-agent commits them together with related changes rather than creating noise commits for each generated file.
How does git-agent handle NgRx boilerplate files?Actions, reducers, effects, and selectors for the same feature slice are grouped together into a single commit. The LLM understands the NgRx architecture and describes changes at the feature level.
Can git-agent work with Angular Universal and SSR projects?Yes. Server-side transfer state, platform-server module changes, and Angular Universal config are all handled correctly alongside the standard Angular diffs.