erosolar-cli 1.6.20 → 1.6.22

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/README.md CHANGED
@@ -46,155 +46,77 @@
46
46
 
47
47
  - **Multi-Provider Support** - Switch between OpenAI, Anthropic, Google, xAI, DeepSeek, or run locally with Ollama
48
48
  - **25+ Built-in Models** - From GPT-5 to Claude Opus to Gemini Pro to local Llama models
49
- - **Full Filesystem Access** - Read, write, edit files with surgical precision
50
- - **Safe Bash Execution** - Run shell commands with guardrails
51
- - **Advanced Code Search** - Find definitions, search patterns, analyze codebases
52
- - **Browser Automation** - Web scraping, testing, and interaction capabilities
53
- - **Cloud Deployment** - Deploy to Firebase, Vercel, Netlify, and other platforms
54
- - **Security Research** - Built-in penetration testing and vulnerability analysis
55
- - **Schema-Driven Architecture** - JSON schemas for agent profiles, rules, and tool definitions
56
- - **Alpha Zero Integration** - Competitive learning and self-improvement capabilities
57
- - **Enterprise-Ready** - Production-grade with comprehensive error handling and monitoring
49
+ - **Advanced Code Intelligence** - Full file system access, git operations, bash command execution
50
+ - **Browser Automation** - Web scraping, form filling, authentication, testing
51
+ - **Cloud Deployment** - Firebase, Vercel, Netlify, AWS, GCP, Azure support
52
+ - **Security Research** - Penetration testing, vulnerability scanning, threat intelligence
53
+ - **Testing Framework** - Unit tests, E2E tests, accessibility tests, performance audits
54
+ - **Email Automation** - SMTP email sending, batch campaigns, template personalization
58
55
 
59
56
  ---
60
57
 
