aela-ai 1.0.0 → 1.0.2

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 +10 -3
  2. package/dist/main.js +37 -4
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -19,19 +19,26 @@ Whether you need to analyze a Git repository, refactor an entire directory, or s
19
19
 
20
20
  ## 🚀 Installation
21
21
 
22
- You can install Aela globally on your system using npm:
22
+ Install Aela globally using npm:
23
23
 
24
24
  ```bash
25
- npm install -g .
25
+ npm install -g aela-ai
26
26
  ```
27
27
 
28
- *Note: You may need to run `npm run build` if the `dist/` directory is not already compiled.*
28
+ Or run directly without installing:
29
+
30
+ ```bash
31
+ npx aela-ai <your prompt>
32
+ ```
29
33
 
30
34
  ## 💻 Usage
31
35
 
32
36
  Simply type `aela` followed by your prompt for one-shot execution, or type `aela repl` to drop into a continuous chat session with persistent memory. No flags necessary.
33
37
 
34
38
  ```bash
39
+ # One-shot command
40
+ aela your prompt here
41
+
35
42
  # Start an interactive REPL session
36
43
  aela repl
37
44
 
package/dist/main.js CHANGED
@@ -172,11 +172,44 @@ async function main() {
172
172
  apiKey: apiKey,
173
173
  baseURL: baseURL,
174
174
  });
175
- const systemPrompt = `You are Aela, a helpful terminal-based AI assistant.
176
- The current date and time is: ${new Date().toLocaleString()}.
177
- You are running on: ${os.type()} ${os.release()} (${os.arch()}).
175
+ // --- Auto-detect environment & project context ---
176
+ const cwd = process.cwd();
177
+ const shell = process.env.SHELL || "unknown";
178
+ const username = os.userInfo().username;
179
+ const homeDir = os.homedir();
180
+ const nodeVersion = process.version;
181
+ const hasGit = fs.existsSync(path.join(cwd, ".git"));
182
+ const hasPackageJson = fs.existsSync(path.join(cwd, "package.json"));
183
+ const packageManager = fs.existsSync(path.join(cwd, "bun.lockb")) ? "bun"
184
+ : fs.existsSync(path.join(cwd, "yarn.lock")) ? "yarn"
185
+ : fs.existsSync(path.join(cwd, "pnpm-lock.yaml")) ? "pnpm"
186
+ : fs.existsSync(path.join(cwd, "package-lock.json")) ? "npm"
187
+ : null;
188
+ let gitBranch = "";
189
+ if (hasGit) {
190
+ try {
191
+ const { stdout } = await exec("git rev-parse --abbrev-ref HEAD");
192
+ gitBranch = stdout.trim();
193
+ }
194
+ catch { }
195
+ }
196
+ const systemPrompt = `You are Aela, an agentic terminal AI assistant.
197
+
198
+ Current working directory: ${cwd}
199
+ User: ${username}
200
+ Home directory: ${homeDir}
201
+ Shell: ${shell}
202
+ Operating system: ${os.type()} ${os.release()} (${os.arch()})
203
+ Node version: ${nodeVersion}
204
+ Current date: ${new Date().toLocaleString()}
205
+ ${hasGit ? `Git branch: ${gitBranch}` : "Not a git repository"}
206
+ ${hasPackageJson && packageManager ? `Package manager: ${packageManager}` : ""}
207
+
208
+ When the user asks about "this codebase", "this project", or "here", they mean the current working directory above. Use the Read and Bash tools to explore it.
178
209
  Use your tools to help the user. If they ask about current time or dates, you can use the time provided above.
179
- IMPORTANT: If you need to ask the user a clarifying question or request permission, you MUST use the "AskUser" tool. Do not just output the question as text, because the program will exit immediately and you will not get an answer.`;
210
+ IMPORTANT: If you need to ask the user a clarifying question or request permission, you MUST use the "AskUser" tool. Do not just output the question as text, because the program will exit immediately and you will not get an answer.
211
+ SAFETY: Before any destructive operation (deleting files, force-pushing, overwriting existing files), you MUST use AskUser to confirm with the user first.
212
+ When reading large files or command outputs, summarize or truncate to keep responses concise.`;
180
213
  const messages = [
181
214
  { role: "system", content: systemPrompt },
182
215
  { role: "user", content: prompt }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aela-ai",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "An agentic, terminal-based AI assistant with file access, web search, and persistent REPL mode.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/ABHIGYAN-MOHANTA/aela.git"
9
+ "url": "git+https://github.com/ABHIGYAN-MOHANTA/aela.git"
10
10
  },
11
11
  "keywords": [
12
12
  "cli",
@@ -23,7 +23,7 @@
23
23
  "README.md"
24
24
  ],
25
25
  "bin": {
26
- "aela": "./dist/main.js"
26
+ "aela": "dist/main.js"
27
27
  },
28
28
  "scripts": {
29
29
  "dev": "bun run app/main.ts",
@@ -38,4 +38,4 @@
38
38
  "@types/node": "latest",
39
39
  "typescript": "latest"
40
40
  }
41
- }
41
+ }