@gw-tools/gw 0.29.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +89 -110
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,6 +8,7 @@ A command-line tool for managing git worktrees, built with Deno.
8
8
  - [Table of Contents](#table-of-contents)
9
9
  - [Quick Start](#quick-start)
10
10
  - [🎓 AI Skills (for Claude Code, Copilot, Cursor, etc.)](#-ai-skills-for-claude-code-copilot-cursor-etc)
11
+ - [🤖 Use as a Claude Code Agent](#-use-as-a-claude-code-agent)
11
12
  - [Initial Setup: Secrets in the Default Branch](#initial-setup-secrets-in-the-default-branch)
12
13
  - [First-Time Setup Flow](#first-time-setup-flow)
13
14
  - [Why This Matters](#why-this-matters)
@@ -22,7 +23,7 @@ A command-line tool for managing git worktrees, built with Deno.
22
23
  - [Example Configuration](#example-configuration)
23
24
  - [Configuration Options](#configuration-options)
24
25
  - [Commands](#commands)
25
- - [checkout (add, co)](#checkout)
26
+ - [checkout](#checkout)
26
27
  - [Arguments](#arguments)
27
28
  - [Options](#options)
28
29
  - [Examples](#examples)
@@ -33,21 +34,22 @@ A command-line tool for managing git worktrees, built with Deno.
33
34
  - [Examples](#examples-1)
34
35
  - [How It Works](#how-it-works)
35
36
  - [pr](#pr)
36
- - [Arguments](#arguments-3)
37
+ - [Arguments](#arguments-2)
37
38
  - [Options](#options-1)
38
- - [Examples](#examples-3)
39
+ - [Examples](#examples-2)
39
40
  - [Requirements](#requirements)
40
- - [How It Works](#how-it-works-2)
41
+ - [How It Works](#how-it-works-1)
41
42
  - [update](#update)
42
43
  - [Options](#options-2)
43
- - [Examples](#examples-4)
44
- - [How It Works](#how-it-works-3)
44
+ - [Examples](#examples-3)
45
+ - [How It Works](#how-it-works-2)
45
46
  - [install-shell](#install-shell)
46
47
  - [Options](#options-3)
47
- - [Examples](#examples-5)
48
+ - [Examples](#examples-4)
49
+ - [Migrating from File-Based Integration](#migrating-from-file-based-integration)
48
50
  - [root](#root)
49
- - [Examples](#examples-6)
50
- - [How It Works](#how-it-works-4)
51
+ - [Examples](#examples-5)
52
+ - [How It Works](#how-it-works-3)
51
53
  - [init](#init)
52
54
  - [Options](#options-4)
53
55
  - [Clone Examples](#clone-examples)
@@ -57,17 +59,17 @@ A command-line tool for managing git worktrees, built with Deno.
57
59
  - [When to Use](#when-to-use)
58
60
  - [show-init](#show-init)
59
61
  - [Options](#options-5)
60
- - [Examples](#examples-7)
62
+ - [Examples](#examples-6)
61
63
  - [Output Example](#output-example)
62
64
  - [When to Use](#when-to-use-1)
63
65
  - [sync](#sync)
64
- - [Arguments](#arguments-4)
66
+ - [Arguments](#arguments-3)
65
67
  - [Options](#options-6)
66
- - [Examples](#examples-8)
68
+ - [Examples](#examples-7)
67
69
  - [clean](#clean)
68
70
  - [Options](#options-7)
69
- - [Examples](#examples-9)
70
- - [How It Works](#how-it-works-5)
71
+ - [Examples](#examples-8)
72
+ - [How It Works](#how-it-works-4)
71
73
  - [Git Worktree Proxy Commands](#git-worktree-proxy-commands)
72
74
  - [list (ls)](#list-ls)
73
75
  - [remove (rm)](#remove-rm)
@@ -83,13 +85,14 @@ A command-line tool for managing git worktrees, built with Deno.
83
85
  - [Shell Alias Method (Recommended)](#shell-alias-method-recommended)
84
86
  - [Available Scripts](#available-scripts)
85
87
  - [Publishing](#publishing)
86
- - [Automated Release (Recommended)](#automated-release-recommended)
87
- - [Manual Publishing](#manual-publishing)
88
+ - [How It Works](#how-it-works-5)
89
+ - [Conventional Commits](#conventional-commits)
90
+ - [Testing Releases](#testing-releases)
91
+ - [Manual Publishing (Fallback)](#manual-publishing-fallback)
88
92
  - [Publishing to JSR (Optional)](#publishing-to-jsr-optional)
89
- - [Version Management](#version-management)
90
93
  - [Project Structure](#project-structure)
91
94
  - [Adding New Commands](#adding-new-commands)
92
- - [Custom Commands (like `add`, `copy`)](#custom-commands-like-add-copy)
95
+ - [Custom Commands (like `checkout`, `sync`)](#custom-commands-like-checkout-sync)
93
96
  - [Git Proxy Commands (like `list`, `remove`)](#git-proxy-commands-like-list-remove)
94
97
  - [License](#license)
95
98
 
@@ -135,19 +138,14 @@ gw checkout main
135
138
  Enhance your AI agent with gw-tools knowledge using [skills.sh](https://skills.sh):
136
139
 
137
140
  ```bash
138
- npx skills add https://github.com/mthines/gw-tools --skill @gw-git-worktree-workflows @gw-config-management @gw-autonomous-workflow # installs all skills
141
+ npx skills add https://github.com/mthines/gw-tools --skill
139
142
  ```
140
143
 
141
- ```bash
142
- # Autonomous feature development workflow
143
- npx skills add https://github.com/mthines/gw-tools --skill @gw-autonomous-workflow
144
+ Available skills:
144
145
 
145
- # Master Git worktrees and gw workflows
146
- npx skills add https://github.com/mthines/gw-tools --skill @gw-git-worktree-workflows
147
-
148
- # Configure gw for your project type (Next.js, monorepos, etc.)
149
- npx skills add https://github.com/mthines/gw-tools --skill @gw-config-management
150
- ```
146
+ - **autonomous-workflow** - Autonomous feature development from requirements to PR
147
+ - **git-worktree-workflows** - Master Git worktrees and gw workflows
148
+ - **gw-config-management** - Configure gw for your project type (Next.js, monorepos, etc.)
151
149
 
152
150
  Once installed, your AI agent can:
153
151
 
@@ -159,6 +157,29 @@ Once installed, your AI agent can:
159
157
 
160
158
  📖 **Skill documentation:** [skills/README.md](../../skills/README.md)
161
159
 
160
+ ### 🤖 Use as a Claude Code Agent
161
+
162
+ Want Claude Code to autonomously implement features end-to-end? Install the autonomous workflow agent:
163
+
164
+ ```bash
165
+ # One-liner install (global)
166
+ mkdir -p ~/.claude/agents && \
167
+ curl -fsSL https://raw.githubusercontent.com/mthines/gw-tools/main/packages/autonomous-workflow-agent/agents/autonomous-workflow.md \
168
+ -o ~/.claude/agents/autonomous-workflow.md
169
+
170
+ # Or manually: copy the file from packages/autonomous-workflow-agent/agents/autonomous-workflow.md
171
+ # to ~/.claude/agents/ (global) or .claude/agents/ (per-project)
172
+ ```
173
+
174
+ Once installed, Claude will automatically use this agent when you ask it to implement features, and it will:
175
+
176
+ - Create isolated worktrees for each task
177
+ - Plan and implement incrementally
178
+ - Run tests and iterate until passing
179
+ - Create draft PRs with full context
180
+
181
+ 📦 **Building custom agents?** See [@gw-tools/autonomous-workflow-agent](https://www.npmjs.com/package/@gw-tools/autonomous-workflow-agent) for SDK integration.
182
+
162
183
  ## Initial Setup: Secrets in the Default Branch
163
184
 
164
185
  **Important:** Before using `gw checkout` with auto-copy, ensure your secrets and environment files exist in your `defaultBranch` worktree (typically `main`). This worktree is the **source** from which files are copied to new worktrees.
@@ -1529,125 +1550,83 @@ nx run gw-tool:test
1529
1550
 
1530
1551
  ### Publishing
1531
1552
 
1532
- This tool uses **automated semantic versioning** based on conventional commits. The version is automatically determined from your commit messages.
1553
+ Releases are **fully automated** via CI. No manual release commands are needed.
1554
+
1555
+ #### How It Works
1556
+
1557
+ **Beta Releases (on Pull Requests):**
1533
1558
 
1534
- #### Automated Release (Recommended)
1559
+ When you open a non-draft PR with changes to `packages/gw-tool/src/`:
1535
1560
 
1536
- The simplest way to publish is using the automated release process:
1561
+ 1. CI runs tests
1562
+ 2. If tests pass, a beta version is automatically created (e.g., `0.29.0-beta.27.1`)
1563
+ 3. The beta is published to npm with the `beta` tag and Homebrew as `gw-beta`
1564
+ 4. A comment is added to the PR with installation instructions
1537
1565
 
1538
1566
  ```bash
1539
- # Make sure you're on main/master branch with all changes pushed
1540
- nx run gw-tool:release
1567
+ # Install beta version
1568
+ npm install @gw-tools/gw@beta
1569
+ brew install mthines/gw-tools/gw-beta
1541
1570
  ```
1542
1571
 
1543
- This single command will:
1572
+ **Stable Releases (on Merge to Main):**
1573
+
1574
+ When a PR is merged to `main` with changes to `packages/gw-tool/src/`:
1544
1575
 
1545
- 1. Analyze your commits since the last release
1546
- 2. Automatically determine version bump (major/minor/patch)
1547
- 3. Update npm/package.json with the new version
1548
- 4. Create a git commit and tag
1549
- 5. Push to GitHub
1550
- 6. Build binaries for all platforms
1551
- 7. Create a GitHub release with binaries attached
1552
- 8. Publish to npm
1576
+ 1. CI automatically determines the version bump from conventional commits
1577
+ 2. Updates `package.json`, creates a git tag, and pushes
1578
+ 3. Builds binaries for all platforms
1579
+ 4. Creates a GitHub release with binaries attached
1580
+ 5. Publishes to npm and updates Homebrew tap
1553
1581
 
1554
- **Conventional Commit Format:**
1582
+ #### Conventional Commits
1555
1583
 
1556
1584
  Use these commit prefixes to control versioning:
1557
1585
 
1558
- - `feat:` - New feature (bumps **MINOR** version: 1.0.0 → 1.1.0)
1559
- - `fix:` - Bug fix (bumps **PATCH** version: 1.0.0 → 1.0.1)
1560
- - `BREAKING CHANGE:` or `feat!:` or `fix!:` - Breaking change (bumps **MAJOR** version: 1.0.0 → 2.0.0)
1561
- - `chore:`, `docs:`, `style:`, `refactor:`, `test:` - No version bump
1586
+ | Prefix | Version Bump | Example |
1587
+ | ------------------------------ | --------------------- | ------------------------------ |
1588
+ | `feat:` | Minor (1.0.0 → 1.1.0) | `feat: add dry-run mode` |
1589
+ | `fix:` | Patch (1.0.0 1.0.1) | `fix: correct path resolution` |
1590
+ | `feat!:` or `BREAKING CHANGE:` | Major (1.0.0 → 2.0.0) | `feat!: redesign config` |
1591
+ | `chore:`, `docs:`, `refactor:` | No bump | `docs: update README` |
1562
1592
 
1563
- **Examples:**
1593
+ #### Testing Releases
1594
+
1595
+ To test the release workflow without publishing:
1564
1596
 
1565
1597
  ```bash
1566
- git commit -m "feat: add dry-run mode" # 1.0.0 1.1.0
1567
- git commit -m "fix: correct path resolution" # 1.0.0 → 1.0.1
1568
- git commit -m "feat!: redesign config structure" # 1.0.0 → 2.0.0
1569
- git commit -m "docs: update README" # no version bump
1598
+ # Trigger a dry-run release via GitHub Actions
1599
+ gh workflow run ci.yml -f test_release=true -f version=0.0.0-test
1570
1600
  ```
1571
1601
 
1572
- #### Manual Publishing
1602
+ #### Manual Publishing (Fallback)
1573
1603
 
1574
- If you prefer manual control or need to debug the release process:
1604
+ If CI fails or you need manual control:
1575
1605
 
1576
1606
  ```bash
1577
- # 1. Update version
1578
- cd packages/gw-tool/npm
1579
- npm version 1.0.0
1580
- cd ../../..
1581
-
1582
- # 2. Commit and push
1583
- git add packages/gw-tool/npm/package.json
1584
- git commit -m "chore: bump version to 1.0.0"
1585
- git push
1586
-
1587
- # 3. Build binaries
1607
+ # 1. Build binaries
1588
1608
  nx run gw-tool:compile-all
1589
1609
  nx run gw-tool:npm-pack
1590
1610
 
1591
- # 4. Create GitHub release
1611
+ # 2. Create GitHub release
1592
1612
  gh release create "v1.0.0" \
1593
1613
  --title "v1.0.0" \
1594
1614
  --notes "Release notes" \
1595
1615
  dist/packages/gw-tool/binaries/*
1596
1616
 
1597
- # 5. Publish to npm
1617
+ # 3. Publish to npm
1598
1618
  cd dist/packages/gw-tool/npm
1599
1619
  npm publish --access public
1600
1620
  ```
1601
1621
 
1602
1622
  #### Publishing to JSR (Optional)
1603
1623
 
1604
- For users who prefer Deno's native package manager.
1605
-
1606
- 1. **Add JSR configuration to `deno.json`:**
1607
-
1608
- ```json
1609
- {
1610
- "name": "@your-scope/gw",
1611
- "version": "1.0.0",
1612
- "exports": "./src/main.ts"
1613
- }
1614
- ```
1615
-
1616
- 2. **Publish:**
1617
- ```bash
1618
- nx run gw-tool:publish-jsr
1619
- ```
1620
-
1621
- #### Version Management
1622
-
1623
- **Automated Approach (Recommended):**
1624
-
1625
- Use conventional commits and let the system determine the version:
1624
+ For users who prefer Deno's native package manager:
1626
1625
 
1627
1626
  ```bash
1628
- # Make changes
1629
- git add .
1630
- git commit -m "feat: add new awesome feature"
1631
-
1632
- # When ready to release
1633
- nx run gw-tool:release
1627
+ nx run gw-tool:publish-jsr
1634
1628
  ```
1635
1629
 
1636
- The version is automatically determined from your commits:
1637
-
1638
- - `feat:` → minor version bump (1.0.0 → 1.1.0)
1639
- - `fix:` → patch version bump (1.0.0 → 1.0.1)
1640
- - `feat!:` or `BREAKING CHANGE:` → major version bump (1.0.0 → 2.0.0)
1641
-
1642
- **Manual Approach:**
1643
-
1644
- If you prefer manual control:
1645
-
1646
- 1. Update `packages/gw-tool/npm/package.json` version
1647
- 2. Update `packages/gw-tool/deno.json` version (if using JSR)
1648
- 3. Commit and push changes
1649
- 4. Build, create release, and publish manually
1650
-
1651
1630
  ### Project Structure
1652
1631
 
1653
1632
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gw-tools/gw",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "A command-line tool for managing git worktrees - copy files between worktrees with ease",
5
5
  "keywords": [
6
6
  "git",