Skip to content

feat: simplify install + upgrade — self-contained wheel, c3-mcp entry point, c3 upgrade (v2.36.0)#16

Merged
drknowhow merged 1 commit into
mainfrom
feat/install-simplification
Jun 13, 2026
Merged

feat: simplify install + upgrade — self-contained wheel, c3-mcp entry point, c3 upgrade (v2.36.0)#16
drknowhow merged 1 commit into
mainfrom
feat/install-simplification

Conversation

@drknowhow

Copy link
Copy Markdown
Owner

Summary

Makes a pure pip/pipx install of C3 self-contained, and makes upgrading a no-op for existing projects — no per-project reconfiguration. This is the install-simplification work (proposal tiers 1–5) on top of v2.35.0.

What changed

Self-contained wheel (Tier 1)

  • Moved guide/cli/guide/ and ship it as package data; previously the in-app guide existed only in a source checkout (the wheel excluded it).
  • Added a /guide/<page> route to the per-project UI (cli/server.py) and the Hub (cli/hub_server.py), so the guide works from an installed package and the existing docs.html link resolves.

.mcp.json decoupled from the source path (Tier 2)

  • install-mcp now writes the installed c3-mcp entry point (resolved via shutil.which) for the Claude .mcp.json, the Codex TOML, and the project + global Codex/Gemini session configs. Upgrading relocates nothing in any project's config.
  • Falls back to python <source>/cli/mcp_server.py when run from a checkout with no installed console script.

PyPI-canonical install + entry point (Tier 3)

  • c3 with no args launches the TUI from cli.c3:main (the console entry point now fully replaces the c3.bat wrapper).
  • README leads with pipx install code-context-control, documents upgrades, and adds a contributor pip install -e ".[dev]" path.

Upgrade UX (Tier 4)

  • c3 upgrade (+ --check): in-place pip -U within the running interpreter (pip & pipx); detects source/editable installs and points them at git pull.
  • Version-skew notice on c3 init for projects set up by an older C3.
  • VersionCheckAgent: once-a-day, best-effort PyPI nudge; opt-out via agents.VersionCheck.

Installer slimming (Tier 5)

  • install.sh / install.bat gained pipx/PyPI guidance and c3 upgrade in their help.
  • ~/.c3 lazy-init confirmed already handled in code (ProjectManager / hub writers mkdir on demand).
  • Registered BranchWatch + VersionCheck in AGENT_DEFAULTS.

Deliberate scope calls

  • Version skew is an informative nudge (recommends c3 init . --force), not silent auto-migration.
  • install.bat got targeted help edits, not a flow rewrite — an interactive batch script can't be safely run/tested in CI; the now-redundant wrapper/data-dir steps remain for a future Windows-validated cleanup.

Tests

+15 (guide route/colocation, install-mcp entry point, c3 upgrade, version compare, VersionCheckAgent), all network/subprocess mocked. Full suite 404 passing, ruff clean. Wheel build verified to include cli/guide/*.

Release

Bumps to v2.36.0 (pyproject.toml + cli/c3.py); CHANGELOG updated. Tagging v2.36.0 after merge triggers the automated PyPI publish + GitHub release via release.yml.

🤖 Generated with Claude Code

… point, c3 upgrade (v2.36.0)

Self-contained wheel: moved guide/ to cli/guide/ and ship it as package data; added a /guide route to the per-project UI and the Hub, so a pure pip install includes the in-app docs (previously source-only).

.mcp.json (plus project + global Codex/Gemini configs) now use the installed c3-mcp entry point instead of an absolute path into the source checkout, so upgrades need no per-project reconfiguration. Falls back to the source script when run from a checkout with no console script.

Added c3 upgrade (+ --check) with source/editable-install detection, a version-skew notice on c3 init, and a throttled VersionCheckAgent that nudges when a newer PyPI release exists (opt-out via agents.VersionCheck). c3 with no args now launches the TUI from the entry point.

Docs: README leads with pipx + documents c3 upgrade and a dev install; install.bat/install.sh gained pipx/PyPI + c3 upgrade guidance.

Tests: +15 (guide route/colocation, install-mcp entry point, c3 upgrade, version compare, VersionCheckAgent). Full suite 404 passing; ruff clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 13, 2026 18:11
@drknowhow drknowhow merged commit 00ffb50 into main Jun 13, 2026
12 checks passed
@drknowhow drknowhow deleted the feat/install-simplification branch June 13, 2026 18:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR streamlines installation and upgrades by making the PyPI wheel self-contained (including the in-app guide), wiring projects to a stable c3-mcp entry point so upgrades don’t require per-project config edits, and adding c3 upgrade + a background version nudge.

Changes:

  • Bundle and serve the in-app guide from the installed package (/guide/*) in both per-project UI and Hub.
  • Update MCP install wiring to prefer the installed c3-mcp entry point (fallback to source script), plus add c3 upgrade and a VersionCheckAgent.
  • Update docs/install scripts and bump version to v2.36.0 with accompanying tests and changelog entry.

Reviewed changes

Copilot reviewed 14 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_upgrade_and_version.py Adds coverage for version tuple parsing, c3 upgrade, and VersionCheckAgent throttling/notifications.
tests/test_install_mcp_entrypoint.py Verifies install-mcp writes c3-mcp when available and falls back to source invocation.
tests/test_hub_server_smoke.py Adds smoke tests for guide colocation and /guide/* routing behavior.
services/agents.py Introduces version resolution helpers and VersionCheckAgent; registers it in create_agents().
README.md Updates installation/upgrade docs to a PyPI-first flow and documents c3 upgrade.
pyproject.toml Bumps version and adjusts packaging so cli/guide/* ships in wheels; updates ruff excludes.
install.sh Updates installer messaging and help to reflect PyPI/pipx installs and c3 upgrade.
install.bat Updates help text to include c3 upgrade and new guide path references.
core/config.py Adds defaults for BranchWatch and VersionCheck in AGENT_DEFAULTS.
cli/server.py Adds /guide/ route to serve bundled guide assets from cli/guide.
cli/hub_server.py Adds /guide/ route to serve bundled guide assets from cli/guide.
cli/guide/index.html Adds bundled in-app guide homepage.
cli/guide/getting-started.html Adds bundled in-app “Getting Started” documentation page.
cli/guide/workflow.html Adds bundled workflow guide page (includes diagram rendering code).
cli/guide/tools.html Adds bundled tool reference documentation page.
cli/guide/shared.css Adds shared styling for the bundled guide pages.
cli/guide/oracle.html Adds bundled Oracle Discovery API guide page.
cli/guide/bitbucket.html Adds bundled Bitbucket integration guide page.
cli/commands/parser.py Adds upgrade subcommand and --check flag to the CLI parser.
cli/c3.py Bumps version, adds version skew notice, implements c3 upgrade, switches bare c3 to launch the TUI, and updates MCP config writing to prefer c3-mcp.
CHANGELOG.md Adds a 2.36.0 entry describing install/upgrade simplifications and new behaviors.

Comment thread README.md
The recommended install is [pipx](https://pipx.pypa.io) (isolated environment, on your PATH):

```bash
pipx install code-context-control
Comment thread README.md
```

The interactive setup walks you through:
Running `c3` with no arguments opens the interactive TUI. `c3 init` walks you through:
Comment thread cli/c3.py
if mcp_mode != "proxy":
_found = shutil.which("c3-mcp")
if _found:
c3_mcp_exe = Path(_found).resolve().as_posix()
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.

2 participants