Skip to content

Operations

Day-to-day usage patterns for RemoteJuggler.

Common Workflows

Starting a New Project

  1. Clone the repository
  2. Detect the appropriate identity
  3. Switch if needed
git clone git@gitlab-work:company/project.git
cd project
remote-juggler detect
remote-juggler switch work

Switching Contexts

When moving between work and personal projects:

# Check current identity
remote-juggler status

# Switch to personal
remote-juggler switch personal

# Verify
remote-juggler status

Validating Setup

Before important operations (merge requests, releases):

remote-juggler validate work

Identity States

stateDiagram-v2
    [*] --> NoIdentity: First run
    NoIdentity --> Imported: config import
    Imported --> Active: switch
    Active --> Active: switch (different)
    Active --> Validated: validate
    Validated --> Active: continue work

Best Practices

One Identity Per Session

Switch identity at the start of a work session, not per-operation:

# Good: Switch once
remote-juggler switch work
git commit -m "Feature"
git push

# Avoid: Switching per operation
remote-juggler switch work
git commit
remote-juggler switch personal
git push  # Wrong identity!

Use Detection in Scripts

For automation, use detection rather than hardcoded identities:

#!/bin/bash
cd "$PROJECT_DIR"
identity=$(remote-juggler detect --quiet)
remote-juggler switch "$identity"

Validate Before Important Operations

# Before creating merge request
remote-juggler validate work
glab mr create

Detailed Guides