61
- > Thank you to [Anthropic](https://www.anthropic.com/) for allowing me to use [Claude Code](https://www.claude.com/product/claude-code) to build erosolar-cli.
62
- >
63
- > Thank you to [OpenAI](https://openai.com) for allowing me to use [ChatGPT](https://chatgpt.com) initially, then [Codex CLI](https://developers.openai.com/codex/cli/).
64
- >
65
- > As for [Gemini CLI](https://docs.cloud.google.com/gemini/docs/codeassist/gemini-cli)... maybe one day it'll work well enough to deserve a thank you note.
66
-
67
- ![Gemini](https://erosolar-public-assets.s3.amazonaws.com/images/Gemini.png)
68
-
69
- ---
70
-
71
- ## What is Erosolar CLI?
72
-
73
- **Erosolar CLI** is a unified AI coding agent for the command line that works with **any major AI provider**. It's designed to be model-agnostic—you bring your own API keys, and erosolar-cli handles the rest: tool orchestration, file editing, code search, bash execution, and autonomous task completion.
74
-
75
- Think of it as a **universal interface** for AI-powered coding that doesn't lock you into a single provider.
76
-
77
- [![npm version](https://img.shields.io/npm/v/erosolar-cli.svg)](https://www.npmjs.com/package/erosolar-cli)
78
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
79
- [![Node.js Version](https://img.shields.io/node/v/erosolar-cli.svg)](https://nodejs.org)
80
-
81
- ---
82
-
83
- ## Quick Start
84
-
85
- ### Installation
58
+ ## Installation
86
59
 
87
60
  ```bash
88
61
  npm install -g erosolar-cli
89
62
  ```
90
63
 
91
- ### First Run
64
+ Or use npx:
92
65
 
93
66
  ```bash
94
- # Interactive mode
95
- erosolar
96
-
97
- # Headless mode (JSON API)
98
- erosolar --json
99
-
100
- # Specify provider and model
101
- erosolar --provider openai --model gpt-4
67
+ npx erosolar-cli
102
68
  ```
103
69
 
104
- ### Configuration
70
+ ---
105
71
 
106
- Set your API keys:
72
+ ## Quick Start
107
73
 
108
74
  ```bash
109
- # OpenAI
110
- export OPENAI_API_KEY="your-key"
111
-
112
- # Anthropic
113
- export ANTHROPIC_API_KEY="your-key"
114
-
115
- # Google
116
- export GOOGLE_API_KEY="your-key"
117
-
118
- # DeepSeek
119
- export DEEPSEEK_API_KEY="your-key"
120
- ```
75
+ # Basic usage
76
+ erosolar
121
77
 
122
- ---
78
+ # With specific provider and model
79
+ erosolar --provider openai --model gpt-4o
123
80
 
124
- ## Architecture
81
+ # With agent profile
82
+ erosolar --profile erosolar-code
125
83
 
84
+ # Resume last session
85
+ erosolar --restore
126
86
  ```
127
- erosolar-cli/
128
- ├── src/
129
- │ ├── core/ # Agent runtime, tool execution
130
- │ ├── providers/ # OpenAI, Anthropic, Google adapters
131
- │ ├── tools/ # File, bash, search tools
132
- │ ├── shell/ # Interactive CLI interface
133
- │ └── capabilities/ # Tool registration system
134
- ├── agents/
135
- │ ├── general.rules.json # General agent guardrails
136
- │ └── erosolar-code.rules.json # Coding specialist rules
137
- └── contracts/
138
- └── agent-schemas.json # Model & provider definitions
139
- ```
140
-
141
- ### Core Components
142
-
143
- - **Agent Runtime**: Manages tool execution and AI interactions
144
- - **Provider Adapters**: Handles different AI provider APIs
145
- - **Tool Registry**: 50+ built-in tools for various operations
146
- - **Rulebook System**: Enforces guardrails and behavior constraints
147
- - **Security Framework**: Advanced security testing and research capabilities
148
87
 
149
88
  ---
150
89
 
151
- ## Usage Examples
152
-
153
- ### Code Analysis
154
-
155
- ```bash
156
- # Analyze a codebase
157
- erosolar "analyze this project and identify potential improvements"
158
-
159
- # Search for specific patterns
160
- erosolar "find all API endpoints in the codebase"
90
+ ## Configuration
161
91
 
162
- # Generate tests
163
- erosolar "create unit tests for the authentication module"
164
- ```
165
-
166
- ### Security Research
92
+ Set your API keys as environment variables:
167
93
 
168
94
  ```bash
169
- # Run security analysis
170
- erosolar "perform penetration testing on this web application"
171
-
172
- # Vulnerability scanning
173
- erosolar "scan for security vulnerabilities in the dependencies"
95
+ # OpenAI
96
+ OPENAI_API_KEY=sk-...
174
97
 
175
- # Threat intelligence
176
- erosolar "analyze current threat landscape for this technology stack"
177
- ```
98
+ # Anthropic
99
+ ANTHROPIC_API_KEY=sk-ant-...
178
100
 
179
- ### Project Development
101
+ # Google AI
102
+ GOOGLE_API_KEY=...
180
103
 
181
- ```bash
182
- # Create new project
183
- erosolar "build a React app with authentication and database"
104
+ # xAI
105
+ XAI_API_KEY=...
184
106
 
185
- # Refactor code
186
- erosolar "refactor this component to use hooks and improve performance"
107
+ # DeepSeek
108
+ DEEPSEEK_API_KEY=...
187
109
 
188
- # Deploy application
189
- erosolar "deploy this app to Firebase hosting"
110
+ # Ollama (local)
111
+ OLLAMA_BASE_URL=http://localhost:11434
190
112
  ```
191
113
 
192
114
  ---
193
115
 
194
- ## CLI Options
116
+ ## Usage
195
117
 
196
118
  ```bash
197
- erosolar --help
119
+ erosolar [options]
198
120
 
199
121
  Options:
200
122
  --provider <name> AI provider (openai, anthropic, google, xai, deepseek, ollama)
@@ -246,4 +168,4 @@ MIT
246
168
 
247
169
  ## Author
248
170
 
249
- Built by **Bo Shang** with assistance from Claude Code, OpenAI Codex CLI, and a lot of caffeine.
171
+ Built by **Bo Shang** with assistance from Claude Code and OpenAI Codex CLI. A special thanks goes to Samantha Briasco-Stewart (erosolar) for motivating Bo to code.
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveShell.d.ts","sourceRoot":"","sources":["../../src/shell/interactiveShell.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAiCtE,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAI/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAQtF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAwBzD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,cAAc,CAAC;IAC7B,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,aAAa,EAAE,iBAAiB,CAAC;IACjC,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,cAAc,C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BAAkB;IA6EhC;;OAEG;IACH,OAAO,CAAC,aAAa;IAsBrB,OAAO,CAAC,wBAAwB;IAehC,OAAO,CAAC,yBAAyB;CAYlC"}
@@ -534,19 +534,57 @@ export class InteractiveShell {
534
534
  readline.emitKeypressEvents(inputStream, this.rl);
535
535
  }
536
536
  this.keypressHandler = (_str, key) => {
537
+ // Handle special keys BEFORE updating state
538
+ if (key) {
539
+ // History navigation with up/down arrows
540
+ if (key.name === 'up' && !key.ctrl && !key.meta && !key.shift) {
541
+ this.pinnedChatBox.handleHistoryUp();
542
+ // Update readline's line to match using write commands
543
+ const newInputUp = this.pinnedChatBox.getInput();
544
+ // Clear line and rewrite with new content
545
+ this.rl.write(null, { ctrl: true, name: 'u' }); // Clear to start
546
+ this.rl.write(null, { ctrl: true, name: 'k' }); // Clear to end
547
+ this.rl.write(newInputUp); // Write new content
548
+ return;
549
+ }
550
+ if (key.name === 'down' && !key.ctrl && !key.meta && !key.shift) {
551
+ this.pinnedChatBox.handleHistoryDown();
552
+ // Update readline's line to match using write commands
553
+ const newInputDown = this.pinnedChatBox.getInput();
554
+ // Clear line and rewrite with new content
555
+ this.rl.write(null, { ctrl: true, name: 'u' }); // Clear to start
556
+ this.rl.write(null, { ctrl: true, name: 'k' }); // Clear to end
557
+ this.rl.write(newInputDown); // Write new content
558
+ return;
559
+ }
560
+ // Ctrl+U - delete from cursor to start of line (readline handles this, we sync)
561
+ // Ctrl+K - delete from cursor to end of line (readline handles this, we sync)
562
+ // Ctrl+W - delete word before cursor (readline handles this, we sync)
563
+ // These are handled natively by readline, we just need to sync
564
+ // Alt+Left - move word left
565
+ if ((key.name === 'left' && key.meta) || (key.name === 'b' && key.meta)) {
566
+ this.pinnedChatBox.handleWordLeft();
567
+ }
568
+ // Alt+Right - move word right
569
+ if ((key.name === 'right' && key.meta) || (key.name === 'f' && key.meta)) {
570
+ this.pinnedChatBox.handleWordRight();
571
+ }
572
+ // Shift+Tab for profile switching
573
+ if (key.name === 'tab' && key.shift && this.agentMenu) {
574
+ this.showProfileSwitcher();
575
+ }
576
+ }
537
577
  // Update persistent prompt with current input
538
578
  const currentLine = this.rl.line || '';
539
579
  const cursorPos = this.rl.cursor || 0;
540
580
  this.persistentPrompt.updateInput(currentLine, cursorPos);
581
+ // Sync to pinned chat box for display
582
+ this.pinnedChatBox.setInput(currentLine);
541
583
  if (this.composableMessage.hasContent()) {
542
584
  this.composableMessage.setDraft(currentLine);
543
585
  this.updateComposeStatusSummary();
544
586
  }
545
587
  this.handleSlashCommandPreviewChange();
546
- // Handle Shift+Tab for profile switching
547
- if (key && key.name === 'tab' && key.shift && this.agentMenu) {
548
- this.showProfileSwitcher();
549
- }
550
588
  };
551
589
  inputStream.on('keypress', this.keypressHandler);
552
590
  }
@@ -774,39 +812,37 @@ export class InteractiveShell {
774
812
  capturePaste(content, lineCount) {
775
813
  this.resetBufferedInputLines();
776
814
  this.composableMessage.addPaste(content);
777
- // For multi-line pastes, show a collapsed block in chat history style
815
+ // For multi-line pastes, clear echoed lines
778
816
  if (lineCount > 1) {
779
- const maxWidth = Math.min(60, Math.max(30, (output.columns || 80) - 20));
780
- const preview = BracketedPasteManager.formatCollapsedBlock(content, maxWidth);
781
817
  // Clear remaining echoed lines from terminal
782
- // The line handler has been clearing lines as they come in,
783
- // but we need to ensure any remaining echoed content is cleared
784
- // and replaced with the collapsed block representation
785
818
  output.write('\r\x1b[K'); // Clear current line
786
- // Display the user's input as a collapsed block in chat history style
787
- const userPrompt = formatUserPrompt(this.profileLabel || this.profile);
788
- output.write(`${userPrompt}${preview}\n`);
789
819
  }
790
- // Build info message showing all accumulated paste blocks as chips
820
+ // Build the paste chips to show inline with prompt
791
821
  // Format: [Pasted text #1 +104 lines] [Pasted text #2 +50 lines]
792
822
  const pasteChips = this.composableMessage.formatPasteChips();
793
- display.showInfo(`${theme.success('Captured:')} ${theme.ui.muted(pasteChips)} paste more, type text, or press Enter to send (/cancel to discard)`);
794
- // Update status bar to show pending blocks
795
- this.updateComposeStatusSummary();
796
- // Reset the visible prompt to avoid stray paste artifacts
797
- this.persistentPrompt.updateInput('', 0);
798
- this.rl.prompt();
823
+ // Update status bar with instructions
824
+ this.persistentPrompt.updateStatusBar({
825
+ message: 'Paste more, type text, or press Enter to send (/cancel to discard)',
826
+ });
827
+ // Set the prompt to show paste chips, then position cursor after them
828
+ // The user can type additional text after the chips
829
+ this.persistentPrompt.updateInput(pasteChips + ' ', pasteChips.length + 1);
830
+ // Update readline's line buffer to include the chips as prefix
831
+ // This ensures typed text appears after the chips
832
+ if (this.rl.line !== undefined) {
833
+ this.rl.line = pasteChips + ' ';
834
+ this.rl.cursor = pasteChips.length + 1;
835
+ }
836
+ this.rl.prompt(true); // preserveCursor=true to keep position after chips
799
837
  }
800
838
  /**
801
839
  * Update the status bar to reflect any pending composed message parts
802
840
  */
803
841
  updateComposeStatusSummary() {
804
842
  if (this.composableMessage.hasContent()) {
805
- // Use chip format for multiple paste blocks: [Pasted text #1 +104 lines] [Pasted text #2 +50 lines]
806
- const pasteChips = this.composableMessage.formatPasteChips();
807
- const summary = pasteChips || this.composableMessage.formatSummary() || 'Captured paste';
843
+ // Chips are now shown inline in the prompt, status bar just shows instructions
808
844
  this.persistentPrompt.updateStatusBar({
809
- message: `${summary} press Enter to send`,
845
+ message: 'Press Enter to send, /cancel to discard',
810
846
  });
811
847
  }
812
848
  else {
@@ -822,6 +858,11 @@ export class InteractiveShell {
822
858
  const combined = this.bufferedInputLines.join('\n');
823
859
  this.bufferedInputLines = [];
824
860
  this.bufferedInputTimer = null;
861
+ // Add to command history for up/down navigation (only non-empty, non-whitespace)
862
+ const trimmed = combined.trim();
863
+ if (trimmed) {
864
+ this.pinnedChatBox.addToHistory(trimmed);
865
+ }
825
866
  try {
826
867
  await this.processInputBlock(combined, lineCount > 1);
827
868
  }
@@ -919,7 +960,14 @@ export class InteractiveShell {
919
960
  }
920
961
  // If we have captured multi-line paste blocks, respect control commands before assembling
921
962
  if (this.composableMessage.hasContent()) {
922
- const lower = trimmed.toLowerCase();
963
+ // Strip paste chip prefixes from input since actual content is in composableMessage
964
+ // Chips look like: [Pasted text #1 +X lines] [Pasted text #2 +Y lines]
965
+ const chipsPrefix = this.composableMessage.formatPasteChips();
966
+ let userText = trimmed;
967
+ if (chipsPrefix && trimmed.startsWith(chipsPrefix)) {
968
+ userText = trimmed.slice(chipsPrefix.length).trim();
969
+ }
970
+ const lower = userText.toLowerCase();
923
971
  // Control commands that should NOT consume the captured paste
924
972
  if (lower === '/cancel' || lower === 'cancel') {
925
973
  this.composableMessage.clear();
@@ -944,15 +992,15 @@ export class InteractiveShell {
944
992
  return;
945
993
  }
946
994
  // Slash commands operate independently of captured paste
947
- if (trimmed.startsWith('/')) {
948
- await this.processSlashCommand(trimmed);
995
+ if (userText.startsWith('/')) {
996
+ await this.processSlashCommand(userText);
949
997
  this.updateComposeStatusSummary();
950
998
  return;
951
999
  }
952
- // If trimmed is empty OR it's additional content, assemble and send
1000
+ // If userText is empty OR it's additional content, assemble and send
953
1001
  // Empty enter sends the captured paste; non-empty content is appended first
954
- if (trimmed) {
955
- this.composableMessage.setDraft(line);
1002
+ if (userText) {
1003
+ this.composableMessage.setDraft(userText);
956
1004
  this.composableMessage.commitDraft();
957
1005
  }
958
1006
  const assembled = this.composableMessage.assemble();
@@ -963,6 +1011,8 @@ export class InteractiveShell {
963
1011
  this.rl.prompt();
964
1012
  return;
965
1013
  }
1014
+ // Add assembled paste content to command history
1015
+ this.pinnedChatBox.addToHistory(assembled);
966
1016
  // Check if assembled content is a continuous command
967
1017
  if (this.isContinuousCommand(assembled)) {
968
1018
  await this.processContinuousRequest(assembled);
@@ -2211,8 +2261,9 @@ export class InteractiveShell {
2211
2261
  this.persistentPrompt.updateStatusBar({ message: '⏳ Processing... (type to queue follow-up)' });
2212
2262
  // Update pinned chat box to show processing state
2213
2263
  // Clear the input display since the request was already submitted
2264
+ // Note: Don't set statusMessage here - the isProcessing flag already shows "⏳ Processing..."
2214
2265
  this.pinnedChatBox.setProcessing(true);
2215
- this.pinnedChatBox.setStatusMessage('Working on your request...');
2266
+ this.pinnedChatBox.setStatusMessage(null); // Clear any previous status to avoid duplication
2216
2267
  this.pinnedChatBox.clearInput();
2217
2268
  this.uiAdapter.startProcessing('Working on your request');
2218
2269
  this.setProcessingStatus();
@@ -2692,8 +2743,7 @@ What's the next action?`;
2692
2743
  // Stop spinner and show the narrative text directly
2693
2744
  display.stopThinking();
2694
2745
  display.showNarrative(content.trim());
2695
- // Update pinned chat box status instead of spinner to avoid conflicts
2696
- this.pinnedChatBox.setStatusMessage('Working on your request...');
2746
+ // The isProcessing flag already shows "⏳ Processing..." - no need for duplicate status
2697
2747
  this.pinnedChatBox.forceRender();
2698
2748
  return;
2699
2749
  }