dodo-ai 0.1.0 → 0.1.3

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 (3) hide show
  1. package/README.md +69 -0
  2. package/bin/dodo.js +18 -20
  3. package/package.json +21 -2
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ <div align="center">
2
+ <h1>Dodo AI</h1>
3
+ <p><strong>The Developer-First AI Coding Agent</strong></p>
4
+ <p>Local-First • Sandboxed • Model-Agnostic</p>
5
+ <p>
6
+ <a href="https://github.com/ChamsBouzaiene/dodo">GitHub Repository</a> •
7
+ <a href="https://github.com/ChamsBouzaiene/dodo/issues">Report Issues</a>
8
+ </p>
9
+ </div>
10
+
11
+ ---
12
+
13
+ **Dodo** is an open-source, terminal-based AI coding environment designed for developers who want the power of an autonomous agent without giving up control or privacy.
14
+
15
+ This package installs the CLI wrapper that automatically downloads and runs the high-performance Go engine for your operating system.
16
+
17
+ ## 🚀 Quick Start
18
+
19
+ Install globally via npm:
20
+ ```bash
21
+ npm install -g dodo-ai
22
+ ```
23
+
24
+ Navigate to any project directory:
25
+ ```bash
26
+ cd my-project
27
+ dodo
28
+ ```
29
+
30
+ ## ✨ Key Features
31
+
32
+ - **🛡️ Sandboxed Execution**: All agent commands run in a secure, isolated Docker container (or controlled local environment).
33
+ - **🧠 Model Agnostic**: Bring your own LLM. Works with Claude 3.5 Sonnet, GPT-4o, Gemini, or local models via Ollama.
34
+ - **⚡ Fast & Native**: Core engine written in Go for speed, with a beautiful React-based terminal UI.
35
+ - **🔧 Developer First**: Full shell access, file editing, and project indexing capabilities.
36
+
37
+ ## 🎮 CLI Commands
38
+
39
+ Once inside Dodo, you have a powerful set of tools at your disposal:
40
+
41
+ | Command | Description |
42
+ |---------|-------------|
43
+ | `/conf` | **Setup Wizard**: Configure LLM provider, API keys, and sandbox settings. |
44
+ | `/index` | **Project Indexing**: Scan your codebase to give the agent full context. |
45
+ | `/tools` | **Tool Viewer**: See exactly what capabilities the agent has enabled. |
46
+ | `/mode` | **Switch Modes**: Toggle between Planner, Code, and Architect modes. |
47
+ | `/clear` | **Clear Context**: Start fresh without losing your session settings. |
48
+ | `/exit` | **Quit**: Safely shutdown the session. |
49
+
50
+ ## 📦 Supported Platforms
51
+
52
+ The installer automatically fetches the correct binary for:
53
+ - **macOS** (Apple Silicon + Intel)
54
+ - **Linux** (AMD64 + ARM64)
55
+ - **Windows** (AMD64)
56
+
57
+ ## 🛠️ Troubleshooting
58
+
59
+ **"dodo: command not found"**
60
+ Ensure your npm global bin directory is in your PATH.
61
+ ```bash
62
+ export PATH=$PATH:$(npm config get prefix)/bin
63
+ ```
64
+
65
+ **"Permission denied"**
66
+ If you installed Node with root/sudo, you might need to fix npm permissions or run with sudo (not recommended).
67
+
68
+ ## 📄 License
69
+ MIT © [Chams Bouzaiene](https://github.com/ChamsBouzaiene)
package/bin/dodo.js CHANGED
@@ -1,10 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { spawn } = require('child_process');
4
- const path = require('path');
5
- const os = require('os');
6
- const fs = require('fs');
3
+ import { spawn } from 'child_process';
4
+ import path from 'path';
5
+ import os from 'os';
6
+ import fs from 'fs';
7
+ import { fileURLToPath } from 'url';
7
8
 
9
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
+
11
+ // 1. Ensure Engine is Installed
8
12
  function getBinaryPath() {
9
13
  const homeDir = os.homedir();
10
14
  const ext = os.platform() === 'win32' ? '.exe' : '';
@@ -15,23 +19,17 @@ const binaryPath = getBinaryPath();
15
19
 
16
20
  if (!fs.existsSync(binaryPath)) {
17
21
  console.error('dodo-engine not found. Running installer...');
18
- require('../scripts/install-engine.js');
19
- process.exit(0);
22
+ try {
23
+ const installScript = path.join(__dirname, '../scripts/install-engine.js');
24
+ const { execSync } = require('child_process');
25
+ execSync(`node "${installScript}"`, { stdio: 'inherit' });
26
+ } catch (e) {
27
+ // Ignore if failing, UI might handle it or just fail later
28
+ }
20
29
  }
21
30
 
22
- // Pass all arguments to the engine
23
- const args = process.argv.slice(2);
24
-
25
- const child = spawn(binaryPath, args, {
26
- stdio: 'inherit',
27
- env: process.env
28
- });
29
-
30
- child.on('error', (err) => {
31
- console.error(`Failed to start dodo-engine: ${err.message}`);
31
+ // 2. Start the UI (which is now compiled into ../dist/index.js)
32
+ import('../dist/index.js').catch(err => {
33
+ console.error('Failed to start Dodo UI:', err);
32
34
  process.exit(1);
33
35
  });
34
-
35
- child.on('close', (code) => {
36
- process.exit(code || 0);
37
- });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dodo-ai",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "An open-source AI coding agent built in Go",
5
5
  "author": "Chams Bouzaiene",
6
6
  "license": "MIT",
@@ -25,7 +25,26 @@
25
25
  "dodo": "./bin/dodo.js"
26
26
  },
27
27
  "scripts": {
28
- "postinstall": "node ./scripts/install-engine.js"
28
+ "postinstall": "node ./scripts/install-engine.js",
29
+ "build": "tsup src/index.tsx --format esm --out-dir dist",
30
+ "prepublishOnly": "npm run build"
31
+ },
32
+ "dependencies": {
33
+ "tar": "^6.2.0",
34
+ "adm-zip": "^0.5.10",
35
+ "ink": "4.4.1",
36
+ "ink-text-input": "5.0.1",
37
+ "marked": "^14.1.1",
38
+ "react": "18.3.1",
39
+ "react-hook-form": "^7.53.0",
40
+ "zod": "^3.23.8",
41
+ "@hookform/resolvers": "^3.9.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.0.0",
45
+ "@types/react": "^18.2.0",
46
+ "tsup": "^8.0.2",
47
+ "typescript": "^5.4.5"
29
48
  },
30
49
  "files": [
31
50
  "bin/",