echo-ai-agent 1.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.
package/.env.example ADDED
@@ -0,0 +1 @@
1
+ GOOGLE_AI_API_KEY=your_gemini_api_key_here
package/CHANGELOG.md ADDED
@@ -0,0 +1,70 @@
1
+ # Changelog
2
+
3
+ All notable changes to Echo AI Agent will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-02-07
9
+
10
+ ### šŸŽ‰ Initial Release
11
+
12
+ #### Added
13
+ - ✨ Beautiful holographic UI with animated blobs and rings
14
+ - 🧠 Google Gemini 2.0 Flash Lite integration for AI-powered commands
15
+ - šŸŽ¤ Voice control using Web Speech API
16
+ - šŸ”Š Text-to-speech responses
17
+ - šŸŽØ 6 stunning themes (Cyan, Purple, Green, Gold, Red, Blue)
18
+ - šŸ’» Cross-platform support (Windows, macOS, Linux)
19
+ - āš™ļø Interactive setup wizard
20
+ - šŸ”§ Configuration management system
21
+ - āŒØļø Global hotkey support (Ctrl+Shift+E)
22
+ - šŸ“¦ npm package with CLI interface
23
+ - 🌐 Web search functionality
24
+ - šŸ“ File and folder management
25
+ - šŸ“ø Screenshot capability
26
+ - šŸ–„ļø System information queries
27
+ - ā° Time and date commands
28
+ - šŸ“‚ Directory listing
29
+ - šŸ”— URL opening in default browser
30
+
31
+ #### Features
32
+ - Transparent, always-on-top window
33
+ - Customizable window position (5 presets)
34
+ - Customizable window size (3 sizes)
35
+ - Real-time audio visualization
36
+ - Persistent configuration storage
37
+ - Post-install welcome message
38
+ - Comprehensive CLI commands
39
+
40
+ #### Documentation
41
+ - Professional README with badges
42
+ - MIT License
43
+ - Setup guide
44
+ - Command examples
45
+ - Configuration documentation
46
+
47
+ ---
48
+
49
+ ## [Unreleased]
50
+
51
+ ### Planned Features
52
+ - [ ] Plugin system for custom commands
53
+ - [ ] Cloud sync for settings
54
+ - [ ] Multi-language support
55
+ - [ ] Custom wake word detection
56
+ - [ ] Advanced automation workflows
57
+ - [ ] Mobile companion app
58
+ - [ ] Integration with smart home devices
59
+ - [ ] Voice training for better recognition
60
+
61
+ ---
62
+
63
+ ## Version History
64
+
65
+ ### Version 1.0.0 - Initial Release
66
+ The first public release of Echo AI Agent, featuring a complete JARVIS-inspired desktop assistant with voice control, AI intelligence, and beautiful UI.
67
+
68
+ ---
69
+
70
+ [1.0.0]: https://github.com/MuhammadUsmanGM/Echo/releases/tag/v1.0.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Muhammad Usman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,336 @@
1
+ <div align="center">
2
+
3
+ # šŸ¤– Echo AI Agent
4
+
5
+ ### *Your Personal JARVIS-Inspired Desktop Assistant*
6
+
7
+ [![npm version](https://img.shields.io/npm/v/echo-ai-agent.svg?style=flat-square)](https://www.npmjs.com/package/echo-ai-agent)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)
9
+ [![Node Version](https://img.shields.io/node/v/echo-ai-agent.svg?style=flat-square)](https://nodejs.org)
10
+ [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=flat-square)](https://github.com/MuhammadUsmanGM/Echo)
11
+
12
+ **Voice-controlled • AI-powered • Beautiful • Cross-platform**
13
+
14
+ [Features](#-features) • [Installation](#-installation) • [Usage](#-usage) • [Themes](#-themes) • [Commands](#-commands) • [Contributing](#-contributing)
15
+
16
+ </div>
17
+
18
+ ---
19
+
20
+ ## ✨ Features
21
+
22
+ ### šŸŽØ **Premium Holographic UI**
23
+ - Stunning animated holographic core with liquid morphing effects
24
+ - Multiple beautiful themes (Cyan, Purple, Green, Gold, Red, Blue)
25
+ - Transparent, always-on-top window that doesn't interrupt your workflow
26
+ - Smooth CSS3 animations for a premium feel
27
+
28
+ ### 🧠 **AI-Powered Intelligence**
29
+ - Powered by **Google Gemini 2.0 Flash Lite** for advanced reasoning
30
+ - Natural language understanding for intuitive commands
31
+ - Context-aware responses with JARVIS-like personality
32
+ - Function calling for seamless system integration
33
+
34
+ ### šŸŽ¤ **Voice & Text Control**
35
+ - Hands-free voice commands using Web Speech API
36
+ - Text-to-speech responses with customizable voices
37
+ - Real-time audio visualization that reacts to your voice
38
+ - Automatic wake-up on voice detection
39
+
40
+ ### šŸ’» **Cross-Platform System Control**
41
+ - **Windows**, **macOS**, and **Linux** support
42
+ - Open applications, search the web, manage files
43
+ - Take screenshots, get system info, check time/date
44
+ - Create folders, copy/delete files, and more
45
+
46
+ ### āš™ļø **Highly Customizable**
47
+ - 6 stunning pre-built themes
48
+ - Configurable window position and size
49
+ - Global hotkey support (default: `Ctrl+Shift+E`)
50
+ - Always-on-top toggle
51
+ - Persistent configuration storage
52
+
53
+ ### šŸ”Œ **Developer-Friendly**
54
+ - Clean, modular architecture
55
+ - Easy to extend with custom commands
56
+ - Plugin system ready
57
+ - Well-documented codebase
58
+
59
+ ---
60
+
61
+ ## šŸš€ Installation
62
+
63
+ ### Quick Install (Recommended)
64
+
65
+ ```bash
66
+ npm install -g echo-ai-agent
67
+ ```
68
+
69
+ ### From Source
70
+
71
+ ```bash
72
+ git clone https://github.com/MuhammadUsmanGM/Echo.git
73
+ cd Echo
74
+ npm install
75
+ ```
76
+
77
+ ---
78
+
79
+ ## šŸ“– Usage
80
+
81
+ ### First Time Setup
82
+
83
+ Run the interactive setup wizard:
84
+
85
+ ```bash
86
+ echo setup
87
+ ```
88
+
89
+ This will guide you through:
90
+ 1. Setting up your Google Gemini API key ([Get one free](https://aistudio.google.com/))
91
+ 2. Choosing your theme
92
+ 3. Configuring window position and size
93
+ 4. Setting preferences
94
+
95
+ ### Launch Echo
96
+
97
+ ```bash
98
+ echo start
99
+ ```
100
+
101
+ Or simply:
102
+
103
+ ```bash
104
+ echo
105
+ ```
106
+
107
+ ### CLI Commands
108
+
109
+ ```bash
110
+ echo start # Launch Echo AI Agent
111
+ echo setup # Run setup wizard
112
+ echo config --list # View current configuration
113
+ echo themes # List available themes
114
+ echo info # Display system information
115
+ echo --help # Show all commands
116
+ ```
117
+
118
+ ---
119
+
120
+ ## šŸŽØ Themes
121
+
122
+ Echo comes with 6 stunning themes:
123
+
124
+ | Theme | Color | Description |
125
+ |-------|-------|-------------|
126
+ | **Cyan** | ![#00f2ff](https://via.placeholder.com/15/00f2ff/000000?text=+) `#00f2ff` | Classic JARVIS (Default) |
127
+ | **Purple** | ![#a855f7](https://via.placeholder.com/15/a855f7/000000?text=+) `#a855f7` | Royal Purple |
128
+ | **Green** | ![#00ff88](https://via.placeholder.com/15/00ff88/000000?text=+) `#00ff88` | Matrix Green |
129
+ | **Gold** | ![#ffd700](https://via.placeholder.com/15/ffd700/000000?text=+) `#ffd700` | Iron Man Gold |
130
+ | **Red** | ![#ff0055](https://via.placeholder.com/15/ff0055/000000?text=+) `#ff0055` | Cyberpunk Red |
131
+ | **Blue** | ![#0088ff](https://via.placeholder.com/15/0088ff/000000?text=+) `#0088ff` | Ocean Blue |
132
+
133
+ **Change theme:**
134
+ ```bash
135
+ echo config --set theme purple
136
+ ```
137
+
138
+ ---
139
+
140
+ ## šŸŽÆ Commands
141
+
142
+ ### Voice Command Examples
143
+
144
+ - **"Open Chrome and search for the latest news"**
145
+ - **"Create a folder named Project-Echo on my desktop"**
146
+ - **"What's the current time?"**
147
+ - **"Take a screenshot"**
148
+ - **"Show me system information"**
149
+ - **"Open Spotify"**
150
+ - **"List files in my home directory"**
151
+
152
+ ### Supported Actions
153
+
154
+ | Action | Example Command |
155
+ |--------|----------------|
156
+ | 🌐 Web Search | "Search for AI news" |
157
+ | šŸ“ Create Folder | "Create a folder named MyProject" |
158
+ | šŸ“ø Screenshot | "Take a screenshot" |
159
+ | šŸ–„ļø System Info | "Show system information" |
160
+ | ā° Time/Date | "What time is it?" |
161
+ | šŸ“‚ List Files | "List files in Documents" |
162
+ | šŸš€ Open Apps | "Open VS Code" |
163
+ | šŸ”— Open URL | "Open github.com" |
164
+
165
+ ---
166
+
167
+ ## āš™ļø Configuration
168
+
169
+ ### Configuration File
170
+
171
+ Echo stores configuration in `~/.config/echo-ai-agent/config.json`
172
+
173
+ ### Available Settings
174
+
175
+ ```javascript
176
+ {
177
+ "theme": "cyan", // cyan, purple, green, gold, red, blue
178
+ "position": "bottom-right", // top-left, top-right, bottom-left, bottom-right, center
179
+ "size": "medium", // small, medium, large
180
+ "alwaysOnTop": true, // true, false
181
+ "hotkey": "CommandOrControl+Shift+E",
182
+ "apiKey": "your_api_key_here"
183
+ }
184
+ ```
185
+
186
+ ### Manage Configuration
187
+
188
+ ```bash
189
+ # View all settings
190
+ echo config --list
191
+
192
+ # Set a value
193
+ echo config --set theme purple
194
+ echo config --set position center
195
+ echo config --set size large
196
+
197
+ # Reset to defaults
198
+ echo config --reset
199
+ ```
200
+
201
+ ---
202
+
203
+ ## šŸ”‘ API Key Setup
204
+
205
+ Echo uses Google's Gemini AI for intelligent command processing.
206
+
207
+ 1. Visit [Google AI Studio](https://aistudio.google.com/)
208
+ 2. Create a free API key
209
+ 3. Run `echo setup` and enter your key
210
+ 4. Or manually set it: `echo config --set apiKey YOUR_KEY`
211
+
212
+ **Note:** The free tier includes generous limits perfect for personal use.
213
+
214
+ ---
215
+
216
+ ## šŸ› ļø Development
217
+
218
+ ### Project Structure
219
+
220
+ ```
221
+ Echo/
222
+ ā”œā”€ā”€ cli.js # CLI entry point
223
+ ā”œā”€ā”€ main/
224
+ │ ā”œā”€ā”€ main.js # Electron main process
225
+ │ └── preload.js # Preload script
226
+ ā”œā”€ā”€ services/
227
+ │ ā”œā”€ā”€ gemini.js # AI brain
228
+ │ └── system.js # System actions
229
+ ā”œā”€ā”€ scripts/
230
+ │ ā”œā”€ā”€ config-manager.js # Configuration management
231
+ │ ā”œā”€ā”€ setup-wizard.js # Interactive setup
232
+ │ └── postinstall.js # Post-install script
233
+ ā”œā”€ā”€ ui/
234
+ │ ā”œā”€ā”€ index.html # UI markup
235
+ │ ā”œā”€ā”€ style.css # Styles
236
+ │ └── renderer.js # Renderer process
237
+ └── package.json
238
+ ```
239
+
240
+ ### Run in Development Mode
241
+
242
+ ```bash
243
+ npm run dev
244
+ ```
245
+
246
+ ### Build from Source
247
+
248
+ ```bash
249
+ git clone https://github.com/MuhammadUsmanGM/Echo.git
250
+ cd Echo
251
+ npm install
252
+ npm start
253
+ ```
254
+
255
+ ---
256
+
257
+ ## 🌟 Why Echo?
258
+
259
+ | Feature | Echo | Other Assistants |
260
+ |---------|------|------------------|
261
+ | **Beautiful UI** | āœ… Holographic animations | āŒ CLI or basic UI |
262
+ | **Privacy** | āœ… Local-first, minimal cloud | āŒ Cloud-dependent |
263
+ | **Customizable** | āœ… Themes, positions, sizes | āŒ Fixed appearance |
264
+ | **Cross-Platform** | āœ… Windows, macOS, Linux | āš ļø Limited platforms |
265
+ | **Open Source** | āœ… MIT License | āŒ Proprietary |
266
+ | **Extensible** | āœ… Plugin-ready architecture | āŒ Closed system |
267
+ | **Free** | āœ… Completely free | āš ļø Paid or limited |
268
+
269
+ ---
270
+
271
+ ## šŸ¤ Contributing
272
+
273
+ Contributions are welcome! Here's how you can help:
274
+
275
+ 1. **Fork the repository**
276
+ 2. **Create a feature branch** (`git checkout -b feature/AmazingFeature`)
277
+ 3. **Commit your changes** (`git commit -m 'Add some AmazingFeature'`)
278
+ 4. **Push to the branch** (`git push origin feature/AmazingFeature`)
279
+ 5. **Open a Pull Request**
280
+
281
+ ### Ideas for Contributions
282
+
283
+ - šŸŽØ New themes
284
+ - šŸ”Œ Plugin system implementation
285
+ - šŸŒ Internationalization (i18n)
286
+ - šŸ“± Mobile companion app
287
+ - 🧪 Test coverage
288
+ - šŸ“š Documentation improvements
289
+
290
+ ---
291
+
292
+ ## šŸ“ License
293
+
294
+ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
295
+
296
+ ---
297
+
298
+ ## šŸ™ Acknowledgments
299
+
300
+ - **Google Gemini AI** for the intelligent brain
301
+ - **Electron** for cross-platform desktop support
302
+ - **Web Speech API** for voice recognition
303
+ - Inspired by **JARVIS** from Iron Man
304
+
305
+ ---
306
+
307
+ ## šŸ“ž Support
308
+
309
+ - šŸ› **Bug Reports:** [GitHub Issues](https://github.com/MuhammadUsmanGM/Echo/issues)
310
+ - šŸ’” **Feature Requests:** [GitHub Discussions](https://github.com/MuhammadUsmanGM/Echo/discussions)
311
+ - šŸ“§ **Contact:** [Your Email]
312
+
313
+ ---
314
+
315
+ ## šŸ—ŗļø Roadmap
316
+
317
+ - [ ] Plugin system for custom commands
318
+ - [ ] Cloud sync for settings
319
+ - [ ] Mobile companion app
320
+ - [ ] Multi-language support
321
+ - [ ] Custom wake word detection
322
+ - [ ] Integration with smart home devices
323
+ - [ ] Advanced automation workflows
324
+ - [ ] Voice training for better recognition
325
+
326
+ ---
327
+
328
+ <div align="center">
329
+
330
+ **Made with ā¤ļø by Muhammad Usman**
331
+
332
+ ⭐ Star this repo if you find it helpful!
333
+
334
+ [Report Bug](https://github.com/MuhammadUsmanGM/Echo/issues) • [Request Feature](https://github.com/MuhammadUsmanGM/Echo/issues) • [Documentation](https://github.com/MuhammadUsmanGM/Echo#readme)
335
+
336
+ </div>
package/cli.js ADDED
@@ -0,0 +1,170 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { program } = require('commander');
4
+ const chalk = require('chalk');
5
+ const path = require('path');
6
+ const { spawn } = require('child_process');
7
+ const fs = require('fs');
8
+
9
+ const packageJson = require('./package.json');
10
+ const setupWizard = require('./scripts/setup-wizard');
11
+ const ConfigManager = require('./scripts/config-manager');
12
+
13
+ const config = new ConfigManager();
14
+
15
+ // ASCII Art Banner
16
+ const banner = `
17
+ ${chalk.cyan('╔═══════════════════════════════════════╗')}
18
+ ${chalk.cyan('ā•‘')} ${chalk.bold.white('ECHO AI AGENT')} ${chalk.cyan('ā•‘')}
19
+ ${chalk.cyan('ā•‘')} ${chalk.gray('Your JARVIS-like Assistant')} ${chalk.cyan('ā•‘')}
20
+ ${chalk.cyan('ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•')}
21
+ `;
22
+
23
+ program
24
+ .name('echo')
25
+ .description('A premium JARVIS-inspired AI assistant for your desktop')
26
+ .version(packageJson.version);
27
+
28
+ program
29
+ .command('start')
30
+ .description('Launch Echo AI Agent')
31
+ .option('-d, --debug', 'Run in debug mode')
32
+ .action((options) => {
33
+ console.log(banner);
34
+
35
+ // Check if configured
36
+ if (!config.get('configured')) {
37
+ console.log(chalk.yellow('āš ļø Echo is not configured yet. Running setup wizard...\n'));
38
+ setupWizard.run().then(() => {
39
+ launchEcho(options.debug);
40
+ });
41
+ } else {
42
+ launchEcho(options.debug);
43
+ }
44
+ });
45
+
46
+ program
47
+ .command('setup')
48
+ .description('Run the interactive setup wizard')
49
+ .action(async () => {
50
+ console.log(banner);
51
+ await setupWizard.run();
52
+ });
53
+
54
+ program
55
+ .command('config')
56
+ .description('Manage Echo configuration')
57
+ .option('-l, --list', 'List all configuration')
58
+ .option('-s, --set <key> <value>', 'Set a configuration value')
59
+ .option('-g, --get <key>', 'Get a configuration value')
60
+ .option('-r, --reset', 'Reset to default configuration')
61
+ .action((options) => {
62
+ if (options.list) {
63
+ console.log(chalk.cyan('\nšŸ“‹ Current Configuration:\n'));
64
+ const allConfig = config.store;
65
+ Object.keys(allConfig).forEach(key => {
66
+ console.log(` ${chalk.bold(key)}: ${chalk.gray(JSON.stringify(allConfig[key]))}`);
67
+ });
68
+ } else if (options.set) {
69
+ const [key, value] = options.set;
70
+ config.set(key, value);
71
+ console.log(chalk.green(`āœ“ Set ${key} = ${value}`));
72
+ } else if (options.get) {
73
+ const value = config.get(options.get);
74
+ console.log(chalk.cyan(`${options.get}: ${value}`));
75
+ } else if (options.reset) {
76
+ config.clear();
77
+ console.log(chalk.green('āœ“ Configuration reset to defaults'));
78
+ } else {
79
+ console.log(chalk.yellow('Use --list, --set, --get, or --reset'));
80
+ }
81
+ });
82
+
83
+ program
84
+ .command('themes')
85
+ .description('List available themes')
86
+ .action(() => {
87
+ console.log(chalk.cyan('\nšŸŽØ Available Themes:\n'));
88
+ const themes = {
89
+ 'cyan': { color: '#00f2ff', description: 'Classic JARVIS (Default)' },
90
+ 'purple': { color: '#a855f7', description: 'Royal Purple' },
91
+ 'green': { color: '#00ff88', description: 'Matrix Green' },
92
+ 'gold': { color: '#ffd700', description: 'Iron Man Gold' },
93
+ 'red': { color: '#ff0055', description: 'Cyberpunk Red' },
94
+ 'blue': { color: '#0088ff', description: 'Ocean Blue' }
95
+ };
96
+
97
+ Object.keys(themes).forEach(name => {
98
+ const theme = themes[name];
99
+ console.log(` ${chalk.hex(theme.color)('ā—')} ${chalk.bold(name)} - ${chalk.gray(theme.description)}`);
100
+ });
101
+
102
+ console.log(chalk.gray('\nUse: echo config --set theme <name>'));
103
+ });
104
+
105
+ const { execSync } = require('child_process');
106
+
107
+ program
108
+ .command('info')
109
+ .description('Display system and Echo information')
110
+ .action(() => {
111
+ console.log(banner);
112
+ console.log(chalk.cyan('šŸ“Š System Information:\n'));
113
+ console.log(` ${chalk.bold('Version:')} ${packageJson.version}`);
114
+ console.log(` ${chalk.bold('Node:')} ${process.version}`);
115
+ console.log(` ${chalk.bold('Platform:')} ${process.platform}`);
116
+ console.log(` ${chalk.bold('Architecture:')} ${process.arch}`);
117
+ console.log(` ${chalk.bold('Configured:')} ${config.get('configured') ? chalk.green('Yes') : chalk.red('No')}`);
118
+ console.log(` ${chalk.bold('Theme:')} ${config.get('theme') || 'cyan'}`);
119
+ console.log(` ${chalk.bold('API Key Set:')} ${config.get('apiKey') ? chalk.green('Yes') : chalk.red('No')}`);
120
+
121
+ // Simple update check
122
+ try {
123
+ const latest = execSync(`npm view ${packageJson.name} version`, { encoding: 'utf8' }).trim();
124
+ if (latest && latest !== packageJson.version) {
125
+ console.log(chalk.yellow(`\nāš ļø Update available: ${latest} (Current: ${packageJson.version})`));
126
+ console.log(chalk.white(` Run `) + chalk.cyan(`npm install -g ${packageJson.name}`) + chalk.white(` to update.`));
127
+ } else {
128
+ console.log(chalk.green('\nāœ“ You are using the latest version.'));
129
+ }
130
+ } catch (e) {
131
+ // Ignore network errors during update check
132
+ }
133
+ });
134
+
135
+ // Default action (no command)
136
+ program.action(() => {
137
+ console.log(banner);
138
+ console.log(chalk.gray('Run ') + chalk.cyan('echo start') + chalk.gray(' to launch Echo'));
139
+ console.log(chalk.gray('Run ') + chalk.cyan('echo --help') + chalk.gray(' for more commands\n'));
140
+ });
141
+
142
+ program.parse(process.argv);
143
+
144
+ // If no arguments provided, show banner and help
145
+ if (!process.argv.slice(2).length) {
146
+ console.log(banner);
147
+ console.log(chalk.gray('Run ') + chalk.cyan('echo start') + chalk.gray(' to launch Echo'));
148
+ console.log(chalk.gray('Run ') + chalk.cyan('echo --help') + chalk.gray(' for more commands\n'));
149
+ }
150
+
151
+ function launchEcho(debug = false) {
152
+ console.log(chalk.cyan('šŸš€ Launching Echo...\n'));
153
+
154
+ const electronPath = require('electron');
155
+ const appPath = path.join(__dirname, 'main', 'main.js');
156
+
157
+ const args = [appPath];
158
+ if (debug) args.push('--inspect');
159
+
160
+ const child = spawn(electronPath, args, {
161
+ stdio: 'inherit',
162
+ env: { ...process.env }
163
+ });
164
+
165
+ child.on('close', (code) => {
166
+ if (code !== 0) {
167
+ console.log(chalk.red(`\nāŒ Echo exited with code ${code}`));
168
+ }
169
+ });
170
+ }