codebakers 2.5.4 → 3.0.0

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.
Files changed (60) hide show
  1. package/README.md +54 -255
  2. package/dist/chunk-HOWR3YTF.js +146 -0
  3. package/dist/index.d.ts +0 -3
  4. package/dist/index.js +10488 -7993
  5. package/dist/terminal-6ZQVP6R7.js +10 -0
  6. package/package.json +26 -41
  7. package/AUDIT_REPORT.md +0 -138
  8. package/dist/advisors-RWRTSJRR.js +0 -7
  9. package/dist/chunk-ASIJIQYC.js +0 -320
  10. package/dist/chunk-D44U3IEA.js +0 -565
  11. package/dist/chunk-LANM5XQW.js +0 -326
  12. package/dist/prd-RYITSL6Q.js +0 -7
  13. package/install.bat +0 -9
  14. package/installers/CodeBakers-Install.bat +0 -207
  15. package/installers/CodeBakers-Install.command +0 -232
  16. package/installers/README.md +0 -157
  17. package/installers/mac/assets/README.txt +0 -31
  18. package/installers/mac/build-mac-installer.sh +0 -240
  19. package/installers/windows/CodeBakers.iss +0 -256
  20. package/installers/windows/assets/README.txt +0 -16
  21. package/installers/windows/scripts/post-install.bat +0 -15
  22. package/src/channels/discord.ts +0 -5
  23. package/src/channels/slack.ts +0 -5
  24. package/src/channels/sms.ts +0 -4
  25. package/src/channels/telegram.ts +0 -5
  26. package/src/channels/whatsapp.ts +0 -7
  27. package/src/commands/advisors.ts +0 -699
  28. package/src/commands/build.ts +0 -1025
  29. package/src/commands/check.ts +0 -365
  30. package/src/commands/code.ts +0 -806
  31. package/src/commands/connect.ts +0 -12
  32. package/src/commands/deploy.ts +0 -448
  33. package/src/commands/design.ts +0 -298
  34. package/src/commands/fix.ts +0 -20
  35. package/src/commands/gateway.ts +0 -604
  36. package/src/commands/generate.ts +0 -178
  37. package/src/commands/init.ts +0 -634
  38. package/src/commands/integrate.ts +0 -884
  39. package/src/commands/learn.ts +0 -36
  40. package/src/commands/migrate.ts +0 -419
  41. package/src/commands/prd-maker.ts +0 -588
  42. package/src/commands/prd.ts +0 -419
  43. package/src/commands/security.ts +0 -102
  44. package/src/commands/setup.ts +0 -600
  45. package/src/commands/status.ts +0 -56
  46. package/src/commands/website.ts +0 -741
  47. package/src/index.ts +0 -627
  48. package/src/patterns/loader.ts +0 -337
  49. package/src/services/github.ts +0 -61
  50. package/src/services/supabase.ts +0 -147
  51. package/src/services/vercel.ts +0 -61
  52. package/src/utils/claude-md.ts +0 -287
  53. package/src/utils/config.ts +0 -375
  54. package/src/utils/display.ts +0 -338
  55. package/src/utils/files.ts +0 -418
  56. package/src/utils/nlp.ts +0 -312
  57. package/src/utils/ui.ts +0 -441
  58. package/src/utils/updates.ts +0 -8
  59. package/src/utils/voice.ts +0 -323
  60. package/tsconfig.json +0 -26
@@ -1,232 +0,0 @@
1
- #!/bin/bash
2
-
3
- # ============================================================================
4
- # CODEBAKERS INSTALLER FOR MAC
5
- # ============================================================================
6
-
7
- chmod +x "$0" 2>/dev/null
8
-
9
- # Colors
10
- GREEN='\033[0;32m'
11
- CYAN='\033[0;36m'
12
- YELLOW='\033[1;33m'
13
- NC='\033[0m'
14
-
15
- clear
16
-
17
- echo ""
18
- echo -e "${CYAN} ================================================================${NC}"
19
- echo ""
20
- echo -e "${CYAN} WELCOME TO CODEBAKERS${NC}"
21
- echo ""
22
- echo -e "${CYAN} Build apps 10x faster with AI that follows YOUR rules${NC}"
23
- echo ""
24
- echo -e "${CYAN} ================================================================${NC}"
25
- echo ""
26
- echo " What you're getting:"
27
- echo ""
28
- echo " * AI Coding Agent - Claude builds features for you"
29
- echo " * Website Builder - Describe it, AI creates it"
30
- echo " * One-Click Deploy - Push to production instantly"
31
- echo " * 50+ Integrations - Stripe, Supabase, Twilio and more"
32
- echo ""
33
- echo -e "${CYAN} ================================================================${NC}"
34
- echo ""
35
- read -p " Press Enter to install..."
36
-
37
- # ============================================================================
38
- # STEP 1: Check for Node.js
39
- # ============================================================================
40
-
41
- echo ""
42
- echo -e "${CYAN} ----------------------------------------------------------------${NC}"
43
- echo -e "${CYAN} STEP 1: Checking for Node.js...${NC}"
44
- echo -e "${CYAN} ----------------------------------------------------------------${NC}"
45
- echo ""
46
-
47
- if ! command -v node &> /dev/null; then
48
- echo -e " ${YELLOW}[!] Node.js is not installed.${NC}"
49
- echo ""
50
- echo " CodeBakers requires Node.js to run."
51
- echo ""
52
- echo " Would you like to install Node.js using Homebrew?"
53
- echo ""
54
- echo " [1] Yes, install with Homebrew"
55
- echo " [2] No, I'll install it manually"
56
- echo ""
57
- read -p " Enter choice (1-2): " node_choice
58
-
59
- if [ "$node_choice" == "1" ]; then
60
- if ! command -v brew &> /dev/null; then
61
- echo ""
62
- echo " Installing Homebrew first..."
63
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
64
- fi
65
-
66
- echo ""
67
- echo " Installing Node.js..."
68
- brew install node
69
- else
70
- echo ""
71
- echo " Opening Node.js download page..."
72
- open https://nodejs.org/
73
- echo ""
74
- echo " Please install Node.js, then run this installer again."
75
- read -p " Press Enter to exit..."
76
- exit 1
77
- fi
78
- fi
79
-
80
- NODE_VERSION=$(node --version)
81
- echo -e " ${GREEN}[OK] Node.js ${NODE_VERSION} found${NC}"
82
- echo ""
83
-
84
- # ============================================================================
85
- # STEP 2: Install CodeBakers (Silent - no npm output)
86
- # ============================================================================
87
-
88
- echo -e "${CYAN} ----------------------------------------------------------------${NC}"
89
- echo -e "${CYAN} STEP 2: Installing CodeBakers...${NC}"
90
- echo -e "${CYAN} ----------------------------------------------------------------${NC}"
91
- echo ""
92
-
93
- # Silent install - npm handles versioning automatically
94
- npm install -g codebakers@latest > /dev/null 2>&1
95
-
96
- if [ $? -ne 0 ]; then
97
- echo -e " ${YELLOW}[!] Retrying with sudo...${NC}"
98
- sudo npm install -g codebakers@latest > /dev/null 2>&1
99
- fi
100
-
101
- echo -e " ${GREEN}[OK] CodeBakers is ready!${NC}"
102
- echo ""
103
-
104
- # ============================================================================
105
- # STEP 3: Choose Editor
106
- # ============================================================================
107
-
108
- echo -e "${CYAN} ----------------------------------------------------------------${NC}"
109
- echo -e "${CYAN} STEP 3: Choose your code editor${NC}"
110
- echo -e "${CYAN} ----------------------------------------------------------------${NC}"
111
- echo ""
112
-
113
- # Detect installed editors
114
- EDITORS=()
115
- EDITOR_NAMES=()
116
-
117
- if command -v cursor &> /dev/null; then
118
- EDITORS+=("Cursor")
119
- EDITOR_NAMES+=("Cursor")
120
- fi
121
-
122
- if command -v code &> /dev/null; then
123
- EDITORS+=("VS Code")
124
- EDITOR_NAMES+=("VS Code")
125
- fi
126
-
127
- if command -v windsurf &> /dev/null; then
128
- EDITORS+=("Windsurf")
129
- EDITOR_NAMES+=("Windsurf")
130
- fi
131
-
132
- if command -v zed &> /dev/null; then
133
- EDITORS+=("Zed")
134
- EDITOR_NAMES+=("Zed")
135
- fi
136
-
137
- EDITORS+=("Other")
138
- EDITOR_NAMES+=("Other / I'll do it myself")
139
-
140
- echo " Select your preferred editor:"
141
- echo ""
142
-
143
- for i in "${!EDITOR_NAMES[@]}"; do
144
- echo " [$((i+1))] ${EDITOR_NAMES[$i]}"
145
- done
146
-
147
- echo ""
148
- read -p " Enter your choice (1-${#EDITORS[@]}): " CHOICE
149
-
150
- # Default to 1 if empty
151
- if [ -z "$CHOICE" ]; then
152
- CHOICE=1
153
- fi
154
-
155
- # Validate choice
156
- if [ "$CHOICE" -gt "${#EDITORS[@]}" ] || [ "$CHOICE" -lt 1 ]; then
157
- CHOICE=${#EDITORS[@]}
158
- fi
159
-
160
- SELECTED="${EDITORS[$((CHOICE-1))]}"
161
-
162
- # ============================================================================
163
- # FINAL: Show instructions and optionally open editor
164
- # ============================================================================
165
-
166
- echo ""
167
- echo -e "${CYAN} ================================================================${NC}"
168
- echo ""
169
- echo -e " ${GREEN}[OK] CodeBakers installed successfully!${NC}"
170
- echo ""
171
- echo -e "${CYAN} ================================================================${NC}"
172
- echo ""
173
- echo " HERE'S WHAT TO DO NEXT:"
174
- echo ""
175
- echo " 1. Open ${SELECTED}"
176
- echo ""
177
- echo " 2. Click \"File\" then \"Open Folder\""
178
- echo " Select ANY folder where you want to build"
179
- echo " (Example: ~/Projects/my-app)"
180
- echo ""
181
- echo " 3. Open the terminal inside your editor"
182
- echo " Press: Cmd + \` (the key above Tab)"
183
- echo ""
184
- echo " 4. Type this command and press Enter:"
185
- echo ""
186
- echo " codebakers"
187
- echo ""
188
- echo -e "${CYAN} ================================================================${NC}"
189
- echo ""
190
- echo " That's it! CodeBakers will guide you from there."
191
- echo ""
192
- echo -e "${CYAN} ================================================================${NC}"
193
- echo ""
194
-
195
- if [ "$SELECTED" == "Other" ]; then
196
- read -p " Press Enter to exit..."
197
- exit 0
198
- fi
199
-
200
- read -p " Would you like to open ${SELECTED} now? (Y/n): " OPEN_EDITOR
201
-
202
- if [ "$OPEN_EDITOR" == "n" ] || [ "$OPEN_EDITOR" == "N" ]; then
203
- echo ""
204
- echo " No problem! Open ${SELECTED} whenever you're ready."
205
- echo ""
206
- read -p " Press Enter to exit..."
207
- exit 0
208
- fi
209
-
210
- echo ""
211
- echo " Opening ${SELECTED}..."
212
- echo ""
213
- echo " Remember: Open a folder, then open terminal, then type 'codebakers'"
214
- echo ""
215
-
216
- case "$SELECTED" in
217
- "Cursor")
218
- cursor &
219
- ;;
220
- "VS Code")
221
- code &
222
- ;;
223
- "Windsurf")
224
- windsurf &
225
- ;;
226
- "Zed")
227
- zed &
228
- ;;
229
- esac
230
-
231
- echo " This window will close in 10 seconds..."
232
- sleep 10
@@ -1,157 +0,0 @@
1
- # CodeBakers Installers
2
-
3
- This folder contains everything needed to build professional installers for Windows and Mac.
4
-
5
- ## Quick Start (No Signing)
6
-
7
- ### Windows
8
- 1. Download [Inno Setup](https://jrsoftware.org/isdl.php)
9
- 2. Open `windows/CodeBakers.iss`
10
- 3. Add your icon to `windows/assets/icon.ico`
11
- 4. Click Build > Compile
12
- 5. Output: `windows/Output/CodeBakers-Setup-X.X.X.exe`
13
-
14
- ### Mac
15
- 1. Open Terminal in `mac/` folder
16
- 2. Run: `chmod +x build-mac-installer.sh && ./build-mac-installer.sh`
17
- 3. Output: `mac/build/CodeBakers-Setup-X.X.X.dmg`
18
-
19
- ⚠️ **Without signing, users will see security warnings.**
20
-
21
- ---
22
-
23
- ## Production Build (With Signing)
24
-
25
- ### Windows Code Signing
26
-
27
- **Step 1: Get a certificate (~$200-400/year)**
28
- - [DigiCert](https://www.digicert.com/signing/code-signing-certificates)
29
- - [Sectigo](https://sectigo.com/ssl-certificates-tls/code-signing)
30
- - [GlobalSign](https://www.globalsign.com/en/code-signing-certificate)
31
-
32
- **Step 2: Build the installer**
33
- ```batch
34
- # Using Inno Setup GUI or command line:
35
- iscc "windows/CodeBakers.iss"
36
- ```
37
-
38
- **Step 3: Sign the installer**
39
- ```batch
40
- signtool sign /f certificate.pfx /p YOUR_PASSWORD /tr http://timestamp.digicert.com /td sha256 "windows/Output/CodeBakers-Setup-2.3.3.exe"
41
- ```
42
-
43
- **Step 4: Verify signature**
44
- ```batch
45
- signtool verify /pa "windows/Output/CodeBakers-Setup-2.3.3.exe"
46
- ```
47
-
48
- ### Mac Code Signing & Notarization
49
-
50
- **Step 1: Get Apple Developer account ($99/year)**
51
- - Sign up at [developer.apple.com](https://developer.apple.com)
52
-
53
- **Step 2: Create certificates in Xcode**
54
- 1. Open Xcode > Preferences > Accounts
55
- 2. Select your team > Manage Certificates
56
- 3. Click + > Developer ID Application
57
-
58
- **Step 3: Create app-specific password**
59
- 1. Go to [appleid.apple.com](https://appleid.apple.com)
60
- 2. Security > App-Specific Passwords > Generate
61
-
62
- **Step 4: Set environment variables**
63
- ```bash
64
- export DEVELOPER_ID="Developer ID Application: BotMakers Inc. (XXXXXXXXXX)"
65
- export APPLE_ID="your@email.com"
66
- export TEAM_ID="XXXXXXXXXX"
67
- export APP_PASSWORD="xxxx-xxxx-xxxx-xxxx"
68
- ```
69
-
70
- **Step 5: Build signed & notarized DMG**
71
- ```bash
72
- cd mac
73
- ./build-mac-installer.sh
74
- ```
75
-
76
- ---
77
-
78
- ## File Structure
79
-
80
- ```
81
- installers/
82
- ├── README.md # This file
83
- ├── CodeBakers-Install.bat # Simple batch installer (Windows)
84
- ├── CodeBakers-Install.command # Simple shell installer (Mac)
85
-
86
- ├── windows/
87
- │ ├── CodeBakers.iss # Inno Setup script
88
- │ ├── assets/
89
- │ │ └── icon.ico # Windows icon (you create this)
90
- │ ├── scripts/
91
- │ │ └── post-install.bat # Runs after install
92
- │ └── Output/ # Built installers appear here
93
-
94
- └── mac/
95
- ├── build-mac-installer.sh # Build script
96
- ├── assets/
97
- │ └── icon.icns # Mac icon (you create this)
98
- └── build/ # Built installers appear here
99
- ```
100
-
101
- ---
102
-
103
- ## Creating Icons
104
-
105
- ### Windows (icon.ico)
106
- 1. Start with a 256x256 PNG logo
107
- 2. Go to [convertio.co/png-ico](https://convertio.co/png-ico/)
108
- 3. Upload and convert
109
- 4. Save as `windows/assets/icon.ico`
110
-
111
- ### Mac (icon.icns)
112
- 1. Start with a 1024x1024 PNG logo
113
- 2. Go to [cloudconvert.com/png-to-icns](https://cloudconvert.com/png-to-icns)
114
- 3. Upload and convert
115
- 4. Save as `mac/assets/icon.icns`
116
-
117
- ---
118
-
119
- ## Cost Summary
120
-
121
- | Item | Cost | Required? |
122
- |------|------|-----------|
123
- | Inno Setup | Free | Yes (Windows) |
124
- | Windows Code Signing Cert | $200-400/year | Recommended |
125
- | Apple Developer Account | $99/year | Recommended |
126
-
127
- **Without signing:** Users see "Unknown Publisher" / "Cannot verify developer" warnings
128
- **With signing:** Clean install experience, no warnings
129
-
130
- ---
131
-
132
- ## Distribution
133
-
134
- ### Your Website
135
- ```html
136
- <a href="/downloads/CodeBakers-Setup-2.3.3.exe">Download for Windows</a>
137
- <a href="/downloads/CodeBakers-Setup-2.3.3.dmg">Download for Mac</a>
138
- ```
139
-
140
- ### Homebrew (Mac/Linux) - Future
141
- ```ruby
142
- # Formula for homebrew-core
143
- class Codebakers < Formula
144
- desc "AI dev team that follows the rules"
145
- homepage "https://codebakers.dev"
146
- url "https://registry.npmjs.org/codebakers/-/codebakers-2.3.3.tgz"
147
-
148
- depends_on "node"
149
-
150
- def install
151
- system "npm", "install", "-g", "codebakers@#{version}"
152
- end
153
- end
154
- ```
155
-
156
- ### Microsoft Store - Future
157
- Package as MSIX and submit to Microsoft Store for zero-warning installs.
@@ -1,31 +0,0 @@
1
- ICON FILE PLACEHOLDER
2
- ====================
3
-
4
- Place your icon.icns file here.
5
-
6
- Requirements:
7
- - Format: ICNS (Mac icon format)
8
- - Sizes: 16x16, 32x32, 128x128, 256x256, 512x512, 1024x1024
9
-
10
- To create from your logo:
11
-
12
- Option 1 - Online converter:
13
- 1. Go to https://cloudconvert.com/png-to-icns
14
- 2. Upload your PNG logo (at least 1024x1024)
15
- 3. Download the .icns file
16
-
17
- Option 2 - Using iconutil (Mac):
18
- 1. Create an iconset folder: mkdir icon.iconset
19
- 2. Add PNGs at different sizes:
20
- - icon_16x16.png
21
- - icon_16x16@2x.png (32x32)
22
- - icon_32x32.png
23
- - icon_32x32@2x.png (64x64)
24
- - icon_128x128.png
25
- - icon_128x128@2x.png (256x256)
26
- - icon_256x256.png
27
- - icon_256x256@2x.png (512x512)
28
- - icon_512x512.png
29
- - icon_512x512@2x.png (1024x1024)
30
- 3. Run: iconutil -c icns icon.iconset
31
- 4. Move the resulting icon.icns to this folder
@@ -1,240 +0,0 @@
1
- #!/bin/bash
2
-
3
- # ============================================================================
4
- # CODEBAKERS MAC INSTALLER BUILDER
5
- # Creates a signed and notarized DMG for distribution
6
- # ============================================================================
7
- #
8
- # Prerequisites:
9
- # 1. Apple Developer Account ($99/year) - https://developer.apple.com
10
- # 2. Developer ID Application certificate installed in Keychain
11
- # 3. App-specific password for notarization
12
- #
13
- # Usage:
14
- # ./build-mac-installer.sh
15
- #
16
- # Environment variables (or edit below):
17
- # DEVELOPER_ID="Developer ID Application: BotMakers Inc. (TEAMID)"
18
- # APPLE_ID="your@email.com"
19
- # TEAM_ID="XXXXXXXXXX"
20
- # APP_PASSWORD="xxxx-xxxx-xxxx-xxxx" # App-specific password
21
- #
22
- # ============================================================================
23
-
24
- set -e
25
-
26
- # Configuration
27
- APP_NAME="CodeBakers"
28
- VERSION="2.3.3"
29
- DMG_NAME="CodeBakers-Setup-${VERSION}"
30
- DEVELOPER_ID="${DEVELOPER_ID:-}" # Set this or use environment variable
31
- APPLE_ID="${APPLE_ID:-}"
32
- TEAM_ID="${TEAM_ID:-}"
33
- APP_PASSWORD="${APP_PASSWORD:-}"
34
-
35
- # Colors
36
- RED='\033[0;31m'
37
- GREEN='\033[0;32m'
38
- CYAN='\033[0;36m'
39
- NC='\033[0m'
40
-
41
- echo -e "${CYAN}"
42
- echo "╔═══════════════════════════════════════════════════════════════╗"
43
- echo "║ CodeBakers Mac Installer Builder ║"
44
- echo "╚═══════════════════════════════════════════════════════════════╝"
45
- echo -e "${NC}"
46
-
47
- # Create build directory
48
- BUILD_DIR="./build"
49
- DMG_DIR="${BUILD_DIR}/dmg"
50
- rm -rf "${BUILD_DIR}"
51
- mkdir -p "${DMG_DIR}"
52
-
53
- echo -e "${CYAN}[1/6] Creating installer app...${NC}"
54
-
55
- # Create the installer app bundle structure
56
- APP_DIR="${DMG_DIR}/${APP_NAME} Installer.app"
57
- mkdir -p "${APP_DIR}/Contents/MacOS"
58
- mkdir -p "${APP_DIR}/Contents/Resources"
59
-
60
- # Create Info.plist
61
- cat > "${APP_DIR}/Contents/Info.plist" << EOF
62
- <?xml version="1.0" encoding="UTF-8"?>
63
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
64
- <plist version="1.0">
65
- <dict>
66
- <key>CFBundleExecutable</key>
67
- <string>install</string>
68
- <key>CFBundleIconFile</key>
69
- <string>icon</string>
70
- <key>CFBundleIdentifier</key>
71
- <string>dev.codebakers.installer</string>
72
- <key>CFBundleName</key>
73
- <string>${APP_NAME} Installer</string>
74
- <key>CFBundlePackageType</key>
75
- <string>APPL</string>
76
- <key>CFBundleShortVersionString</key>
77
- <string>${VERSION}</string>
78
- <key>CFBundleVersion</key>
79
- <string>${VERSION}</string>
80
- <key>LSMinimumSystemVersion</key>
81
- <string>10.15</string>
82
- <key>NSHighResolutionCapable</key>
83
- <true/>
84
- </dict>
85
- </plist>
86
- EOF
87
-
88
- # Create the installer script
89
- cat > "${APP_DIR}/Contents/MacOS/install" << 'INSTALLER_SCRIPT'
90
- #!/bin/bash
91
-
92
- # CodeBakers Installer for Mac
93
- # This script runs when user double-clicks the app
94
-
95
- # Get the directory where the app is located
96
- SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
97
- APP_DIR="$( cd "${SCRIPT_DIR}/../.." && pwd )"
98
-
99
- # Open Terminal and run the installer
100
- osascript << EOF
101
- tell application "Terminal"
102
- activate
103
- do script "clear && echo '
104
- ╔═══════════════════════════════════════════════════════════════╗
105
- ║ ║
106
- ║ ██████╗ ██████╗ ██████╗ ███████╗██████╗ █████╗ ██╗ ██╗ ║
107
- ║ ██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗██║ ██╔╝ ║
108
- ║ ██║ ██║ ██║██║ ██║█████╗ ██████╔╝███████║█████╔╝ ║
109
- ║ ██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗██╔══██║██╔═██╗ ║
110
- ║ ╚██████╗╚██████╔╝██████╔╝███████╗██████╔╝██║ ██║██║ ██╗ ║
111
- ║ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ║
112
- ║ ║
113
- ║ AI Dev Team That Follows The Rules ║
114
- ║ ║
115
- ╚═══════════════════════════════════════════════════════════════╝
116
- ' && echo '' && echo ' Installing CodeBakers...' && echo '' &&
117
-
118
- # Check for Node.js
119
- if ! command -v node &> /dev/null; then
120
- echo ' ⚠️ Node.js is not installed.'
121
- echo ''
122
- echo ' Please install Node.js first:'
123
- echo ' https://nodejs.org/'
124
- echo ''
125
- read -p ' Press Enter to open Node.js download page...'
126
- open 'https://nodejs.org/'
127
- exit 1
128
- fi
129
-
130
- echo ' ✓ Node.js is installed'
131
- echo ''
132
- echo ' Installing CodeBakers via npm...'
133
- npm install -g codebakers@latest
134
-
135
- echo ''
136
- echo ' ╔═══════════════════════════════════════════════════════════════╗'
137
- echo ' ║ ✓ CodeBakers installed successfully! ║'
138
- echo ' ║ ║'
139
- echo ' ║ To get started: ║'
140
- echo ' ║ 1. Open your code editor (VS Code, Cursor, etc.) ║'
141
- echo ' ║ 2. Open a folder where you want to build ║'
142
- echo ' ║ 3. Open the terminal (Cmd + \`) ║'
143
- echo ' ║ 4. Type: codebakers ║'
144
- echo ' ║ ║'
145
- echo ' ╚═══════════════════════════════════════════════════════════════╝'
146
- echo ''
147
- read -p ' Press Enter to close this window...'"
148
- end tell
149
- EOF
150
- INSTALLER_SCRIPT
151
-
152
- chmod +x "${APP_DIR}/Contents/MacOS/install"
153
-
154
- # Copy icon if exists
155
- if [ -f "./assets/icon.icns" ]; then
156
- cp "./assets/icon.icns" "${APP_DIR}/Contents/Resources/icon.icns"
157
- fi
158
-
159
- # Add Applications symlink for easy drag-drop
160
- ln -s /Applications "${DMG_DIR}/Applications"
161
-
162
- # Create README
163
- cat > "${DMG_DIR}/README.txt" << EOF
164
- CodeBakers Installer
165
- ====================
166
-
167
- Double-click "CodeBakers Installer" to install.
168
-
169
- Requirements:
170
- - macOS 10.15 or later
171
- - Node.js 18 or later
172
-
173
- After installation, open your code editor and type:
174
- codebakers
175
-
176
- Website: https://codebakers.dev
177
- Support: support@codebakers.dev
178
- EOF
179
-
180
- echo -e "${CYAN}[2/6] Signing app...${NC}"
181
-
182
- if [ -n "$DEVELOPER_ID" ]; then
183
- codesign --force --deep --sign "$DEVELOPER_ID" "${APP_DIR}"
184
- echo -e "${GREEN} ✓ App signed${NC}"
185
- else
186
- echo -e "${RED} ⚠ Skipping signing (no DEVELOPER_ID set)${NC}"
187
- fi
188
-
189
- echo -e "${CYAN}[3/6] Creating DMG...${NC}"
190
-
191
- # Create DMG
192
- hdiutil create -volname "${APP_NAME}" \
193
- -srcfolder "${DMG_DIR}" \
194
- -ov -format UDZO \
195
- "${BUILD_DIR}/${DMG_NAME}.dmg"
196
-
197
- echo -e "${GREEN} ✓ DMG created${NC}"
198
-
199
- echo -e "${CYAN}[4/6] Signing DMG...${NC}"
200
-
201
- if [ -n "$DEVELOPER_ID" ]; then
202
- codesign --force --sign "$DEVELOPER_ID" "${BUILD_DIR}/${DMG_NAME}.dmg"
203
- echo -e "${GREEN} ✓ DMG signed${NC}"
204
- else
205
- echo -e "${RED} ⚠ Skipping DMG signing${NC}"
206
- fi
207
-
208
- echo -e "${CYAN}[5/6] Notarizing...${NC}"
209
-
210
- if [ -n "$APPLE_ID" ] && [ -n "$TEAM_ID" ] && [ -n "$APP_PASSWORD" ]; then
211
- xcrun notarytool submit "${BUILD_DIR}/${DMG_NAME}.dmg" \
212
- --apple-id "$APPLE_ID" \
213
- --team-id "$TEAM_ID" \
214
- --password "$APP_PASSWORD" \
215
- --wait
216
-
217
- # Staple the notarization
218
- xcrun stapler staple "${BUILD_DIR}/${DMG_NAME}.dmg"
219
- echo -e "${GREEN} ✓ Notarization complete${NC}"
220
- else
221
- echo -e "${RED} ⚠ Skipping notarization (credentials not set)${NC}"
222
- fi
223
-
224
- echo -e "${CYAN}[6/6] Done!${NC}"
225
-
226
- echo ""
227
- echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════╗${NC}"
228
- echo -e "${GREEN}║ ✓ Installer created successfully! ║${NC}"
229
- echo -e "${GREEN}║ ║${NC}"
230
- echo -e "${GREEN}║ Output: ${BUILD_DIR}/${DMG_NAME}.dmg${NC}"
231
- echo -e "${GREEN}║ ║${NC}"
232
- if [ -z "$DEVELOPER_ID" ]; then
233
- echo -e "${GREEN}║ ⚠ Not signed - users will see Gatekeeper warning ║${NC}"
234
- echo -e "${GREEN}║ ║${NC}"
235
- fi
236
- echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════╝${NC}"
237
- echo ""
238
-
239
- # Open build folder
240
- open "${BUILD_DIR}"