@nexus-cortex/cli 4.37.5 → 4.37.6
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/bin/cortex.js +10 -0
- package/package.json +1 -1
package/bin/cortex.js
CHANGED
|
@@ -162,6 +162,16 @@ hasFlag('--yolo'); // accepted but redundant — agent a
|
|
|
162
162
|
const messageTimeoutMs = timeoutFlag ? parseInt(timeoutFlag, 10) : 600000; // 10 min default for messages
|
|
163
163
|
let prompt = args.join(' ').trim();
|
|
164
164
|
|
|
165
|
+
// `cortex init` — generate the project CORTEX.md context file (headless parity with the TUI's
|
|
166
|
+
// /init slash command). Expands to a generation request; the model runs the init_cortex_context
|
|
167
|
+
// tool, which scans the project and writes .cortex/CORTEX.md (auto-loaded as context thereafter).
|
|
168
|
+
if (prompt === 'init') {
|
|
169
|
+
prompt =
|
|
170
|
+
'Generate a CORTEX.md project-context file for this project using the init_cortex_context ' +
|
|
171
|
+
'tool. Scan the project structure, key files, dependencies, and npm scripts, and write ' +
|
|
172
|
+
'`.cortex/CORTEX.md`. It is auto-loaded as project context on future runs. Keep it concise.';
|
|
173
|
+
}
|
|
174
|
+
|
|
165
175
|
// Apply `cortex agent` autonomous defaults. Set BEFORE the server is auto-started so the
|
|
166
176
|
// spawned server inherits the cwd (project path) + YOLO env.
|
|
167
177
|
if (__agentMode) {
|