Skip to content

feat(*): support multiple linkup instances 🎭#260

Open
rebelliard wants to merge 6 commits intomentimeter:nextfrom
rebelliard:rafael/multi-instance-linkup
Open

feat(*): support multiple linkup instances 🎭#260
rebelliard wants to merge 6 commits intomentimeter:nextfrom
rebelliard:rafael/multi-instance-linkup

Conversation

@rebelliard
Copy link

@rebelliard rebelliard commented Mar 16, 2026

User story

This PR adds multi-instance support so that each Git worktree can run its own isolated linkup environment -- separate state, ports, tunnel, and session name -- eliminating the conflicts caused by sharing a single instance.

image

Implementation

  • Each instance gets its own state directory (LINKUP_HOME). The CLI auto-detects the right one from a .env file in the worktree, so no manual env setup is needed.
  • New config fields local_server_port and session_name let each worktree bind to unique ports and claim a stable session domain.
  • Background services (local server, cloudflared, DNS) get instance-scoped IDs so concurrent instances don't collide.

New commands

  • linkup instance-use <N|default> -- switch the active instance.

  • linkup instance-remove <N> -- stop services, clean up the Cloudflare tunnel, and delete the instance directory.

  • linkup instance-remove-all -- same as above for all instances at once.

    image

Command updates

  • linkup status shows an instance summary table when more than one instance exists.

Other

  • Separate commits add AGENTS.md, CONTRIBUTING.md, and .claude/ config for AI agent tooling.

Testing

  • Unit tests added for all new functionality (service ID scoping, config parsing, port derivation, instance commands, .env resolution).
  • cargo test -p linkup-cli

Unknowns

  • N/A

@rebelliard rebelliard force-pushed the rafael/multi-instance-linkup branch from 4bf8e86 to 0449cf3 Compare March 16, 2026 09:16
@augustoccesar augustoccesar changed the base branch from main to next March 16, 2026 09:17
# Conflicts:
#	linkup-cli/src/commands/status.rs
#	linkup-cli/src/services/cloudflare_tunnel.rs
#	linkup-cli/src/state.rs
#	linkup/src/config.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants