@damper/cli 0.5.12 → 0.5.13

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.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { statusCommand } from './commands/status.js';
5
5
  import { cleanupCommand } from './commands/cleanup.js';
6
6
  import { setupCommand } from './commands/setup.js';
7
7
  import { releaseCommand } from './commands/release.js';
8
- const VERSION = '0.5.12';
8
+ const VERSION = '0.5.13';
9
9
  function showHelp() {
10
10
  console.log(`
11
11
  ${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
@@ -155,12 +155,25 @@ export async function createWorktree(options) {
155
155
  isNew: false,
156
156
  };
157
157
  }
158
- const projectName = getProjectName(projectRoot);
159
158
  const shortTaskId = taskId.slice(0, 8);
160
159
  const slug = slugify(taskTitle);
161
- // Use short task ID for directory (keeps paths short), full slug for branch (more descriptive)
162
- const worktreePath = path.resolve(projectRoot, '..', `${projectName}-${shortTaskId}`);
160
+ // Put worktrees in .worktrees folder inside the project
161
+ const worktreesDir = path.join(projectRoot, '.worktrees');
162
+ const worktreePath = path.join(worktreesDir, shortTaskId);
163
163
  const branchName = `feature/${slug}`;
164
+ // Ensure .worktrees is gitignored
165
+ const gitignorePath = path.join(projectRoot, '.gitignore');
166
+ if (fs.existsSync(gitignorePath)) {
167
+ const gitignore = fs.readFileSync(gitignorePath, 'utf-8');
168
+ if (!gitignore.includes('.worktrees')) {
169
+ fs.appendFileSync(gitignorePath, '\n# Damper CLI worktrees\n.worktrees/\n');
170
+ console.log(pc.dim('Added .worktrees/ to .gitignore'));
171
+ }
172
+ }
173
+ else {
174
+ fs.writeFileSync(gitignorePath, '# Damper CLI worktrees\n.worktrees/\n');
175
+ console.log(pc.dim('Created .gitignore with .worktrees/'));
176
+ }
164
177
  // Check if worktree directory already exists
165
178
  if (fs.existsSync(worktreePath)) {
166
179
  console.log(pc.dim(`Worktree directory already exists at ${worktreePath}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.5.12",
3
+ "version": "0.5.13",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {