Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

mocactl: --profile, so one machine can hold more than one login

Open
#404 0 comments 0 reactions 0 assignees View on GitHub

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

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 NAME flag (and a MOCACTL_PROFILE env var) selecting mocactl/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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rossoctl/moca

All issues in rossoctl/moca

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.