CLI Commands¶
Detailed reference for all RemoteJuggler commands.
Identity Management¶
list¶
List all configured identities.
Options:
| Option | Description |
|---|---|
--provider |
Filter by provider: gitlab, github, bitbucket, all |
Output columns:
| Column | Description |
|---|---|
| Identity | Identity name (with * for current) |
| Provider | GitLab, GitHub, Bitbucket, or Custom |
| SSH Host | SSH config host alias |
| User | Git user.name |
| Git user.email | |
| GPG | Whether GPG signing is configured |
Implementation: src/remote_juggler.chpl
detect¶
Detect the appropriate identity for the current repository based on remote URL.
Arguments:
| Argument | Description |
|---|---|
path |
Repository path (default: current directory) |
--quiet |
Output only the identity name (for scripting) |
Detection logic:
- Parse remote URL from
git remote get-url origin - Extract SSH host alias or hostname
- Match against configured identities by host field
- Return matched identity with confidence level
Implementation: src/remote_juggler.chpl
switch¶
Switch to a different git identity.
Arguments:
| Argument | Description |
|---|---|
identity |
Identity name to switch to |
Actions performed:
- Load identity configuration
- Update
git config user.nameanduser.email - Update remote URL if using SSH alias
- Configure GPG signing key (if configured)
- Authenticate with provider CLI (glab/gh) if token available
Implementation: src/remote_juggler.chpl
validate¶
Test SSH and API connectivity for an identity.
Arguments:
| Argument | Description |
|---|---|
identity |
Identity name to validate |
Tests performed:
- SSH connection to host alias
- Credential availability (Keychain/environment/CLI)
- GPG key existence (if configured)
- GPG registration with provider (if
--gpgSign)
Implementation: src/remote_juggler.chpl
verify¶
Verify GPG keys are valid and registered with providers.
Implementation: src/remote_juggler.chpl
status¶
Show current identity status and repository context.
Output includes:
- Current identity name and provider
- User name and email
- SSH host alias
- GPG key status
- Authentication mode
- Repository information (if in a git repo)
- Last switch timestamp
Implementation: src/remote_juggler.chpl
Configuration¶
config show¶
Display configuration.
Sections:
| Section | Description |
|---|---|
identities |
List of configured identities |
settings |
Global settings |
ssh-hosts |
Managed SSH hosts |
rewrites |
Git URL rewrites |
Implementation: src/remote_juggler.chpl
config add¶
Add a new identity interactively.
config edit¶
Edit an existing identity.
config remove¶
Remove an identity from configuration.
remote-juggler config remove <name>
remote-juggler config rm <name> # alias
remote-juggler config delete <name> # alias
config import¶
Import identities from SSH config.
Parses ~/.ssh/config for git-related hosts (those pointing to known git providers or containing "git" in hostname).
Implementation: src/remote_juggler.chpl
config sync¶
Synchronize managed configuration blocks.
Updates managed sections in ~/.ssh/config and ~/.gitconfig marked with:
Implementation: src/remote_juggler.chpl
config init¶
Initialize a new configuration file.
Token Management¶
token set¶
Store a token in the system keychain.
Prompts for token input (hidden). Token is stored with service name format:
Implementation: src/remote_juggler.chpl
token get¶
Retrieve a stored token (masked output).
Shows first 4 and last 4 characters of the token.
Implementation: src/remote_juggler.chpl
token clear¶
Remove a token from storage.
remote-juggler token clear <identity>
remote-juggler token delete <identity> # alias
remote-juggler token rm <identity> # alias
Implementation: src/remote_juggler.chpl
token verify¶
Test credential availability for all identities.
Checks each identity for: - Keychain token - KeePassXC credential store - Environment variable - CLI authentication (glab/gh)
Implementation: src/remote_juggler.chpl
token check-expiry¶
Check token expiration status.
remote-juggler token check-expiry
remote-juggler token expiry # alias
remote-juggler token check # alias
Reports tokens that are expired or approaching expiry.
Implementation: src/remote_juggler/TokenHealth.chpl
token renew¶
Initiate token renewal workflow.
Implementation: src/remote_juggler/TokenHealth.chpl
GPG Signing¶
gpg status¶
Show GPG configuration for all identities.
Lists available GPG keys and per-identity configuration.
Implementation: src/remote_juggler.chpl
gpg configure¶
Configure GPG signing for an identity.
Attempts to find GPG key matching the identity's email address.
Implementation: src/remote_juggler.chpl
gpg verify¶
Verify GPG keys are registered with providers.
Checks provider settings pages for GPG key registration.
Implementation: src/remote_juggler.chpl
KeePassXC Credential Authority¶
The keys command (alias: kdbx) manages the KeePassXC-backed credential store at ~/.remotejuggler/keys.kdbx.
keys init¶
Initialize the credential store.
Creates a new .kdbx database. Master password is backed by TPM/Secure Enclave when available.
Implementation: src/remote_juggler/KeePassXC.chpl
keys status¶
Show credential store status.
Reports: database path, lock state, entry count, HSM binding status.
keys search¶
Fuzzy search credentials.
remote-juggler keys search <query> [--field=<field>] [--group=<group>] [--json]
remote-juggler keys find <query> # alias
Options:
| Option | Description |
|---|---|
--field |
Search specific field: username, notes, url |
--group |
Filter by KeePassXC group |
--json |
Output as JSON |
Uses Levenshtein distance + word boundary + substring fuzzy matching.
keys resolve¶
Combined search + retrieve in one call.
Searches for a credential and returns its value if a single match is found.
keys get¶
Retrieve a specific credential by title.
keys store¶
Store a new credential.
remote-juggler keys store <title> [--username=<user>] [--url=<url>] [--group=<group>]
remote-juggler keys set <title> # alias
remote-juggler keys add <title> # alias
Prompts for the secret value.
keys delete¶
Delete a credential.
keys list¶
List all stored credentials.
keys ingest¶
Ingest credentials from environment variables.
Detects common patterns: *_TOKEN, *_API_KEY, *_SECRET, etc.
keys crawl¶
Crawl .env files for credentials.
Recursively discovers and ingests credentials from .env files. Tracks additions, updates, and deletions.
keys discover¶
Auto-discover credentials from multiple sources.
Scans: environment variables, SSH key metadata, .env files, and provider CLI tokens.
keys export¶
Export credentials as environment variables.
remote-juggler keys export [--group=<group>] [--format=<format>]
remote-juggler keys dump-env # alias
Formats: env (default), json, shell
keys sops-ingest¶
Decrypt a SOPS-encrypted file and ingest its key-value pairs into the KeePassXC credential store.
Requires sops and age binaries to be installed. Stores entries under RemoteJuggler/SOPS/{canonical-path}/{KEY}.
keys sops-sync¶
Bidirectional sync of a SOPS-encrypted file with the credential store. Detects additions, updates, and deletions.
Returns counts of added, updated, and deleted entries.
keys sops-export¶
Export the age private key from the credential store and derive the corresponding public key.
PIN Management¶
The pin command manages HSM PINs for hardware-backed credential unlock.
pin store¶
Store a PIN for HSM operations.
pin clear¶
Clear stored PIN.
pin status¶
Check PIN availability.
YubiKey Management¶
The yubikey command (alias: yk) manages YubiKey hardware keys.
yubikey info¶
Show YubiKey information and status.
yubikey set-pin-policy¶
Configure PIN caching policy.
yubikey set-touch¶
Configure touch requirement.
yubikey configure-trusted¶
Configure YubiKey for trusted workstation mode.
yubikey diagnostics¶
Run YubiKey diagnostic checks.
remote-juggler yubikey diagnostics
remote-juggler yubikey diag # alias
remote-juggler yubikey check # alias
Trusted Workstation¶
The trusted-workstation command (alias: tws) manages TPM/Secure Enclave-based auto-unlock.
trusted-workstation enable¶
Enable trusted workstation mode.
Binds the credential store to TPM PCR 7 (Secure Boot state) and YubiKey presence.
trusted-workstation disable¶
Disable trusted workstation mode.
trusted-workstation status¶
Show trusted workstation status.
trusted-workstation verify¶
Verify trusted workstation configuration.
Security Mode¶
security-mode¶
Set the security mode for credential operations.
Available modes depend on hardware capabilities (TPM, YubiKey, Secure Enclave).
Setup¶
setup¶
Run the interactive setup wizard.
Options:
| Option | Description |
|---|---|
--import-ssh |
Import SSH hosts only |
--import-gpg |
Import GPG keys only |
Without options, runs the full interactive setup wizard.
Implementation: src/remote_juggler/Setup.chpl
Unseal PIN¶
unseal-pin¶
Unseal the HSM PIN using hardware attestation.
Uses TPM/Secure Enclave to unseal the credential store master password.
Debug Commands¶
debug ssh-config¶
Display parsed SSH configuration.
Shows all Host entries from ~/.ssh/config with:
- Hostname
- User
- IdentityFile
- Port (if non-default)
- ProxyJump (if configured)
Implementation: src/remote_juggler.chpl
debug git-config¶
Display parsed gitconfig URL rewrites.
remote-juggler debug git-config
remote-juggler debug gitconfig # alias
remote-juggler debug git # alias
Shows insteadOf URL rewrite rules and user configuration.
Implementation: src/remote_juggler.chpl
debug keychain¶
Test Keychain access.
Performs store/retrieve/delete test cycle to verify Keychain integration.
Implementation: src/remote_juggler.chpl
debug hsm¶
Debug HSM/TPM/Secure Enclave connectivity.
remote-juggler debug hsm
remote-juggler debug tpm # alias
remote-juggler debug secure-enclave # alias
Reports hardware security module status, PCR values, and attestation state.
Implementation: src/remote_juggler.chpl
Command Aliases¶
Several top-level commands have short aliases for convenience:
| Command | Alias |
|---|---|
list |
ls |
keys |
kdbx |
yubikey |
yk |
trusted-workstation |
tws |
Exit Codes¶
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Configuration error |
| 3 | Validation failure |