recomposable 1.1.2 → 1.1.4

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/README.md CHANGED
@@ -48,6 +48,7 @@ recomposable
48
48
  - **Docker Compose Watch** — toggle `docker compose watch` per service, with live output in the log panel
49
49
  - **Dependency-aware rebuild** — rebuild a service then automatically restart all its transitive dependents in topological order
50
50
  - **Container exec** — run commands inside any container, inline in the bottom panel (`e`) or full-screen (`x`), with `cd` support and command history
51
+ - **Worktree switching** — switch any service to run from a different git worktree (`t`), automatically rebuilds and starts in the target branch
51
52
  - **Vim keybindings** — navigate with `j`/`k`, `G`/`gg`, and more
52
53
 
53
54
  ## Full Log View
@@ -68,6 +69,12 @@ Press `w` to toggle `docker compose watch` for a service. A cyan `W` indicator a
68
69
 
69
70
  Press `d` to rebuild the selected service and then automatically restart all services that depend on it (transitively), in the correct topological order. Progress is shown step-by-step in the log panel. If the service has no dependents, falls back to a regular rebuild.
70
71
 
72
+ ## Worktree Switching
73
+
74
+ Press `t` on any service to switch it to a different git worktree. A picker shows all available worktrees — navigate with `j`/`k`, confirm with `Enter`. The service is automatically stopped, rebuilt, and started from the target worktree's compose file. A `WORKTREE` column appears when services run from multiple branches, with non-main branches highlighted in yellow.
75
+
76
+ This is useful for end-to-end testing changes across branches without drowning in terminal tabs. Run your main stack on `main`, then switch individual services to feature branches to verify their behavior in the full environment. Particularly handy when letting Claude Code work in worktrees — switch the affected service, verify it end-to-end, and switch back, all from a single terminal.
77
+
71
78
  ## Adding Compose Files
72
79
 
73
80
  Create a `recomposable.json` file in your project root:
@@ -136,6 +143,7 @@ recomposable -f docker-compose.yml -f docker-compose.prod.yml
136
143
  | `x` | Full-screen exec mode |
137
144
  | `n` | Toggle no-cache mode (rebuild with `--no-cache` + `--force-recreate`) |
138
145
  | `f` / `Enter` | Full-screen log view for selected service |
146
+ | `t` | Switch service to a different git worktree |
139
147
  | `l` | Toggle inline log panel |
140
148
  | `/` | Search in inline log panel |
141
149
  | `G` | Jump to bottom |
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import type { Config, AppState, ServiceGroup } from './lib/types';
2
+ import type { Config, AppState, ServiceGroup, GitWorktree } from './lib/types';
3
3
  export interface ModuleState {
4
4
  logScanActive: boolean;
5
5
  statsPollActive: boolean;
@@ -11,6 +11,7 @@ export declare function createModuleState(): ModuleState;
11
11
  export declare function loadConfig(): Config;
12
12
  export declare function discoverServices(config: Config): ServiceGroup[];
13
13
  export declare function pollStatuses(state: AppState): void;
14
+ export declare function detectMultipleWorktrees(state: AppState): void;
14
15
  export declare function pollLogCounts(state: AppState): void;
15
16
  export declare function pollContainerStats(state: AppState): void;
16
17
  export declare function render(state: AppState): void;
@@ -21,18 +22,25 @@ export declare function doRebuild(state: AppState): void;
21
22
  export declare function doRestart(state: AppState): void;
22
23
  export declare function doStop(state: AppState): void;
23
24
  export declare function doStart(state: AppState): void;
25
+ export declare function mapComposeFileToWorktree(composeFile: string, targetWorktreePath: string): string | null;
26
+ export declare function openWorktreePicker(state: AppState): void;
27
+ export declare function doWorktreeSwitch(state: AppState, targetWorktree: GitWorktree): void;
24
28
  export declare function doWatch(state: AppState): void;
25
29
  export declare function initDepGraphs(state: AppState): void;
26
30
  export declare function doCascadeRebuild(state: AppState): void;
27
31
  export declare function enterExecInline(state: AppState): void;
28
32
  export declare function enterExec(state: AppState): void;
29
33
  export declare function exitExec(state: AppState): void;
34
+ export declare function shellEscape(str: string): string;
30
35
  export declare function runExecCommand(state: AppState): void;
31
36
  export declare function enterLogs(state: AppState): void;
32
37
  export declare function exitLogs(state: AppState): void;
38
+ export declare function loadMoreLogHistory(state: AppState): void;
33
39
  export declare function executeLogSearch(state: AppState): void;
34
40
  export declare function jumpToNextMatch(state: AppState): void;
35
41
  export declare function jumpToPrevMatch(state: AppState): void;
42
+ export declare function executeBottomSearch(state: AppState): void;
43
+ export declare function clearBottomSearch(state: AppState): void;
36
44
  export declare function handleKeypress(state: AppState, key: string): void;
37
45
  export declare function createInputHandler(state: AppState): (data: Buffer | string) => void;
38
46
  export declare function cleanup(state: AppState): void;