Skip to content

feat(cli): add user-scoped host setup#23

Open
OpenAIBot1 wants to merge 1 commit into
Intelligent-Internet:mainfrom
OpenAIBot1:feat/global-host-install
Open

feat(cli): add user-scoped host setup#23
OpenAIBot1 wants to merge 1 commit into
Intelligent-Internet:mainfrom
OpenAIBot1:feat/global-host-install

Conversation

@OpenAIBot1

Copy link
Copy Markdown

Summary

  • add zenith init --scope user for deterministic cross-workspace setup in Claude Code and Codex
  • install the user-scoped MCP registration, host agents/playbooks, orchestrator prompt, and personal /zenith skill while preserving unrelated user configuration
  • keep project scope as the backward-compatible default and document user/project setup, both-host installation, restart behavior, config-directory overrides, and checkout relocation

User scope deliberately does not select or persist a model, reasoning effort, sandbox mode, feature preference, or ambient API/model environment variable. Existing project-scope behavior is unchanged.

This turns the global-skill direction introduced in #5 into a tested CLI workflow. Hermes remains available through project scope until its authoritative user-scope paths are established.

Closes #22.

Compatibility

  • Claude Code: writes the root user MCP entry in ~/.claude.json or $CLAUDE_CONFIG_DIR/.claude.json
  • Codex: writes only a managed Zenith MCP block in $CODEX_HOME/config.toml (default ~/.codex/config.toml)
  • existing Claude JSON and Codex TOML preferences, unrelated MCP servers, skills, and agents are preserved
  • existing managed or unmanaged Zenith registrations are replaced idempotently, including equivalent quoted/commented Codex TOML headers
  • malformed or structurally incompatible host config fails before asset mutation
  • Claude Code and Codex may be installed in either order

Validation

  • uv run ruff check .
  • uv run mypy src
  • uv run pytest -q — 217 passed, 7 skipped
  • fresh disposable-home CLI flows for Claude Code and Codex in both installation orders
  • claude mcp get zenith reported user scope and connected
  • codex mcp get zenith reported the server enabled
  • registered absolute server command launched from an unrelated workspace
  • omitted versus explicit project scope produced identical workspace trees

Checklist

  • uv run ruff check . passes
  • uv run mypy src passes
  • uv run pytest -q passes
  • Tests added/updated for behavior changes

Add a backwards-compatible --scope user mode for Claude Code and Codex. Register Zenith in each host's user config, install managed host assets and a personal /zenith skill, and preserve model, effort, sandbox, feature, and unrelated MCP settings.\n\nKeep project scope as the default, document both modes, and cover config compatibility, idempotency, cross-host ordering, failure safety, and runtime launch.
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.

Add user-scoped setup for Claude Code and Codex

1 participant