@naarang/ccc 2.0.0-beta.2 → 2.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,78 +1,78 @@
1
- {
2
- "name": "@naarang/ccc",
3
- "version": "2.0.0-beta.2",
4
- "description": "Code Chat Connect - Control Claude Code from your mobile device",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "bin": {
8
- "ccc": "bin/ccc.cjs"
9
- },
10
- "scripts": {
11
- "dev": "bun src/index.ts",
12
- "build": "bun scripts/build-dist.ts",
13
- "build:compile": "bun scripts/build-binaries.ts",
14
- "build:linux-x64": "bun scripts/build-binaries.ts linux-x64",
15
- "build:linux-arm64": "bun scripts/build-binaries.ts linux-arm64",
16
- "build:darwin-x64": "bun scripts/build-binaries.ts darwin-x64",
17
- "build:darwin-arm64": "bun scripts/build-binaries.ts darwin-arm64",
18
- "build:windows-x64": "bun scripts/build-binaries.ts windows-x64",
19
- "build:all": "bun scripts/build-binaries.ts",
20
- "clean": "rm -rf dist binaries",
21
- "type-check": "tsc --noEmit",
22
- "setup": "bun install",
23
- "test:tools": "bun run scripts/test-claude-tools.ts",
24
- "prepublishOnly": "bun run build",
25
- "postinstall": "node scripts/postinstall.cjs || true"
26
- },
27
- "keywords": [
28
- "ccc",
29
- "ccc-ui",
30
- "claude",
31
- "claude-code",
32
- "mqtt",
33
- "chat",
34
- "mobile",
35
- "ai",
36
- "assistant",
37
- "cli",
38
- "bun"
39
- ],
40
- "author": "Vishal",
41
- "license": "UNLICENSED",
42
- "private": false,
43
- "publishConfig": {
44
- "access": "public"
45
- },
46
- "files": [
47
- "dist",
48
- "bin",
49
- "scripts",
50
- "README.md",
51
- "LICENSE"
52
- ],
53
- "preferGlobal": true,
54
- "engines": {
55
- "bun": ">=1.0.0"
56
- },
57
- "dependencies": {
58
- "@ngrok/ngrok": "^1.5.2",
59
- "@seriousme/opifex": "^1.11.2",
60
- "@types/bun": "^1.3.2",
61
- "@types/qrcode-terminal": "^0.12.2",
62
- "@types/ws": "^8.18.1",
63
- "@xterm/addon-fit": "^0.10.0",
64
- "@xterm/xterm": "^5.5.0",
65
- "aedes": "^0.51.3",
66
- "aedes-server-factory": "^0.2.1",
67
- "bun-pty": "^0.4.2",
68
- "expo-server-sdk": "^4.0.0",
69
- "figlet": "^1.9.3",
70
- "mqtt": "^5.14.1",
71
- "node-gyp": "11.4.2",
72
- "qrcode-terminal": "^0.12.0",
73
- "ws": "^8.18.3"
74
- },
75
- "devDependencies": {
76
- "typescript": "^5"
77
- }
78
- }
1
+ {
2
+ "name": "@naarang/ccc",
3
+ "version": "2.0.0-beta.5",
4
+ "description": "Code Chat Connect - Control Claude Code from your mobile device",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "ccc": "bin/ccc.cjs"
9
+ },
10
+ "scripts": {
11
+ "dev": "bun src/index.ts",
12
+ "build": "bun scripts/build-dist.ts",
13
+ "build:compile": "bun scripts/build-binaries.ts",
14
+ "build:linux-x64": "bun scripts/build-binaries.ts linux-x64",
15
+ "build:linux-arm64": "bun scripts/build-binaries.ts linux-arm64",
16
+ "build:darwin-x64": "bun scripts/build-binaries.ts darwin-x64",
17
+ "build:darwin-arm64": "bun scripts/build-binaries.ts darwin-arm64",
18
+ "build:windows-x64": "bun scripts/build-binaries.ts windows-x64",
19
+ "build:all": "bun scripts/build-binaries.ts",
20
+ "clean": "rm -rf dist binaries",
21
+ "type-check": "tsc --noEmit",
22
+ "setup": "bun install",
23
+ "test:tools": "bun run scripts/test-claude-tools.ts",
24
+ "prepublishOnly": "bun run build",
25
+ "postinstall": "node scripts/postinstall.cjs || true"
26
+ },
27
+ "keywords": [
28
+ "ccc",
29
+ "ccc-ui",
30
+ "claude",
31
+ "claude-code",
32
+ "mqtt",
33
+ "chat",
34
+ "mobile",
35
+ "ai",
36
+ "assistant",
37
+ "cli",
38
+ "bun"
39
+ ],
40
+ "author": "Vishal",
41
+ "license": "UNLICENSED",
42
+ "private": false,
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "files": [
47
+ "dist",
48
+ "bin",
49
+ "scripts",
50
+ "README.md",
51
+ "LICENSE"
52
+ ],
53
+ "preferGlobal": true,
54
+ "engines": {
55
+ "bun": ">=1.0.0"
56
+ },
57
+ "dependencies": {
58
+ "@ngrok/ngrok": "^1.5.2",
59
+ "@seriousme/opifex": "^1.11.2",
60
+ "@types/bun": "^1.3.2",
61
+ "@types/qrcode-terminal": "^0.12.2",
62
+ "@types/ws": "^8.18.1",
63
+ "@xterm/addon-fit": "^0.10.0",
64
+ "@xterm/xterm": "^5.5.0",
65
+ "aedes": "^0.51.3",
66
+ "aedes-server-factory": "^0.2.1",
67
+ "bun-pty": "^0.4.2",
68
+ "expo-server-sdk": "^4.0.0",
69
+ "figlet": "^1.9.3",
70
+ "mqtt": "^5.14.1",
71
+ "node-gyp": "11.4.2",
72
+ "qrcode-terminal": "^0.12.0",
73
+ "ws": "^8.18.3"
74
+ },
75
+ "devDependencies": {
76
+ "typescript": "^5"
77
+ }
78
+ }
@@ -1,16 +1,26 @@
1
1
  # CCC - Code Chat Connect Installer for Windows
