Managing Paths¶
Adding Paths¶
First Path (Creates Initial Profile)¶
The --profile flag is required for the first path to name your initial profile.
Subsequent Paths¶
No --profile needed - paths are added to the current profile.
What Happens When You Add¶
- A
.profscompanion directory is created: -
~/.ssh→~/.ssh.profs/ -
The current content is moved into a profile subdirectory:
-
~/.ssh/*→~/.ssh.profs/work/* -
A symlink replaces the original:
~/.ssh→~/.ssh.profs/work
Path Types¶
Files¶
Structure:
Directories¶
Structure:
~/.ssh -> ~/.ssh.profs/work
~/.ssh.profs/
├── work/
│ ├── id_ed25519
│ └── config
└── personal/
├── id_ed25519
└── config
Removing Paths¶
Stop Managing a Path¶
This: - Removes the symlink - Moves the current profile's content back to the original location - Removes from profs configuration
The .profs directory with other profiles remains (for safety).
Clean Up .profs Directory¶
Manually delete if you're sure:
Listing Managed Paths¶
Current Status¶
Raw Configuration¶
Shows the JSON configuration.
Common Paths to Manage¶
| Path | Purpose |
|---|---|
~/.gitconfig |
Git identity and settings |
~/.ssh |
SSH keys and config |
~/.kube |
Kubernetes contexts |
~/.config/gcloud |
Google Cloud credentials |
~/.aws |
AWS credentials |
~/.config/gh |
GitHub CLI auth |
~/.npmrc |
npm registry auth |
Tips¶
Add All at Once¶
Set up a new machine quickly:
profs add ~/.gitconfig --profile work
profs add ~/.ssh
profs add ~/.kube
profs add ~/.config/gcloud
profs add ~/.aws
Check Before Switching¶
Always verify the switch will work:
Fix any issues before profs set.