Skip to content

cli(feat): add linked configuration profiles#4

Merged
Ducksss merged 1 commit into
Ducksss:mainfrom
Jacques2Marais:codex/issue-3-shared-profile-groups
Jul 13, 2026
Merged

cli(feat): add linked configuration profiles#4
Ducksss merged 1 commit into
Ducksss:mainfrom
Jacques2Marais:codex/issue-3-shared-profile-groups

Conversation

@Jacques2Marais

@Jacques2Marais Jacques2Marais commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add codex-profile init <target> --share-with <source> for linked configuration profiles.
  • Create the target as a real mode-700 directory and link only existing allowlisted paths: config.toml, Codex instruction files, rules/, and plugins/.
  • Keep auth.json, sessions, logs, Electron data, caches, skills, and connector/app state separate.

Review revisions

  • Rebased the PR from its v0.2-era base onto current main without restoring removed Desktop clone or global-quit behavior.
  • Replaced broad top-level discovery with an explicit seven-path allowlist.
  • Added strict source/target validation, dangling-symlink checks, and cleanup after link or permission failures.
  • Restored stock macOS Bash 3.2 compatibility by removing the associative-array design.
  • Synchronized help, Bash/Zsh/Fish completions, README, docs/llms.txt, security guidance, changelog, agent guidance, and AUR metadata.
  • Preserved Jacques Marais as the feature commit author.

Validation

  • make test
  • make lint
  • git diff --check
  • Full behavior coverage for the allowlist, missing entries, source symlinks, private state exclusions, existing targets, usage errors, and partial-failure cleanup.

Closes #3

@Ducksss

Ducksss commented Jun 23, 2026

Copy link
Copy Markdown
Owner

I think this is worth accepting, but as a narrow linked-profile mode rather than “symlink most of CODEX_HOME”.

Proposed shape:

  • codex-profile init personal-2 --share-with personal-1
  • create ~/.codex-personal-2 as a real private directory
  • symlink only an explicit allowlist from the source profile:
    • config.toml
    • AGENTS.md
    • AGENTS.override.md
    • instructions.md
    • custom-instructions.md
    • rules/
    • plugins/
  • always keep auth.json, sessions/, logs/, electron-user-data/, caches, and connector/app state separate
  • fail if source profile is missing, source equals target, or a target path already exists

That preserves the project’s “don’t read/copy auth tokens” boundary while solving the live shared-config use case. I’d skip session/log sharing for the first version; add it later only if there’s real demand.

Summary:
- add init --share-with using a fixed configuration allowlist
- preserve separate auth, runtime, Desktop, cache, and connector state
- synchronize help, completions, user docs, security docs, and metadata
- cover successful linking and all failure-cleanup boundaries

Rationale:
- support shared configuration without weakening profile identity isolation
- replace broad CODEX_HOME discovery with explicit, auditable paths
- retain compatibility with stock macOS Bash 3.2

Tests:
- make test
- make lint
- git diff --check
@Ducksss Ducksss force-pushed the codex/issue-3-shared-profile-groups branch from 9264d3a to f7dc946 Compare July 13, 2026 22:07
@Ducksss Ducksss changed the title feat: support shared profile groups with separate auth cli(feat): add linked configuration profiles Jul 13, 2026
@Ducksss Ducksss merged commit c73f2d3 into Ducksss:main Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Support shared profile groups with separate auth

2 participants