commands

package
v1.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package commands provides utility helpers for workspace-related shell commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinkTopSymlinks(ctx context.Context, mainPath, worktreePath string, statusFunc func(context.Context, string) string) error

LinkTopSymlinks creates symlinks for untracked/ignored files and editor configs from main to target worktree. This is a built-in automation command that: - Symlinks all untracked and ignored files from the root of the main worktree (excluding subdirectories) - Symlinks non-empty editor configurations (.vscode, .idea, .cursor, .claude/settings.local.json) - Ensures a tmp/ directory exists in the new worktree - Automatically runs direnv allow if a .envrc file is present statusFunc is used to get git status for detecting untracked/ignored files.

func SetupAgentHooks added in v1.49.0

func SetupAgentHooks(opts SetupAgentHooksOptions) error

SetupAgentHooks installs lazyworktree agent-event hooks into the Claude Code, Codex CLI, and Copilot CLI user-level hook configurations. Existing settings are preserved; a timestamped backup is written before any modification.

Types

type SetupAgentHooksOptions added in v1.49.0

type SetupAgentHooksOptions struct {
	DryRun             bool
	ClaudeSettingsPath string
	CodexHooksPath     string
	CopilotHooksPath   string
	Stdout             io.Writer
}

SetupAgentHooksOptions configures the hook installer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL