codebakers 2.3.0 → 2.3.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.
@@ -0,0 +1,240 @@
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}"
@@ -0,0 +1,256 @@
1
+ ; ============================================================================
2
+ ; CODEBAKERS WINDOWS INSTALLER
3
+ ; Built with Inno Setup - https://jrsoftware.org/isinfo.php
4
+ ; ============================================================================
5
+ ;
6
+ ; To build this installer:
7
+ ; 1. Download Inno Setup from https://jrsoftware.org/isdl.php
8
+ ; 2. Open this .iss file in Inno Setup
9
+ ; 3. Click Build > Compile
10
+ ; 4. Output will be in the "Output" folder
11
+ ;
12
+ ; To code sign (removes "Unknown Publisher" warning):
13
+ ; 1. Get a code signing certificate from DigiCert, Sectigo, etc.
14
+ ; 2. After compiling, run:
15
+ ; signtool sign /f cert.pfx /p password /tr http://timestamp.digicert.com /td sha256 "CodeBakers-Setup.exe"
16
+ ;
17
+ ; ============================================================================
18
+
19
+ #define MyAppName "CodeBakers"
20
+ #define MyAppVersion "2.3.3"
21
+ #define MyAppPublisher "BotMakers Inc."
22
+ #define MyAppURL "https://codebakers.dev"
23
+ #define MyAppExeName "codebakers"
24
+
25
+ [Setup]
26
+ ; App identity
27
+ AppId={{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
28
+ AppName={#MyAppName}
29
+ AppVersion={#MyAppVersion}
30
+ AppVerName={#MyAppName} {#MyAppVersion}
31
+ AppPublisher={#MyAppPublisher}
32
+ AppPublisherURL={#MyAppURL}
33
+ AppSupportURL={#MyAppURL}/support
34
+ AppUpdatesURL={#MyAppURL}/updates
35
+
36
+ ; Install location
37
+ DefaultDirName={autopf}\{#MyAppName}
38
+ DefaultGroupName={#MyAppName}
39
+ DisableProgramGroupPage=yes
40
+
41
+ ; Output settings
42
+ OutputDir=Output
43
+ OutputBaseFilename=CodeBakers-Setup-{#MyAppVersion}
44
+ SetupIconFile=assets\icon.ico
45
+ UninstallDisplayIcon={app}\icon.ico
46
+
47
+ ; Compression
48
+ Compression=lzma2
49
+ SolidCompression=yes
50
+
51
+ ; Privileges (no admin needed for npm global install)
52
+ PrivilegesRequired=lowest
53
+ PrivilegesRequiredOverridesAllowed=dialog
54
+
55
+ ; UI
56
+ WizardStyle=modern
57
+ WizardSizePercent=120
58
+
59
+ ; Minimum Windows version (Windows 10+)
60
+ MinVersion=10.0
61
+
62
+ [Languages]
63
+ Name: "english"; MessagesFile: "compiler:Default.isl"
64
+
65
+ [Messages]
66
+ WelcomeLabel1=Welcome to CodeBakers
67
+ WelcomeLabel2=This will install CodeBakers on your computer.%n%nCodeBakers is an AI-powered development tool that helps you build apps faster.%n%nClick Next to continue.
68
+
69
+ [Files]
70
+ ; Include Node.js installer (optional - download during install instead)
71
+ ; Source: "node-v20.10.0-x64.msi"; DestDir: "{tmp}"; Flags: deleteafterinstall
72
+
73
+ ; Include icon
74
+ Source: "assets\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
75
+
76
+ ; Include post-install script
77
+ Source: "scripts\post-install.bat"; DestDir: "{app}"; Flags: ignoreversion
78
+
79
+ [Icons]
80
+ ; Start Menu shortcut to open terminal with codebakers
81
+ Name: "{group}\CodeBakers"; Filename: "{cmd}"; Parameters: "/k codebakers"; WorkingDir: "{userdocs}"; IconFilename: "{app}\icon.ico"
82
+ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
83
+
84
+ ; Desktop shortcut (optional)
85
+ Name: "{autodesktop}\CodeBakers"; Filename: "{cmd}"; Parameters: "/k codebakers"; WorkingDir: "{userdocs}"; IconFilename: "{app}\icon.ico"; Tasks: desktopicon
86
+
87
+ [Tasks]
88
+ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
89
+
90
+ [Run]
91
+ ; Run post-install script
92
+ Filename: "{app}\post-install.bat"; Parameters: ""; Flags: runhidden waituntilterminated
93
+
94
+ ; Offer to launch after install
95
+ Filename: "{cmd}"; Parameters: "/k cd /d ""{userdocs}"" && codebakers"; Description: "Launch CodeBakers"; Flags: postinstall nowait skipifsilent shellexec
96
+
97
+ [UninstallRun]
98
+ ; Uninstall npm package
99
+ Filename: "npm"; Parameters: "uninstall -g codebakers"; Flags: runhidden waituntilterminated
100
+
101
+ [Code]
102
+ var
103
+ EditorPage: TInputOptionWizardPage;
104
+ FolderPage: TInputDirWizardPage;
105
+ NodeInstalled: Boolean;
106
+ SelectedEditor: Integer;
107
+ ProjectFolder: String;
108
+
109
+ // Check if Node.js is installed
110
+ function IsNodeInstalled(): Boolean;
111
+ var
112
+ ResultCode: Integer;
113
+ begin
114
+ Result := Exec('node', '--version', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and (ResultCode = 0);
115
+ end;
116
+
117
+ // Check if an editor is installed
118
+ function IsEditorInstalled(EditorCmd: String): Boolean;
119
+ var
120
+ ResultCode: Integer;
121
+ begin
122
+ Result := Exec('where', EditorCmd, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and (ResultCode = 0);
123
+ end;
124
+
125
+ // Initialize wizard
126
+ procedure InitializeWizard();
127
+ begin
128
+ // Check Node.js
129
+ NodeInstalled := IsNodeInstalled();
130
+
131
+ // Create folder selection page
132
+ FolderPage := CreateInputDirPage(wpSelectDir,
133
+ 'Select Project Folder',
134
+ 'Where do you want to create your projects?',
135
+ 'CodeBakers will create new projects in this folder.',
136
+ False, '');
137
+ FolderPage.Add('');
138
+ FolderPage.Values[0] := ExpandConstant('{userdocs}\CodeBakers-Projects');
139
+
140
+ // Create editor selection page
141
+ EditorPage := CreateInputOptionPage(FolderPage.ID,
142
+ 'Select Your Editor',
143
+ 'Choose where you want to code',
144
+ 'CodeBakers will open your selected editor after installation.',
145
+ True, False);
146
+
147
+ // Add editor options (only if installed)
148
+ if IsEditorInstalled('cursor') then
149
+ EditorPage.Add('Cursor (AI-powered editor)');
150
+ if IsEditorInstalled('code') then
151
+ EditorPage.Add('VS Code');
152
+ if IsEditorInstalled('windsurf') then
153
+ EditorPage.Add('Windsurf');
154
+ EditorPage.Add('Windows Terminal');
155
+ EditorPage.Add('PowerShell');
156
+ EditorPage.Add('I''ll open it myself');
157
+
158
+ EditorPage.SelectedValueIndex := 0;
159
+ end;
160
+
161
+ // Validate Node.js is installed
162
+ function NextButtonClick(CurPageID: Integer): Boolean;
163
+ var
164
+ ResultCode: Integer;
165
+ begin
166
+ Result := True;
167
+
168
+ // On welcome page, check for Node.js
169
+ if CurPageID = wpWelcome then
170
+ begin
171
+ if not NodeInstalled then
172
+ begin
173
+ if MsgBox('Node.js is required but not installed.' + #13#10 + #13#10 +
174
+ 'Would you like to download Node.js now?', mbConfirmation, MB_YESNO) = IDYES then
175
+ begin
176
+ ShellExec('open', 'https://nodejs.org/', '', '', SW_SHOW, ewNoWait, ResultCode);
177
+ MsgBox('Please install Node.js, then run this installer again.', mbInformation, MB_OK);
178
+ Result := False;
179
+ end
180
+ else
181
+ begin
182
+ Result := False;
183
+ end;
184
+ end;
185
+ end;
186
+
187
+ // Save folder selection
188
+ if CurPageID = FolderPage.ID then
189
+ begin
190
+ ProjectFolder := FolderPage.Values[0];
191
+ // Create folder if it doesn't exist
192
+ if not DirExists(ProjectFolder) then
193
+ CreateDir(ProjectFolder);
194
+ end;
195
+
196
+ // Save editor selection
197
+ if CurPageID = EditorPage.ID then
198
+ begin
199
+ SelectedEditor := EditorPage.SelectedValueIndex;
200
+ end;
201
+ end;
202
+
203
+ // Install npm package
204
+ procedure CurStepChanged(CurStep: TSetupStep);
205
+ var
206
+ ResultCode: Integer;
207
+ begin
208
+ if CurStep = ssPostInstall then
209
+ begin
210
+ // Install CodeBakers via npm
211
+ WizardForm.StatusLabel.Caption := 'Installing CodeBakers...';
212
+ Exec('npm', 'install -g codebakers@latest', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
213
+ end;
214
+ end;
215
+
216
+ // Open selected editor after install
217
+ procedure CurPageChanged(CurPageID: Integer);
218
+ var
219
+ ResultCode: Integer;
220
+ EditorCmd: String;
221
+ begin
222
+ if CurPageID = wpFinished then
223
+ begin
224
+ // Determine which editor to open
225
+ case SelectedEditor of
226
+ 0: EditorCmd := 'cursor';
227
+ 1: EditorCmd := 'code';
228
+ 2: EditorCmd := 'windsurf';
229
+ 3: EditorCmd := 'wt';
230
+ 4: EditorCmd := 'powershell';
231
+ else
232
+ EditorCmd := '';
233
+ end;
234
+
235
+ // Open the editor in the project folder
236
+ if EditorCmd <> '' then
237
+ begin
238
+ if EditorCmd = 'wt' then
239
+ Exec('wt', '-d "' + ProjectFolder + '" cmd /k codebakers', '', SW_SHOW, ewNoWait, ResultCode)
240
+ else if EditorCmd = 'powershell' then
241
+ Exec('powershell', '-NoExit -Command "cd ''' + ProjectFolder + '''; codebakers"', '', SW_SHOW, ewNoWait, ResultCode)
242
+ else
243
+ Exec(EditorCmd, '"' + ProjectFolder + '"', '', SW_SHOW, ewNoWait, ResultCode);
244
+ end;
245
+ end;
246
+ end;
247
+
248
+ // Get installation summary
249
+ function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
250
+ begin
251
+ Result := 'Installation Summary:' + NewLine + NewLine;
252
+ Result := Result + Space + 'CodeBakers v{#MyAppVersion}' + NewLine;
253
+ Result := Result + Space + 'Project folder: ' + ProjectFolder + NewLine;
254
+ Result := Result + NewLine;
255
+ Result := Result + 'Click Install to begin.';
256
+ end;
@@ -0,0 +1,16 @@
1
+ ICON FILE PLACEHOLDER
2
+ ====================
3
+
4
+ Place your icon.ico file here.
5
+
6
+ Requirements:
7
+ - Format: ICO (Windows icon format)
8
+ - Recommended sizes: 16x16, 32x32, 48x48, 256x256
9
+ - You can create one at: https://convertio.co/png-ico/
10
+
11
+ To create from your logo:
12
+ 1. Get your logo as PNG (at least 256x256)
13
+ 2. Go to https://convertio.co/png-ico/
14
+ 3. Upload and convert
15
+ 4. Download and rename to icon.ico
16
+ 5. Place in this folder
@@ -0,0 +1,15 @@
1
+ @echo off
2
+ :: Post-install script for CodeBakers
3
+ :: This runs silently after the main installation
4
+
5
+ :: Install CodeBakers globally via npm
6
+ npm install -g codebakers@latest >nul 2>&1
7
+
8
+ :: Verify installation
9
+ codebakers --version >nul 2>&1
10
+ if %errorlevel% neq 0 (
11
+ :: Retry with different npm path
12
+ call npm install -g codebakers@latest >nul 2>&1
13
+ )
14
+
15
+ exit /b 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebakers",
3
- "version": "2.3.0",
3
+ "version": "2.3.5",
4
4
  "description": "AI dev team that follows the rules. Build apps from anywhere with pattern enforcement.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",