2
2
  # https://github.com/naarang/ccc
3
3
  #
4
- # Usage: irm https://getc3.app/install.ps1 | iex
4
+ # Usage:
5
+ # irm https://getc3.app/install.ps1 | iex # Install stable
6
+ # $env:CCC_CHANNEL='beta'; irm https://getc3.app/install.ps1 | iex # Install beta
7
+ # $env:CCC_CHANNEL='alpha'; irm https://getc3.app/install.ps1 | iex # Install alpha
5
8
 
6
9
  $ErrorActionPreference = "Stop"
7
10
 
8
11
  # Configuration
9
12
  # Public releases repository (binaries are published here for public access)
10
13
  $GITHUB_REPO = "vishal-android-freak/ccc-releases"
11
- $INSTALL_DIR = if ($env:CCC_INSTALL_DIR) { $env:CCC_INSTALL_DIR } else { "$env:USERPROFILE\.ccc" }
14
+ $INSTALL_DIR = if ($env:CCC_INSTALL_DIR) { $env:CCC_INSTALL_DIR } else { "$env:USERPROFILE\.local" }
12
15
  $BIN_DIR = "$INSTALL_DIR\bin"
13
16
 
17
+ # Channel selection (stable, beta, alpha) - set via CCC_CHANNEL env var
18
+ $Channel = if ($env:CCC_CHANNEL) { $env:CCC_CHANNEL.ToLower() } else { "stable" }
19
+ if ($Channel -notin @("stable", "beta", "alpha")) {
20
+ Write-Host "Invalid channel: $Channel. Using 'stable'." -ForegroundColor Yellow
21
+ $Channel = "stable"
22
+ }
23
+
14
24
  function Write-ColorOutput($ForegroundColor) {
15
25
  $fc = $host.UI.RawUI.ForegroundColor
16
26
  $host.UI.RawUI.ForegroundColor = $ForegroundColor
@@ -56,17 +66,35 @@ function Detect-Platform {
56
66
  }
57
67
 
58
68
  function Get-LatestVersion {
59
- Write-Host "Fetching latest version..." -ForegroundColor Blue
69
+ Write-Host "Fetching latest $Channel version..." -ForegroundColor Blue
60
70
 
61
71
  try {
62
- $response = Invoke-RestMethod -Uri "https://api.github.com/repos/$GITHUB_REPO/releases/latest" -Method Get
63
- $script:VERSION = $response.tag_name -replace '^v', ''
72
+ if ($Channel -eq "stable") {
73
+ # For stable, use /releases/latest (excludes prereleases)
74
+ $response = Invoke-RestMethod -Uri "https://api.github.com/repos/$GITHUB_REPO/releases/latest" -Method Get
75
+ $script:VERSION = $response.tag_name -replace '^v', ''
76
+ }
77
+ else {
78
+ # For beta/alpha, fetch all releases and find matching prerelease
79
+ $releases = Invoke-RestMethod -Uri "https://api.github.com/repos/$GITHUB_REPO/releases?per_page=20" -Method Get
80
+ $matchingRelease = $releases | Where-Object {
81
+ $_.prerelease -eq $true -and $_.tag_name -match $Channel
82
+ } | Select-Object -First 1
83
+
84
+ if ($null -eq $matchingRelease) {
85
+ throw "No $Channel release found"
86
+ }
87
+ $script:VERSION = $matchingRelease.tag_name -replace '^v', ''
88
+ }
89
+
64
90
  Write-Host "Latest version: " -ForegroundColor Green -NoNewline
65
- Write-Host $VERSION
91
+ Write-Host "$VERSION ($Channel)"
66
92
  }
67
93
  catch {
68
- Write-Host "Error: Could not determine latest version" -ForegroundColor Red
69
- Write-Host "Please check your internet connection or try again later."
94
+ Write-Host "Error: Could not find a $Channel release" -ForegroundColor Red
95
+ if ($Channel -eq "stable") {
96
+ Write-Host "No stable release available yet. Try: .\install.ps1 -Channel beta"
97
+ }
70
98
  exit 1
71
99
  }
72
100
  }
@@ -103,14 +131,11 @@ function Setup-Path {
103
131
  $currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
104
132
 
105
133
  if ($currentPath -notlike "*$BIN_DIR*") {
106
- # Add to user PATH
107
- $newPath = "$BIN_DIR;$currentPath"
108
- [Environment]::SetEnvironmentVariable("Path", $newPath, "User")
109
-
110
- # Update current session
134
+ $script:PATH_IN_ENV = $false
135
+ # Update current session only (don't modify user PATH automatically)
111
136
  $env:Path = "$BIN_DIR;$env:Path"
112
-
113
- Write-Host "Added CCC to PATH" -ForegroundColor Green
137
+ } else {
138
+ $script:PATH_IN_ENV = $true
114
139
  }
115
140
  }
116
141
 
@@ -139,7 +164,22 @@ function Verify-Installation {
139
164
  Write-Host "ccc --help" -ForegroundColor White -NoNewline
140
165
  Write-Host " for usage information."
141
166
  Write-Host ""
142
- Write-Host "Note: You may need to restart your terminal for PATH changes to take effect." -ForegroundColor Yellow
167
+
168
+ # Show PATH instructions if not already in PATH
169
+ if (-not $script:PATH_IN_ENV) {
170
+ Write-Host "Note: " -ForegroundColor Yellow -NoNewline
171
+ Write-Host "~\.local\bin is not in your PATH" -ForegroundColor Yellow
172
+ Write-Host ""
173
+ Write-Host "Add it to your PATH by running one of the following commands:" -ForegroundColor White
174
+ Write-Host ""
175
+ Write-Host " # Add to user PATH permanently (recommended):" -ForegroundColor Cyan
176
+ Write-Host " [Environment]::SetEnvironmentVariable('Path', `"`$env:USERPROFILE\.local\bin;`$([Environment]::GetEnvironmentVariable('Path', 'User'))`", 'User')" -ForegroundColor Gray
177
+ Write-Host ""
178
+ Write-Host " # Or add to current session only:" -ForegroundColor Cyan
179
+ Write-Host " `$env:Path = `"`$env:USERPROFILE\.local\bin;`$env:Path`"" -ForegroundColor Gray
180
+ Write-Host ""
181
+ Write-Host "Then restart your terminal for the changes to take effect." -ForegroundColor Yellow
182
+ }
143
183
  }
144
184
  else {
145
185
  Write-Host "Installation failed. Please try again." -ForegroundColor Red