@banaxi/banana-code 1.0.5 → 1.2.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/README.md CHANGED
@@ -41,14 +41,22 @@ Banana Code is a high-performance, terminal-based AI pair programmer. It combine
41
41
  #S#SSSSSS%%%?%%%%S
42
42
  ```
43
43
 
44
+ ## 🤔 Why Banana Code?
45
+ While tools like Cursor provide great GUI experiences, Banana Code is built for developers who live in the terminal and want maximum flexibility.
46
+ - **No Vendor Lock-in**: Switch instantly between the best proprietary models (Gemini, Claude, OpenAI) and high-performance open-source models (Ollama Local, Ollama Cloud) mid-conversation.
47
+ - **True Autonomy**: With Plan & Execute mode and Self-Healing Error Loops, Banana Code doesn't just suggest code; it tries, fails, reads the errors, and fixes its own mistakes automatically.
48
+ - **Terminal Native**: It brings the power of full workspace awareness, web search, and surgical file patching directly to your CLI without forcing you to change your IDE.
49
+
44
50
  ## ✨ Key Features
45
51
 
46
- - **Multi-Provider Support**: Switch between **Google Gemini**, **Anthropic Claude**, **OpenAI**, and **Ollama (Local)** effortlessly.
47
- - **Interactive TUI**: A beautiful, minimal terminal interface with real-time feedback and progress indicators.
52
+ - **Multi-Provider Support**: Switch between **Google Gemini**, **Anthropic Claude**, **OpenAI**, **Ollama Cloud**, and **Ollama (Local)** effortlessly.
53
+ - **Plan & Agent Modes**: Use `/agent` for instant execution, or `/plan` to make the AI draft a step-by-step implementation plan for your approval before it touches any code.
54
+ - **Self-Healing Loop**: If the AI runs a command (like running tests) and it fails, Banana Code automatically feeds the error trace back to the AI so it can fix its own code.
55
+ - **Agent Skills**: Teach your AI specialized workflows. Drop a `SKILL.md` file in your config folder, and the AI will automatically activate it when relevant.
56
+ - **Smart Context**: Use `@file/path.js` to instantly inject file contents into your prompt, or use `/settings` to auto-feed your entire workspace structure (respecting `.gitignore`).
57
+ - **Web Research**: Deep integration with DuckDuckGo APIs and Scrapers to give the AI real-time access to the internet.
48
58
  - **Persistent Sessions**: All chats are saved to `~/.config/banana-code/chats/`. Resume any session with a single command.
49
- - **Robust Tool System**: Banana Code can execute shell commands, read/write files, fetch URLs, and search your workspace.
50
- - **Security First**: A dedicated permission model ensures no tool is executed without your explicit approval.
51
- - **Keyless Playground**: Integration with OpenAI Codex for seamless, keyless access to GPT-4o and beyond.
59
+ - **Syntax Highlighting**: Beautiful, readable markdown output with syntax coloring directly in your terminal.
52
60
 
53
61
  ## 🚀 Installation
54
62
 
@@ -96,6 +104,28 @@ Banana Code can assist you by:
96
104
  - **`search_files`**: Performing regex searches across your project.
97
105
  - **`list_directory`**: Exploring folder structures.
98
106
 
107
+ ### 🧠 Agent Skills
108
+ Banana Code supports custom Agent Skills. Skills are like "onboarding guides" that teach the AI how to do specific tasks, use certain APIs, or follow your company's coding standards.
109
+
110
+ When the AI detects a task that matches a skill's description, it automatically activates the skill and loads its specialized instructions.
111
+
112
+ **How to create a Skill:**
113
+ 1. Create a folder in your config directory: `~/.config/banana-code/skills/my-react-skill/`
114
+ 2. Create a `SKILL.md` file inside that folder using this exact format:
115
+
116
+ ```markdown
117
+ ---
118
+ name: my-react-skill
119
+ description: Use this skill whenever you are asked to build or edit a React component.
120
+ ---
121
+
122
+ # React Guidelines
123
+ - Always use functional components.
124
+ - Always use Tailwind CSS for styling.
125
+ - Do not use default exports.
126
+ ```
127
+ 3. Type `/skills` in Banana Code to verify it loaded. The AI will now follow these rules automatically!
128
+
99
129
  ## 🔐 Privacy & Security
100
130
 
101
131
  Banana Code is built with transparency in mind:
package/package.json CHANGED
@@ -1,7 +1,19 @@
1
1
  {
2
2
  "name": "@banaxi/banana-code",
3
- "version": "1.0.5",
3
+ "version": "1.2.0",
4
4
  "description": "🍌 BananaCode",
5
+ "keywords": [
6
+ "banana",
7
+ "ai",
8
+ "cli",
9
+ "agent",
10
+ "coding-assistant",
11
+ "terminal",
12
+ "gemini",
13
+ "claude",
14
+ "openai",
15
+ "ollama"
16
+ ],
5
17
  "type": "module",
6
18
  "license": "GPL-3.0-or-later",
7
19
  "bin": {
@@ -21,6 +33,8 @@
21
33
  "chalk": "^5.4.1",
22
34
  "diff": "^8.0.4",
23
35
  "glob": "13.0.6",
36
+ "marked": "^15.0.12",
37
+ "marked-terminal": "^7.3.0",
24
38
  "open": "^11.0.0",
25
39
  "openai": "^4.79.1",
26
40
  "ora": "^8.1.1"
package/src/config.js CHANGED
@@ -6,7 +6,7 @@ import { execSync } from 'child_process';
6
6
  import fsSync from 'fs';
7
7
  import chalk from 'chalk';
8
8
 
9
- import { GEMINI_MODELS, CLAUDE_MODELS, OPENAI_MODELS, CODEX_MODELS } from './constants.js';
9
+ import { GEMINI_MODELS, CLAUDE_MODELS, OPENAI_MODELS, CODEX_MODELS, OLLAMA_CLOUD_MODELS } from './constants.js';
10
10
 
11
11
  const CONFIG_DIR = path.join(os.homedir(), '.config', 'banana-code');
12
12
  const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
@@ -44,7 +44,28 @@ export async function setupProvider(provider, config = {}) {
44
44
  message: 'Select a Gemini model:',
45
45
  choices: GEMINI_MODELS
46
46
  });
47
- } else if (provider === 'claude') {
47
+ } else if (provider === 'ollama_cloud') {
48
+ config.apiKey = await input({
49
+ message: 'Enter your OLLAMA_API_KEY (from ollama.com):',
50
+ default: config.apiKey
51
+ });
52
+
53
+ const choices = [...OLLAMA_CLOUD_MODELS, { name: chalk.magenta('✎ Enter custom model ID...'), value: 'CUSTOM_ID' }];
54
+ let selectedModel = await select({
55
+ message: 'Select an Ollama Cloud model:',
56
+ choices,
57
+ loop: false,
58
+ pageSize: Math.max(choices.length, 15)
59
+ });
60
+
61
+ if (selectedModel === 'CUSTOM_ID') {
62
+ selectedModel = await input({
63
+ message: 'Enter the exact model ID (e.g., gemma3:27b-cloud):',
64
+ validate: (v) => v.trim().length > 0 || 'Model ID cannot be empty'
65
+ });
66
+ }
67
+ config.model = selectedModel;
68
+ } else if (provider === 'claude') {
48
69
  config.apiKey = await input({
49
70
  message: 'Enter your ANTHROPIC_API_KEY:',
50
71
  default: config.apiKey
@@ -137,6 +158,7 @@ async function runSetupWizard() {
137
158
  { name: 'Google Gemini', value: 'gemini' },
138
159
  { name: 'Anthropic Claude', value: 'claude' },
139
160
  { name: 'OpenAI', value: 'openai' },
161
+ { name: 'Ollama Cloud', value: 'ollama_cloud' },
140
162
  { name: 'Ollama (Local)', value: 'ollama' }
141
163
  ]
142
164
  });
package/src/constants.js CHANGED
@@ -19,6 +19,17 @@ export const OPENAI_MODELS = [
19
19
  { name: 'GPT-5.3 Instant', value: 'gpt-5.3-instant' }
20
20
  ];
21
21
 
22
+ export const OLLAMA_CLOUD_MODELS = [
23
+ { name: 'Kimi K2 Thinking (Cloud)', value: 'kimi-k2-thinking:cloud' },
24
+ { name: 'Kimi K2.5 (Cloud)', value: 'kimi-k2.5:cloud' },
25
+ { name: 'Qwen 3.5 397B (Cloud)', value: 'qwen3.5:397b-cloud' },
26
+ { name: 'DeepSeek V3.2 (Cloud)', value: 'deepseek-v3.2:cloud' },
27
+ { name: 'GLM-5 (Cloud)', value: 'glm-5:cloud' },
28
+ { name: 'MiniMax M2.7 (Cloud)', value: 'minimax-m2.7:cloud' },
29
+ { name: 'Llama 3.3 70B (Cloud)', value: 'llama3.3:cloud' },
30
+ { name: 'Llama 3.1 405B (Cloud)', value: 'llama3.1:405b-cloud' }
31
+ ];
32
+
22
33
  export const CODEX_MODELS = [
23
34
  { name: 'GPT-5.4 (Newest)', value: 'gpt-5.4' },
24
35
  { name: 'GPT-5.3 Codex', value: 'gpt-5.3-codex' },