connect join command allows you to instantly access all services in a teammate’s shared environment using a share code.
Usage
Arguments
The share code provided by your teammate (e.g., “abc123”)
Options
Hub server URL
Path to custom config file
Examples
Join an Environment
Port Conflicts
If a port is already in use, an alternative port is automatically selected:Service Offline
If a service in the share is offline:Behavior
Share Code Format
Share codes are:- Case-insensitive
- Alphanumeric (e.g., “abc123”, “XYZ789”)
- Automatically normalized (lowercase, trimmed)
Tunnel Creation
For each service in the share:- Verifies service is online
- Finds available local port (preferring original port)
- Creates TCP tunnel from local port to service
- Registers in active routes for proxy
Connection Lifecycle
On Join:- Fetches share metadata from hub
- Validates share is not expired
- Increments join counter
- Creates tunnels for all available services
- Maintains active tunnels
- Automatically reconnects on network interruption
- Updates active routes file for proxy integration
- Closes all tunnel connections
- Cleans up active routes
- Exits gracefully
Port Selection Strategy
- Original port: Try the service’s original port first
- Alternative port: If original is in use, find next available port
- Sequential search: Start from original + 1, increment until available
Exit Codes
0- Successfully joined and disconnected gracefully1- Share not found, expired, or network error
Use Cases
Access Shared Development Environment
Debugging Together
Code Review
Related Commands
connect share- Create a shareable environmentconnect clone- Alternative for cloning specific agentsconnect reach- Connect to individual services
Troubleshooting
Share Not Found
- Invalid share code
- Share has expired
- Share was revoked
- Typo in the code
No Services Available
If all services in the share are offline:- Offline or disconnected
- Not exposing services anymore
- Behind a restrictive firewall