mocactl: --profile, so one machine can hold more than one login
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- authentication, cli
Research direction
Start with packages/mocactl/src/config.ts:23-29 and trace the login and doctor entry points, including how environment variables are read. Implement profile selection while preserving the default location; done means separate named auth and config files work, MOCACTL_PROFILE selects a profile, and doctor names both the subject and profile.
Written by the indexing model from the issue text.
Description
Found preparing the VM demo B runbook (#367, PR #403, fix-list item 3).
Problem
mocactl caches one identity per config directory: $XDG_CONFIG_HOME/mocactl/auth.json (packages/mocactl/src/config.ts:23-29). A second mocactl login in the same directory silently replaces the first. Two users rehearsing on one laptop, or one person holding two accounts (a user and an admin), must juggle XDG_CONFIG_HOME by hand. Forgetting to do so is indistinguishable from a working login as the wrong subject.
Proposal
- A
--profile NAMEflag (and aMOCACTL_PROFILEenv var) selectingmocactl/profiles/NAME/{auth,config}.json. The default profile stays where it is today. doctor's "logged in" check names the subject and the profile, so the wrong one is visible.
Not on the critical path
The XDG_CONFIG_HOME workaround is documented in docs/demos/vm-two-user-acceptance.md (Act 0b), and the demo runs on two laptops anyway.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 11
- Avg merge
- 8h 58m
- Merged PRs (30d)
- 154
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rossoctl/moca
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rossoctl/moca#421 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
keptinventory/kept#336 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
hemi-earn
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vetro-protocol/vetro-monorepo#1013 ·
Maintainers usually reply within 1 day