-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
64 lines (55 loc) · 2.95 KB
/
Copy pathinstall.sh
File metadata and controls
64 lines (55 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# C3 — Claude Code Companion Installer
# Installs c3 as a globally available command
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Get version from cli/c3.py
C3_VER=$(grep "__version__ =" "$SCRIPT_DIR/cli/c3.py" | cut -d'"' -f2)
echo "╔══════════════════════════════════════════════╗"
echo "║ C3 — Claude Code Companion Installer ║"
echo "║ Version: v$C3_VER ║"
echo "╚══════════════════════════════════════════════╝"
echo ""
# Check Python
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is required. Please install it first."
exit 1
fi
echo "Tip: no clone needed next time — 'pipx install code-context-control' installs from PyPI."
echo ""
echo "📦 Installing C3 from this checkout (this may take a minute)..."
# pip install creates the `c3`, `c3-mcp`, and `c3-hub` entry-point scripts in
# the active Python's bin dir (or ~/.local/bin with --user). These entry points
# are all that's needed — `c3` (no args) launches the TUI and `.mcp.json` points
# at `c3-mcp`, so no PYTHONPATH wrapper is created. Includes the [tui] extra.
pip3 install "$SCRIPT_DIR[tui]" -q 2>/dev/null \
|| pip3 install --user "$SCRIPT_DIR[tui]" -q 2>/dev/null \
|| pip3 install --break-system-packages "$SCRIPT_DIR[tui]" -q
# Sanity-check that `c3` is discoverable on PATH
if ! command -v c3 &> /dev/null; then
echo "⚠️ 'c3' was installed but is not on your PATH."
echo " Add your Python user-bin to PATH, e.g.:"
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
fi
echo ""
echo "✅ C3 installed successfully!"
echo ""
echo "Quick start:"
echo " cd /your/project"
echo " c3 init ."
echo " c3 init . --force # Existing C3 project: apply latest migrations"
echo " c3 install-mcp . # Register MCP tools for your IDE (auto-detect)"
echo " c3 ui # Launch per-project web dashboard"
echo " c3-hub # Launch global Project Hub (port 3330)"
echo " c3 upgrade # Upgrade C3 to the latest PyPI release"
echo " c3 stats # CLI stats"
echo " c3 context 'fix the auth bug' # Get context"
echo " c3 pipe 'fix the auth bug' # All-in-one context pipeline"
echo ""
echo "Bitbucket Data Center / Server (v2.30.0+, optional):"
echo " c3 bitbucket login --url https://bitbucket.example.com # Stores PAT in OS keyring"
echo " c3 bitbucket set-default --project PROJ --repo my-repo # Pin default workspace"
echo " c3 bitbucket status # Show accounts + connectivity"
echo " See cli/guide/bitbucket.html (or the in-app Guide at /guide/) for the full action reference."
echo ""
echo "Run 'c3 --help' for all commands."