henergyqueai 0.9.2 → 0.9.4
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 +118 -109
- package/bin/henergyqueai.js +1 -1
- package/package.json +23 -4
- package/src/connexion.js +14 -7
package/README.md
CHANGED
|
@@ -1,140 +1,144 @@
|
|
|
1
1
|
# henergyqueai
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The [HenergyqueAI](https://henergyqueai.fr) coding assistant in your terminal. It reads your project, suggests changes and runs commands, always within the permission mode you choose. Requires Node.js 22 or later.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The assistant answers in your language. Its commands, options and settings use French names (`/aide`, `--modele`, `demander`…): this page lists them all with their meaning.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
10
|
npm install -g henergyqueai
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Sign in
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
Nothing to set up. Just run it:
|
|
14
16
|
|
|
15
17
|
```bash
|
|
16
18
|
henergyqueai
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Your browser opens, you click **Autoriser** (Authorize), and you're done. No key to copy or paste. You need a free account on [henergyqueai.fr](https://henergyqueai.fr).
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
The first time you run it in a folder, it asks whether you trust that folder. Answer, and the screen clears to make room for the session.
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
During a session, the interface fills the terminal: the butterfly stays at the top, the answer builds up in the middle and your input stays visible at the bottom. Press **Enter on an empty line**, **↑** in an empty field or **Ctrl+K** to open the actions menu. Type in the menu to filter, then use **↑↓**, **Enter** and **Esc** to pick or go back. **Shift+Enter** adds a new line to your message; **Page Up/Down** scrolls through the history. While an answer is streaming, **Esc** stops it.
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
The **Joindre un fichier** (Attach a file) menu inserts a reference. A reference such as `@src/app.js` (or `@{project notes.md}` for a name with spaces) attaches an excerpt of the file to your request, up to five files of 20,000 characters each. A reference to an image (`@mockup.png`) sends it as an image. References pointing outside the project are ignored.
|
|
26
28
|
|
|
27
|
-
|
|
|
28
|
-
| ------------------ |
|
|
29
|
-
|
|
|
30
|
-
| **Ctrl+O** |
|
|
31
|
-
| **Ctrl+R** |
|
|
32
|
-
| **Alt+V / Ctrl+V** |
|
|
33
|
-
| **
|
|
34
|
-
| `#
|
|
35
|
-
| `!
|
|
29
|
+
| Shortcut | What it does |
|
|
30
|
+
| ------------------ | ------------------------------------------------------------------- |
|
|
31
|
+
| **Esc Esc** | Go back to an earlier request (conversation, code, or both) |
|
|
32
|
+
| **Ctrl+O** | Detailed view: full tool results |
|
|
33
|
+
| **Ctrl+R** | Search your request history |
|
|
34
|
+
| **Alt+V / Ctrl+V** | Paste a screenshot from the clipboard |
|
|
35
|
+
| **Shift+Tab** | Switch mode (ask, accept edits, plan) |
|
|
36
|
+
| `# instruction` | Adds the instruction to `HENERGYQUEAI.md` for future sessions |
|
|
37
|
+
| `!command` | Runs a command in the project's terminal |
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
An answer that takes more than 30 seconds rings the terminal bell when it finishes or needs your approval. When less than 30% of the context is left, the footer says so: `/compact` frees it up.
|
|
38
40
|
|
|
39
|
-
##
|
|
41
|
+
## Use
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
|
-
henergyqueai
|
|
43
|
-
henergyqueai "
|
|
44
|
-
cat
|
|
45
|
-
henergyqueai -c
|
|
44
|
+
henergyqueai start a session
|
|
45
|
+
henergyqueai "fix the date bug in invoice.js"
|
|
46
|
+
cat error.log | henergyqueai "where does this error come from?"
|
|
47
|
+
henergyqueai -c resume this folder's conversation
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
It only has access to the folder you started it from.
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
The assistant can find files by pattern (`src/**/*.js`), read and search text, propose a targeted edit with a preview, show the Git status or diff, and run your tests. Writes and commands follow the mode and permission rules you chose. To give it project-specific instructions, create `HENERGYQUEAI.md`, `AGENTS.md` or `.henergyqueai/instructions.md` at the project root.
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
It can also search the web and read a page (20 searches a day on the free plan, 80 with a subscription), ask you a multiple-choice question when a request is ambiguous, run a long command in the background (dev server, tests in watch mode) and read its output, and hand independent research to read-only sub-agents that work in parallel. Each sub-agent step counts as one request. In plan mode, it presents its finished plan: you accept it (with or without approving each change) or send it back to work.
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
It can track long tasks in a persistent, per-project list. The **Tâches** (Tasks) menu lets you review and complete steps; `/tache ajouter <title>` adds one. Local skills can live in `.henergyqueai/skills/<name>/SKILL.md` or `~/.henergyqueai/skills/<name>/SKILL.md`. The assistant can read them and they appear in the **Compétences** (Skills) menu; scripts are never run automatically.
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
Local MCP servers can be declared in `~/.henergyqueai/mcp.json`. The CLI connects them at startup and asks for approval before each tool call, unless the mode or a rule already allows it. Example:
|
|
57
59
|
|
|
58
60
|
```json
|
|
59
61
|
{
|
|
60
62
|
"servers": {
|
|
61
|
-
"
|
|
63
|
+
"my-tool": {
|
|
62
64
|
"command": "node",
|
|
63
|
-
"args": ["/
|
|
64
|
-
"env": { "ACCESS_TOKEN": "${
|
|
65
|
+
"args": ["/path/to/mcp-server.js"],
|
|
66
|
+
"env": { "ACCESS_TOKEN": "${MY_LOCAL_TOKEN}" }
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
```
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
The token stays in your local environment variable. The **Outils MCP** (MCP tools) menu shows connections and their errors. A rule such as `Mcp(my_tool_*)` can allow a trusted server's tools; a deny rule always wins.
|
|
71
73
|
|
|
72
74
|
## Options
|
|
73
75
|
|
|
74
|
-
| Option |
|
|
75
|
-
| -------------------------------- |
|
|
76
|
-
| `--modele <aelyr\|oryne\|velys>` |
|
|
77
|
-
| `--mode <mode>` |
|
|
78
|
-
| `--continuer`, `-c` |
|
|
79
|
-
| `--direct`, `-p` |
|
|
80
|
-
| `--lecture-seule` |
|
|
81
|
-
| `--oui` |
|
|
76
|
+
| Option | What it does |
|
|
77
|
+
| -------------------------------- | -------------------------------------- |
|
|
78
|
+
| `--modele <aelyr\|oryne\|velys>` | Picks the assistant |
|
|
79
|
+
| `--mode <mode>` | See the modes below |
|
|
80
|
+
| `--continuer`, `-c` | Resumes this folder's conversation |
|
|
81
|
+
| `--direct`, `-p` | Answers without saving anything |
|
|
82
|
+
| `--lecture-seule` | Shortcut for `--mode lecture-seule` |
|
|
83
|
+
| `--oui` | Shortcut for `--mode sans-demander` |
|
|
84
|
+
|
|
85
|
+
The three assistants: **Velys** for everyday questions, **Oryne** for code, **Aelyr**, the most capable, for demanding projects (Envol and Horizon plans).
|
|
82
86
|
|
|
83
87
|
## Modes
|
|
84
88
|
|
|
85
|
-
| Mode |
|
|
86
|
-
| ------------------------ |
|
|
87
|
-
| `demander` |
|
|
88
|
-
| `accepter-modifications` |
|
|
89
|
-
| `lecture-seule` |
|
|
90
|
-
| `plan` |
|
|
91
|
-
| `sans-demander` |
|
|
92
|
-
|
|
93
|
-
##
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
|
98
|
-
| ------------------------------- |
|
|
99
|
-
| `/aide` |
|
|
100
|
-
| `/modele <aelyr\|oryne\|velys>` |
|
|
101
|
-
| `/mode <mode>` |
|
|
102
|
-
| `/statut` |
|
|
103
|
-
| `/contexte` |
|
|
104
|
-
| `/utilisation` |
|
|
105
|
-
| `/doctor` |
|
|
106
|
-
| `/theme` |
|
|
107
|
-
| `/taches` |
|
|
108
|
-
| `/tache ajouter <
|
|
109
|
-
| `/tache finir <id>` |
|
|
110
|
-
| `/competences` |
|
|
111
|
-
| `/competence <
|
|
112
|
-
| `/mcp` |
|
|
113
|
-
| `/git` |
|
|
114
|
-
| `/diff` |
|
|
115
|
-
| `/revue`, `/review` |
|
|
116
|
-
| `/compact` |
|
|
117
|
-
| `/fichiers` |
|
|
118
|
-
| `/sessions` |
|
|
119
|
-
| `/effacer` |
|
|
120
|
-
| `/plan` |
|
|
121
|
-
| `/init` |
|
|
122
|
-
| `/rembobiner`, `/rewind` |
|
|
123
|
-
| `/exporter [
|
|
124
|
-
| `/processus` |
|
|
125
|
-
| `/hooks` |
|
|
126
|
-
| `/quitter` |
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
##
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
|
135
|
-
| -------------------------------------- |
|
|
136
|
-
| `~/.henergyqueai/settings.json` |
|
|
137
|
-
| `<
|
|
89
|
+
| Mode | What it may do |
|
|
90
|
+
| ------------------------ | --------------------------------------------------- |
|
|
91
|
+
| `demander` | Asks before writing or running anything. Default. |
|
|
92
|
+
| `accepter-modifications` | Writes without asking, asks before commands |
|
|
93
|
+
| `lecture-seule` | Read-only: can neither write nor run |
|
|
94
|
+
| `plan` | Explores and proposes a plan without changing files |
|
|
95
|
+
| `sans-demander` | Never asks |
|
|
96
|
+
|
|
97
|
+
## In a session
|
|
98
|
+
|
|
99
|
+
The keyboard menu is the main way in. The commands below remain available as shortcuts and for non-interactive terminals.
|
|
100
|
+
|
|
101
|
+
| Command | What it does |
|
|
102
|
+
| ------------------------------- | ------------------------------------------------ |
|
|
103
|
+
| `/aide` | Opens the menu (help) |
|
|
104
|
+
| `/modele <aelyr\|oryne\|velys>` | Switches assistant |
|
|
105
|
+
| `/mode <mode>` | Changes what it may do |
|
|
106
|
+
| `/statut` | What is loaded: settings, rules, exchanges |
|
|
107
|
+
| `/contexte` | Estimated context usage and instructions |
|
|
108
|
+
| `/utilisation` | Plan and requests used today |
|
|
109
|
+
| `/doctor` | Local diagnostics and service connection |
|
|
110
|
+
| `/theme` | Picks the terminal colors |
|
|
111
|
+
| `/taches` | Opens the task list |
|
|
112
|
+
| `/tache ajouter <title>` | Adds a task |
|
|
113
|
+
| `/tache finir <id>` | Completes a task |
|
|
114
|
+
| `/competences` | Lists installed skills |
|
|
115
|
+
| `/competence <name>` | Shows a skill |
|
|
116
|
+
| `/mcp` | Shows connected external tools |
|
|
117
|
+
| `/git` | Git repository status |
|
|
118
|
+
| `/diff` | Git changes |
|
|
119
|
+
| `/revue`, `/review` | Reviews your changes without modifying anything |
|
|
120
|
+
| `/compact` | Summarizes the history to free up context |
|
|
121
|
+
| `/fichiers` | Lists the project's files |
|
|
122
|
+
| `/sessions` | Resumes a saved conversation |
|
|
123
|
+
| `/effacer` | Forgets the conversation |
|
|
124
|
+
| `/plan` | Enters or leaves plan mode |
|
|
125
|
+
| `/init` | Analyzes the project and prepares `HENERGYQUEAI.md` |
|
|
126
|
+
| `/rembobiner`, `/rewind` | Goes back to an earlier request |
|
|
127
|
+
| `/exporter [file]` | Copies the conversation as Markdown, or writes it |
|
|
128
|
+
| `/processus` | Background commands: output and stop |
|
|
129
|
+
| `/hooks` | Shows the loaded hooks |
|
|
130
|
+
| `/quitter` | Quits |
|
|
131
|
+
|
|
132
|
+
To switch accounts, quit the session and run `henergyqueai connexion`.
|
|
133
|
+
|
|
134
|
+
## Settings
|
|
135
|
+
|
|
136
|
+
Two files; the closest one wins:
|
|
137
|
+
|
|
138
|
+
| File | Scope |
|
|
139
|
+
| -------------------------------------- | ------------------ |
|
|
140
|
+
| `~/.henergyqueai/settings.json` | You, everywhere |
|
|
141
|
+
| `<project>/.henergyqueai/settings.json` | This project |
|
|
138
142
|
|
|
139
143
|
```json
|
|
140
144
|
{
|
|
@@ -147,40 +151,45 @@ Deux fichiers, le plus proche l’emporte :
|
|
|
147
151
|
}
|
|
148
152
|
```
|
|
149
153
|
|
|
150
|
-
|
|
154
|
+
`autoriser` lists allowed actions and `refuser` denied ones. A rule names a tool — `Lire` (read), `Ecrire` (write and targeted edit), `Executer` (run), `Lister` (list and find files), `Chercher` (search), `Git` or `Mcp` — with an optional pattern where `*` matches anything. **A deny rule always wins over an allow rule.**
|
|
151
155
|
|
|
152
|
-
|
|
156
|
+
An allowed rule skips the question. A denied rule stops the action before it happens.
|
|
153
157
|
|
|
154
158
|
### Hooks
|
|
155
159
|
|
|
156
|
-
|
|
160
|
+
Your own commands, run around the assistant's work, in the same settings files:
|
|
157
161
|
|
|
158
162
|
```json
|
|
159
163
|
{
|
|
160
164
|
"hooks": {
|
|
161
|
-
"avant_outil": [{ "outils": "executer", "commande": "node
|
|
165
|
+
"avant_outil": [{ "outils": "executer", "commande": "node check-command.js" }],
|
|
162
166
|
"apres_outil": [{ "outils": "ecrire_fichier|editer_fichier", "commande": "npx prettier --write \"$HENERGYQUEAI_FICHIER\"" }],
|
|
163
167
|
"fin": [{ "commande": "npm test --silent" }]
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
170
|
```
|
|
167
171
|
|
|
168
|
-
`outils`
|
|
172
|
+
`avant_outil` runs before a tool, `apres_outil` after it, and `fin` when the assistant finishes. `outils` is a regular expression on the tool name and `commande` is the command to run. Each command receives `HENERGYQUEAI_EVENEMENT` (event), `HENERGYQUEAI_OUTIL` (tool), `HENERGYQUEAI_FICHIER` (file), `HENERGYQUEAI_COMMANDE` (command) and the full details as JSON on its standard input. Exit code **2** blocks the tool (`avant_outil`), passes its error output back to the assistant (`apres_outil`) or sends it back to work (`fin`, at most twice). A project's hooks only run in a folder you have trusted.
|
|
173
|
+
|
|
174
|
+
Going back restores the files the assistant changed, not the effects of commands run in the terminal.
|
|
175
|
+
|
|
176
|
+
## Environment variables
|
|
169
177
|
|
|
170
|
-
|
|
178
|
+
| Variable | Purpose |
|
|
179
|
+
| ------------------ | --------------------------------------------------------------------------- |
|
|
180
|
+
| `HENERGYQUEAI_KEY` | Device sign-in token; takes priority over the one from `henergyqueai connexion` |
|
|
181
|
+
| `HENERGYQUEAI_URL` | Service address, for a private deployment |
|
|
182
|
+
| `NO_COLOR` | Turns colors off |
|
|
171
183
|
|
|
172
|
-
##
|
|
184
|
+
## Your access
|
|
173
185
|
|
|
174
|
-
|
|
175
|
-
| ------------------ | ------------------------------------------------------ |
|
|
176
|
-
| `HENERGYQUEAI_KEY` | Jeton de connexion d’un appareil, prioritaire sur celui de `henergyqueai connexion` |
|
|
177
|
-
| `HENERGYQUEAI_URL` | Adresse du service, pour un déploiement privé |
|
|
178
|
-
| `NO_COLOR` | Désactive les couleurs |
|
|
186
|
+
Each authorized terminal appears under your machine's name in **Paramètres → Appareils connectés** (Settings → Connected devices) on the website, with its last-used date. You can sign it out at any time without affecting your other machines. API keys from the developer platform are for your own applications, not for the terminal.
|
|
179
187
|
|
|
180
|
-
##
|
|
188
|
+
## Also available
|
|
181
189
|
|
|
182
|
-
|
|
190
|
+
- **VS Code**: the HenergyqueAI extension, `code --install-extension henergyqueai.henergyqueai`.
|
|
191
|
+
- **Your own apps**: the official libraries, `npm install henergyqueai-sdk` and `pip install henergyqueai`.
|
|
183
192
|
|
|
184
|
-
##
|
|
193
|
+
## License
|
|
185
194
|
|
|
186
|
-
|
|
195
|
+
Proprietary. © HenergyqueAI.
|
package/bin/henergyqueai.js
CHANGED
|
@@ -36,7 +36,7 @@ import { expandReferences } from "../src/references.js";
|
|
|
36
36
|
import { stopAll } from "../src/background.js";
|
|
37
37
|
import { loadHooks } from "../src/hooks.js";
|
|
38
38
|
|
|
39
|
-
const VERSION = "0.9.
|
|
39
|
+
const VERSION = "0.9.4";
|
|
40
40
|
// Le papillon, une ligne vide, le trait, l'aide et une ligne vide.
|
|
41
41
|
const HEADER_HEIGHT = LOGO_HEIGHT + 4;
|
|
42
42
|
const BODY_ROW = HEADER_HEIGHT + 1;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "henergyqueai",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.9.4",
|
|
4
|
+
"description": "HenergyqueAI coding assistant for your terminal: it reads your project, suggests edits and runs commands with your approval.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"henergyqueai": "bin/henergyqueai.js"
|
|
@@ -21,8 +21,27 @@
|
|
|
21
21
|
"keywords": [
|
|
22
22
|
"henergyqueai",
|
|
23
23
|
"cli",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"terminal",
|
|
25
|
+
"ai",
|
|
26
|
+
"ai-assistant",
|
|
27
|
+
"coding-assistant",
|
|
28
|
+
"ai-agent",
|
|
29
|
+
"agent",
|
|
30
|
+
"agentic",
|
|
31
|
+
"llm",
|
|
32
|
+
"code-generation",
|
|
33
|
+
"code-review",
|
|
34
|
+
"refactoring",
|
|
35
|
+
"developer-tools",
|
|
36
|
+
"devtools",
|
|
37
|
+
"pair-programming",
|
|
38
|
+
"automation",
|
|
39
|
+
"mcp",
|
|
40
|
+
"chat",
|
|
41
|
+
"french",
|
|
42
|
+
"francais",
|
|
43
|
+
"ia",
|
|
44
|
+
"assistant"
|
|
26
45
|
],
|
|
27
46
|
"homepage": "https://henergyqueai.fr",
|
|
28
47
|
"dependencies": {
|
package/src/connexion.js
CHANGED
|
@@ -3,15 +3,22 @@ import { createHash, randomBytes } from "node:crypto";
|
|
|
3
3
|
import { hostname } from "node:os";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
|
|
6
|
+
// On Windows the address must not go through cmd: it reads each « & » of the
|
|
7
|
+
// query string as a new command, so the browser got a truncated address and
|
|
8
|
+
// « code=… » launched VS Code.
|
|
9
|
+
export const browserCommand = (url, platform = process.platform) =>
|
|
10
|
+
platform === "win32"
|
|
11
|
+
? ["rundll32.exe", ["url.dll,FileProtocolHandler", url]]
|
|
12
|
+
: platform === "darwin"
|
|
13
|
+
? ["open", [url]]
|
|
14
|
+
: ["xdg-open", [url]];
|
|
15
|
+
|
|
6
16
|
const openBrowser = (url) => {
|
|
7
|
-
const [command, args] =
|
|
8
|
-
process.platform === "win32"
|
|
9
|
-
? ["cmd", ["/c", "start", "", url]]
|
|
10
|
-
: process.platform === "darwin"
|
|
11
|
-
? ["open", [url]]
|
|
12
|
-
: ["xdg-open", [url]];
|
|
17
|
+
const [command, args] = browserCommand(url);
|
|
13
18
|
try {
|
|
14
|
-
spawn(command, args, { detached: true, stdio: "ignore" })
|
|
19
|
+
const child = spawn(command, args, { detached: true, stdio: "ignore", windowsHide: true });
|
|
20
|
+
child.on("error", () => {});
|
|
21
|
+
child.unref();
|
|
15
22
|
return true;
|
|
16
23
|
} catch {
|
|
17
24
|
return false;
|