@adverant-nexus/cli 2.0.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/ARCHITECTURE.md +1366 -0
- package/LICENSE +21 -0
- package/README.md +593 -0
- package/completions/_nexus +452 -0
- package/completions/nexus.bash +329 -0
- package/completions/nexus.fish +187 -0
- package/dist/cli.d.ts +35 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +135 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/agent/index.d.ts +9 -0
- package/dist/commands/agent/index.d.ts.map +1 -0
- package/dist/commands/agent/index.js +20 -0
- package/dist/commands/agent/index.js.map +1 -0
- package/dist/commands/agent/list.d.ts +9 -0
- package/dist/commands/agent/list.d.ts.map +1 -0
- package/dist/commands/agent/list.js +122 -0
- package/dist/commands/agent/list.js.map +1 -0
- package/dist/commands/agent/run.d.ts +10 -0
- package/dist/commands/agent/run.d.ts.map +1 -0
- package/dist/commands/agent/run.js +167 -0
- package/dist/commands/agent/run.js.map +1 -0
- package/dist/commands/agent/status.d.ts +9 -0
- package/dist/commands/agent/status.d.ts.map +1 -0
- package/dist/commands/agent/status.js +157 -0
- package/dist/commands/agent/status.js.map +1 -0
- package/dist/commands/compute/agent.d.ts +21 -0
- package/dist/commands/compute/agent.d.ts.map +1 -0
- package/dist/commands/compute/agent.js +158 -0
- package/dist/commands/compute/agent.js.map +1 -0
- package/dist/commands/compute/index.d.ts +10 -0
- package/dist/commands/compute/index.d.ts.map +1 -0
- package/dist/commands/compute/index.js +27 -0
- package/dist/commands/compute/index.js.map +1 -0
- package/dist/commands/compute/lib/hardware-detection.d.ts +52 -0
- package/dist/commands/compute/lib/hardware-detection.d.ts.map +1 -0
- package/dist/commands/compute/lib/hardware-detection.js +432 -0
- package/dist/commands/compute/lib/hardware-detection.js.map +1 -0
- package/dist/commands/compute/lib/local-compute-agent.d.ts +143 -0
- package/dist/commands/compute/lib/local-compute-agent.d.ts.map +1 -0
- package/dist/commands/compute/lib/local-compute-agent.js +1162 -0
- package/dist/commands/compute/lib/local-compute-agent.js.map +1 -0
- package/dist/commands/compute/lib/local-compute-client.d.ts +89 -0
- package/dist/commands/compute/lib/local-compute-client.d.ts.map +1 -0
- package/dist/commands/compute/lib/local-compute-client.js +388 -0
- package/dist/commands/compute/lib/local-compute-client.js.map +1 -0
- package/dist/commands/compute/list.d.ts +14 -0
- package/dist/commands/compute/list.d.ts.map +1 -0
- package/dist/commands/compute/list.js +164 -0
- package/dist/commands/compute/list.js.map +1 -0
- package/dist/commands/compute/logs.d.ts +14 -0
- package/dist/commands/compute/logs.d.ts.map +1 -0
- package/dist/commands/compute/logs.js +105 -0
- package/dist/commands/compute/logs.js.map +1 -0
- package/dist/commands/compute/resources.d.ts +14 -0
- package/dist/commands/compute/resources.d.ts.map +1 -0
- package/dist/commands/compute/resources.js +163 -0
- package/dist/commands/compute/resources.js.map +1 -0
- package/dist/commands/compute/status.d.ts +13 -0
- package/dist/commands/compute/status.d.ts.map +1 -0
- package/dist/commands/compute/status.js +223 -0
- package/dist/commands/compute/status.js.map +1 -0
- package/dist/commands/compute/submit.d.ts +19 -0
- package/dist/commands/compute/submit.d.ts.map +1 -0
- package/dist/commands/compute/submit.js +99 -0
- package/dist/commands/compute/submit.js.map +1 -0
- package/dist/commands/deploy.d.ts +11 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +117 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/dynamic/graphrag-commands.d.ts +16 -0
- package/dist/commands/dynamic/graphrag-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/graphrag-commands.js +562 -0
- package/dist/commands/dynamic/graphrag-commands.js.map +1 -0
- package/dist/commands/dynamic/index.d.ts +10 -0
- package/dist/commands/dynamic/index.d.ts.map +1 -0
- package/dist/commands/dynamic/index.js +17 -0
- package/dist/commands/dynamic/index.js.map +1 -0
- package/dist/commands/dynamic/mageagent-commands.d.ts +8 -0
- package/dist/commands/dynamic/mageagent-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/mageagent-commands.js +86 -0
- package/dist/commands/dynamic/mageagent-commands.js.map +1 -0
- package/dist/commands/dynamic/mcp-tool-mapper.d.ts +97 -0
- package/dist/commands/dynamic/mcp-tool-mapper.d.ts.map +1 -0
- package/dist/commands/dynamic/mcp-tool-mapper.js +328 -0
- package/dist/commands/dynamic/mcp-tool-mapper.js.map +1 -0
- package/dist/commands/dynamic/nexus-commands.d.ts +78 -0
- package/dist/commands/dynamic/nexus-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/nexus-commands.js +426 -0
- package/dist/commands/dynamic/nexus-commands.js.map +1 -0
- package/dist/commands/dynamic/sandbox-commands.d.ts +8 -0
- package/dist/commands/dynamic/sandbox-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/sandbox-commands.js +80 -0
- package/dist/commands/dynamic/sandbox-commands.js.map +1 -0
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +128 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +10 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +81 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/login.d.ts +10 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +83 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logs.d.ts +11 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +79 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/nexus/index.d.ts +69 -0
- package/dist/commands/nexus/index.d.ts.map +1 -0
- package/dist/commands/nexus/index.js +336 -0
- package/dist/commands/nexus/index.js.map +1 -0
- package/dist/commands/plugin/disable.d.ts +8 -0
- package/dist/commands/plugin/disable.d.ts.map +1 -0
- package/dist/commands/plugin/disable.js +31 -0
- package/dist/commands/plugin/disable.js.map +1 -0
- package/dist/commands/plugin/enable.d.ts +8 -0
- package/dist/commands/plugin/enable.d.ts.map +1 -0
- package/dist/commands/plugin/enable.js +37 -0
- package/dist/commands/plugin/enable.js.map +1 -0
- package/dist/commands/plugin/index.d.ts +8 -0
- package/dist/commands/plugin/index.d.ts.map +1 -0
- package/dist/commands/plugin/index.js +23 -0
- package/dist/commands/plugin/index.js.map +1 -0
- package/dist/commands/plugin/info.d.ts +8 -0
- package/dist/commands/plugin/info.d.ts.map +1 -0
- package/dist/commands/plugin/info.js +129 -0
- package/dist/commands/plugin/info.js.map +1 -0
- package/dist/commands/plugin/init.d.ts +8 -0
- package/dist/commands/plugin/init.d.ts.map +1 -0
- package/dist/commands/plugin/init.js +83 -0
- package/dist/commands/plugin/init.js.map +1 -0
- package/dist/commands/plugin/install.d.ts +8 -0
- package/dist/commands/plugin/install.d.ts.map +1 -0
- package/dist/commands/plugin/install.js +56 -0
- package/dist/commands/plugin/install.js.map +1 -0
- package/dist/commands/plugin/list.d.ts +8 -0
- package/dist/commands/plugin/list.d.ts.map +1 -0
- package/dist/commands/plugin/list.js +72 -0
- package/dist/commands/plugin/list.js.map +1 -0
- package/dist/commands/plugin/uninstall.d.ts +8 -0
- package/dist/commands/plugin/uninstall.d.ts.map +1 -0
- package/dist/commands/plugin/uninstall.js +49 -0
- package/dist/commands/plugin/uninstall.js.map +1 -0
- package/dist/commands/register.d.ts +10 -0
- package/dist/commands/register.d.ts.map +1 -0
- package/dist/commands/register.js +85 -0
- package/dist/commands/register.js.map +1 -0
- package/dist/commands/services/health.d.ts +7 -0
- package/dist/commands/services/health.d.ts.map +1 -0
- package/dist/commands/services/health.js +73 -0
- package/dist/commands/services/health.js.map +1 -0
- package/dist/commands/services/index.d.ts +16 -0
- package/dist/commands/services/index.d.ts.map +1 -0
- package/dist/commands/services/index.js +26 -0
- package/dist/commands/services/index.js.map +1 -0
- package/dist/commands/services/info.d.ts +7 -0
- package/dist/commands/services/info.d.ts.map +1 -0
- package/dist/commands/services/info.js +68 -0
- package/dist/commands/services/info.js.map +1 -0
- package/dist/commands/services/list.d.ts +9 -0
- package/dist/commands/services/list.d.ts.map +1 -0
- package/dist/commands/services/list.js +43 -0
- package/dist/commands/services/list.js.map +1 -0
- package/dist/commands/services/logs.d.ts +7 -0
- package/dist/commands/services/logs.d.ts.map +1 -0
- package/dist/commands/services/logs.js +107 -0
- package/dist/commands/services/logs.js.map +1 -0
- package/dist/commands/services/ports.d.ts +7 -0
- package/dist/commands/services/ports.d.ts.map +1 -0
- package/dist/commands/services/ports.js +65 -0
- package/dist/commands/services/ports.js.map +1 -0
- package/dist/commands/services/restart.d.ts +7 -0
- package/dist/commands/services/restart.d.ts.map +1 -0
- package/dist/commands/services/restart.js +67 -0
- package/dist/commands/services/restart.js.map +1 -0
- package/dist/commands/services/start.d.ts +7 -0
- package/dist/commands/services/start.d.ts.map +1 -0
- package/dist/commands/services/start.js +67 -0
- package/dist/commands/services/start.js.map +1 -0
- package/dist/commands/services/status.d.ts +9 -0
- package/dist/commands/services/status.d.ts.map +1 -0
- package/dist/commands/services/status.js +119 -0
- package/dist/commands/services/status.js.map +1 -0
- package/dist/commands/services/stop.d.ts +7 -0
- package/dist/commands/services/stop.d.ts.map +1 -0
- package/dist/commands/services/stop.js +67 -0
- package/dist/commands/services/stop.js.map +1 -0
- package/dist/commands/session/delete.d.ts +9 -0
- package/dist/commands/session/delete.d.ts.map +1 -0
- package/dist/commands/session/delete.js +51 -0
- package/dist/commands/session/delete.js.map +1 -0
- package/dist/commands/session/export.d.ts +9 -0
- package/dist/commands/session/export.d.ts.map +1 -0
- package/dist/commands/session/export.js +36 -0
- package/dist/commands/session/export.js.map +1 -0
- package/dist/commands/session/import.d.ts +9 -0
- package/dist/commands/session/import.d.ts.map +1 -0
- package/dist/commands/session/import.js +54 -0
- package/dist/commands/session/import.js.map +1 -0
- package/dist/commands/session/index.d.ts +9 -0
- package/dist/commands/session/index.d.ts.map +1 -0
- package/dist/commands/session/index.js +28 -0
- package/dist/commands/session/index.js.map +1 -0
- package/dist/commands/session/list.d.ts +9 -0
- package/dist/commands/session/list.d.ts.map +1 -0
- package/dist/commands/session/list.js +88 -0
- package/dist/commands/session/list.js.map +1 -0
- package/dist/commands/session/load.d.ts +9 -0
- package/dist/commands/session/load.d.ts.map +1 -0
- package/dist/commands/session/load.js +71 -0
- package/dist/commands/session/load.js.map +1 -0
- package/dist/commands/session/resume.d.ts +9 -0
- package/dist/commands/session/resume.d.ts.map +1 -0
- package/dist/commands/session/resume.js +49 -0
- package/dist/commands/session/resume.js.map +1 -0
- package/dist/commands/session/save.d.ts +9 -0
- package/dist/commands/session/save.d.ts.map +1 -0
- package/dist/commands/session/save.js +69 -0
- package/dist/commands/session/save.js.map +1 -0
- package/dist/commands/workspace/git-commit.d.ts +9 -0
- package/dist/commands/workspace/git-commit.d.ts.map +1 -0
- package/dist/commands/workspace/git-commit.js +156 -0
- package/dist/commands/workspace/git-commit.js.map +1 -0
- package/dist/commands/workspace/git-status.d.ts +9 -0
- package/dist/commands/workspace/git-status.d.ts.map +1 -0
- package/dist/commands/workspace/git-status.js +192 -0
- package/dist/commands/workspace/git-status.js.map +1 -0
- package/dist/commands/workspace/index.d.ts +9 -0
- package/dist/commands/workspace/index.d.ts.map +1 -0
- package/dist/commands/workspace/index.js +24 -0
- package/dist/commands/workspace/index.js.map +1 -0
- package/dist/commands/workspace/info.d.ts +10 -0
- package/dist/commands/workspace/info.d.ts.map +1 -0
- package/dist/commands/workspace/info.js +191 -0
- package/dist/commands/workspace/info.js.map +1 -0
- package/dist/commands/workspace/init.d.ts +9 -0
- package/dist/commands/workspace/init.d.ts.map +1 -0
- package/dist/commands/workspace/init.js +193 -0
- package/dist/commands/workspace/init.js.map +1 -0
- package/dist/commands/workspace/validate.d.ts +9 -0
- package/dist/commands/workspace/validate.d.ts.map +1 -0
- package/dist/commands/workspace/validate.js +140 -0
- package/dist/commands/workspace/validate.js.map +1 -0
- package/dist/core/agent-client.d.ts +49 -0
- package/dist/core/agent-client.d.ts.map +1 -0
- package/dist/core/agent-client.js +289 -0
- package/dist/core/agent-client.js.map +1 -0
- package/dist/core/config/config-manager.d.ts +75 -0
- package/dist/core/config/config-manager.d.ts.map +1 -0
- package/dist/core/config/config-manager.js +379 -0
- package/dist/core/config/config-manager.js.map +1 -0
- package/dist/core/config/profile-manager.d.ts +76 -0
- package/dist/core/config/profile-manager.d.ts.map +1 -0
- package/dist/core/config/profile-manager.js +250 -0
- package/dist/core/config/profile-manager.js.map +1 -0
- package/dist/core/config/workspace-detector.d.ts +66 -0
- package/dist/core/config/workspace-detector.d.ts.map +1 -0
- package/dist/core/config/workspace-detector.js +291 -0
- package/dist/core/config/workspace-detector.js.map +1 -0
- package/dist/core/discovery/docker-parser.d.ts +27 -0
- package/dist/core/discovery/docker-parser.d.ts.map +1 -0
- package/dist/core/discovery/docker-parser.js +361 -0
- package/dist/core/discovery/docker-parser.js.map +1 -0
- package/dist/core/discovery/index.d.ts +11 -0
- package/dist/core/discovery/index.d.ts.map +1 -0
- package/dist/core/discovery/index.js +16 -0
- package/dist/core/discovery/index.js.map +1 -0
- package/dist/core/discovery/mcp-discovery.d.ts +41 -0
- package/dist/core/discovery/mcp-discovery.d.ts.map +1 -0
- package/dist/core/discovery/mcp-discovery.js +439 -0
- package/dist/core/discovery/mcp-discovery.js.map +1 -0
- package/dist/core/discovery/openapi-parser.d.ts +95 -0
- package/dist/core/discovery/openapi-parser.d.ts.map +1 -0
- package/dist/core/discovery/openapi-parser.js +353 -0
- package/dist/core/discovery/openapi-parser.js.map +1 -0
- package/dist/core/discovery/plugin-discovery.d.ts +63 -0
- package/dist/core/discovery/plugin-discovery.d.ts.map +1 -0
- package/dist/core/discovery/plugin-discovery.js +333 -0
- package/dist/core/discovery/plugin-discovery.js.map +1 -0
- package/dist/core/discovery/service-discovery.d.ts +107 -0
- package/dist/core/discovery/service-discovery.d.ts.map +1 -0
- package/dist/core/discovery/service-discovery.js +349 -0
- package/dist/core/discovery/service-discovery.js.map +1 -0
- package/dist/core/nexus-client.d.ts +119 -0
- package/dist/core/nexus-client.d.ts.map +1 -0
- package/dist/core/nexus-client.js +292 -0
- package/dist/core/nexus-client.js.map +1 -0
- package/dist/core/nexus-tool-executor.d.ts +102 -0
- package/dist/core/nexus-tool-executor.d.ts.map +1 -0
- package/dist/core/nexus-tool-executor.js +386 -0
- package/dist/core/nexus-tool-executor.js.map +1 -0
- package/dist/core/react-handler.d.ts +17 -0
- package/dist/core/react-handler.d.ts.map +1 -0
- package/dist/core/react-handler.js +296 -0
- package/dist/core/react-handler.js.map +1 -0
- package/dist/core/router/command-registry.d.ts +61 -0
- package/dist/core/router/command-registry.d.ts.map +1 -0
- package/dist/core/router/command-registry.js +138 -0
- package/dist/core/router/command-registry.js.map +1 -0
- package/dist/core/router/command-router.d.ts +33 -0
- package/dist/core/router/command-router.d.ts.map +1 -0
- package/dist/core/router/command-router.js +111 -0
- package/dist/core/router/command-router.js.map +1 -0
- package/dist/core/router/index.d.ts +9 -0
- package/dist/core/router/index.d.ts.map +1 -0
- package/dist/core/router/index.js +8 -0
- package/dist/core/router/index.js.map +1 -0
- package/dist/core/session/context-manager.d.ts +69 -0
- package/dist/core/session/context-manager.d.ts.map +1 -0
- package/dist/core/session/context-manager.js +109 -0
- package/dist/core/session/context-manager.js.map +1 -0
- package/dist/core/session/history-manager.d.ts +72 -0
- package/dist/core/session/history-manager.d.ts.map +1 -0
- package/dist/core/session/history-manager.js +175 -0
- package/dist/core/session/history-manager.js.map +1 -0
- package/dist/core/session/index.d.ts +9 -0
- package/dist/core/session/index.d.ts.map +1 -0
- package/dist/core/session/index.js +9 -0
- package/dist/core/session/index.js.map +1 -0
- package/dist/core/session/session-manager.d.ts +50 -0
- package/dist/core/session/session-manager.d.ts.map +1 -0
- package/dist/core/session/session-manager.js +200 -0
- package/dist/core/session/session-manager.js.map +1 -0
- package/dist/core/session/session-storage.d.ts +59 -0
- package/dist/core/session/session-storage.d.ts.map +1 -0
- package/dist/core/session/session-storage.js +226 -0
- package/dist/core/session/session-storage.js.map +1 -0
- package/dist/core/transport/http-client.d.ts +27 -0
- package/dist/core/transport/http-client.d.ts.map +1 -0
- package/dist/core/transport/http-client.js +182 -0
- package/dist/core/transport/http-client.js.map +1 -0
- package/dist/core/transport/index.d.ts +11 -0
- package/dist/core/transport/index.d.ts.map +1 -0
- package/dist/core/transport/index.js +10 -0
- package/dist/core/transport/index.js.map +1 -0
- package/dist/core/transport/mcp-client.d.ts +69 -0
- package/dist/core/transport/mcp-client.d.ts.map +1 -0
- package/dist/core/transport/mcp-client.js +252 -0
- package/dist/core/transport/mcp-client.js.map +1 -0
- package/dist/core/transport/stream-handler.d.ts +51 -0
- package/dist/core/transport/stream-handler.d.ts.map +1 -0
- package/dist/core/transport/stream-handler.js +264 -0
- package/dist/core/transport/stream-handler.js.map +1 -0
- package/dist/core/transport/websocket-client.d.ts +66 -0
- package/dist/core/transport/websocket-client.d.ts.map +1 -0
- package/dist/core/transport/websocket-client.js +232 -0
- package/dist/core/transport/websocket-client.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/output/formatters/index.d.ts +9 -0
- package/dist/output/formatters/index.d.ts.map +1 -0
- package/dist/output/formatters/index.js +9 -0
- package/dist/output/formatters/index.js.map +1 -0
- package/dist/output/formatters/json-formatter.d.ts +71 -0
- package/dist/output/formatters/json-formatter.d.ts.map +1 -0
- package/dist/output/formatters/json-formatter.js +236 -0
- package/dist/output/formatters/json-formatter.js.map +1 -0
- package/dist/output/formatters/stream-formatter.d.ts +107 -0
- package/dist/output/formatters/stream-formatter.d.ts.map +1 -0
- package/dist/output/formatters/stream-formatter.js +247 -0
- package/dist/output/formatters/stream-formatter.js.map +1 -0
- package/dist/output/formatters/table-formatter.d.ts +63 -0
- package/dist/output/formatters/table-formatter.d.ts.map +1 -0
- package/dist/output/formatters/table-formatter.js +294 -0
- package/dist/output/formatters/table-formatter.js.map +1 -0
- package/dist/output/formatters/text-formatter.d.ts +63 -0
- package/dist/output/formatters/text-formatter.d.ts.map +1 -0
- package/dist/output/formatters/text-formatter.js +202 -0
- package/dist/output/formatters/text-formatter.js.map +1 -0
- package/dist/output/formatters/yaml-formatter.d.ts +71 -0
- package/dist/output/formatters/yaml-formatter.d.ts.map +1 -0
- package/dist/output/formatters/yaml-formatter.js +239 -0
- package/dist/output/formatters/yaml-formatter.js.map +1 -0
- package/dist/output/index.d.ts +7 -0
- package/dist/output/index.d.ts.map +1 -0
- package/dist/output/index.js +7 -0
- package/dist/output/index.js.map +1 -0
- package/dist/output/output-manager.d.ts +156 -0
- package/dist/output/output-manager.d.ts.map +1 -0
- package/dist/output/output-manager.js +339 -0
- package/dist/output/output-manager.js.map +1 -0
- package/dist/output/renderers/index.d.ts +6 -0
- package/dist/output/renderers/index.d.ts.map +1 -0
- package/dist/output/renderers/index.js +6 -0
- package/dist/output/renderers/index.js.map +1 -0
- package/dist/output/renderers/progress-renderer.d.ts +56 -0
- package/dist/output/renderers/progress-renderer.d.ts.map +1 -0
- package/dist/output/renderers/progress-renderer.js +306 -0
- package/dist/output/renderers/progress-renderer.js.map +1 -0
- package/dist/output/renderers/terminal-renderer.d.ts +117 -0
- package/dist/output/renderers/terminal-renderer.d.ts.map +1 -0
- package/dist/output/renderers/terminal-renderer.js +294 -0
- package/dist/output/renderers/terminal-renderer.js.map +1 -0
- package/dist/plugins/index.d.ts +12 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +18 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/plugin-loader.d.ts +37 -0
- package/dist/plugins/plugin-loader.d.ts.map +1 -0
- package/dist/plugins/plugin-loader.js +155 -0
- package/dist/plugins/plugin-loader.js.map +1 -0
- package/dist/plugins/plugin-manager.d.ts +78 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -0
- package/dist/plugins/plugin-manager.js +310 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/plugins/plugin-sdk.d.ts +136 -0
- package/dist/plugins/plugin-sdk.d.ts.map +1 -0
- package/dist/plugins/plugin-sdk.js +260 -0
- package/dist/plugins/plugin-sdk.js.map +1 -0
- package/dist/plugins/plugin-storage.d.ts +109 -0
- package/dist/plugins/plugin-storage.d.ts.map +1 -0
- package/dist/plugins/plugin-storage.js +207 -0
- package/dist/plugins/plugin-storage.js.map +1 -0
- package/dist/plugins/plugin-validator.d.ts +44 -0
- package/dist/plugins/plugin-validator.d.ts.map +1 -0
- package/dist/plugins/plugin-validator.js +272 -0
- package/dist/plugins/plugin-validator.js.map +1 -0
- package/dist/plugins/template-generator.d.ts +35 -0
- package/dist/plugins/template-generator.d.ts.map +1 -0
- package/dist/plugins/template-generator.js +438 -0
- package/dist/plugins/template-generator.js.map +1 -0
- package/dist/repl/completer.d.ts +58 -0
- package/dist/repl/completer.d.ts.map +1 -0
- package/dist/repl/completer.js +198 -0
- package/dist/repl/completer.js.map +1 -0
- package/dist/repl/evaluator.d.ts +55 -0
- package/dist/repl/evaluator.d.ts.map +1 -0
- package/dist/repl/evaluator.js +299 -0
- package/dist/repl/evaluator.js.map +1 -0
- package/dist/repl/index.d.ts +10 -0
- package/dist/repl/index.d.ts.map +1 -0
- package/dist/repl/index.js +10 -0
- package/dist/repl/index.js.map +1 -0
- package/dist/repl/renderer.d.ts +77 -0
- package/dist/repl/renderer.d.ts.map +1 -0
- package/dist/repl/renderer.js +291 -0
- package/dist/repl/renderer.js.map +1 -0
- package/dist/repl/repl.d.ts +89 -0
- package/dist/repl/repl.d.ts.map +1 -0
- package/dist/repl/repl.js +339 -0
- package/dist/repl/repl.js.map +1 -0
- package/dist/templates/python.d.ts +15 -0
- package/dist/templates/python.d.ts.map +1 -0
- package/dist/templates/python.js +375 -0
- package/dist/templates/python.js.map +1 -0
- package/dist/templates/typescript.d.ts +15 -0
- package/dist/templates/typescript.d.ts.map +1 -0
- package/dist/templates/typescript.js +274 -0
- package/dist/templates/typescript.js.map +1 -0
- package/dist/types/agent.d.ts +109 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/agent.js +7 -0
- package/dist/types/agent.js.map +1 -0
- package/dist/types/api.d.ts +125 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +53 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/command.d.ts +101 -0
- package/dist/types/command.d.ts.map +1 -0
- package/dist/types/command.js +7 -0
- package/dist/types/command.js.map +1 -0
- package/dist/types/compute.d.ts +317 -0
- package/dist/types/compute.d.ts.map +1 -0
- package/dist/types/compute.js +19 -0
- package/dist/types/compute.js.map +1 -0
- package/dist/types/config.d.ts +71 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +7 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/errors.d.ts +56 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +64 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/nexus.d.ts +254 -0
- package/dist/types/nexus.d.ts.map +1 -0
- package/dist/types/nexus.js +7 -0
- package/dist/types/nexus.js.map +1 -0
- package/dist/types/output.d.ts +107 -0
- package/dist/types/output.d.ts.map +1 -0
- package/dist/types/output.js +7 -0
- package/dist/types/output.js.map +1 -0
- package/dist/types/plugin.d.ts +118 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +7 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/service.d.ts +94 -0
- package/dist/types/service.d.ts.map +1 -0
- package/dist/types/service.js +15 -0
- package/dist/types/service.js.map +1 -0
- package/dist/types/session.d.ts +80 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +7 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/transport.d.ts +96 -0
- package/dist/types/transport.d.ts.map +1 -0
- package/dist/types/transport.js +7 -0
- package/dist/types/transport.js.map +1 -0
- package/dist/utils/config.d.ts +47 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +166 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/error-handler.d.ts +82 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +238 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +61 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +200 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/prompt.d.ts +57 -0
- package/dist/utils/prompt.d.ts.map +1 -0
- package/dist/utils/prompt.js +141 -0
- package/dist/utils/prompt.js.map +1 -0
- package/dist/utils/spinner.d.ts +47 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +123 -0
- package/dist/utils/spinner.js.map +1 -0
- package/dist/utils/validation.d.ts +97 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +289 -0
- package/dist/utils/validation.js.map +1 -0
- package/docs/COMPLETIONS.md +528 -0
- package/docs/REPL.md +466 -0
- package/docs/graphrag-commands.md +387 -0
- package/package.json +154 -0
- package/scripts/install-completions.sh +356 -0
- package/scripts/prepublish.js +522 -0
- package/scripts/verify-package.js +505 -0
package/docs/REPL.md
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
# Nexus CLI - Interactive REPL Mode
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The Nexus CLI REPL (Read-Eval-Print Loop) provides an interactive shell for exploring and executing commands with rich features like tab completion, command history, and session management.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
### 1. Interactive Shell
|
|
10
|
+
- Read-eval-print loop with readline integration
|
|
11
|
+
- Persistent command history
|
|
12
|
+
- Tab completion for commands, options, and arguments
|
|
13
|
+
- Multi-line input support
|
|
14
|
+
- Error recovery (REPL doesn't crash on errors)
|
|
15
|
+
|
|
16
|
+
### 2. Namespace Support
|
|
17
|
+
- Switch between service namespaces using `use <namespace>`
|
|
18
|
+
- Namespace-aware prompt: `nexus:graphrag >`
|
|
19
|
+
- Execute commands in namespace context
|
|
20
|
+
- Global commands available from any namespace
|
|
21
|
+
|
|
22
|
+
### 3. Tab Completion
|
|
23
|
+
- Complete command names
|
|
24
|
+
- Complete namespace names
|
|
25
|
+
- Complete option flags (`--option`, `-o`)
|
|
26
|
+
- Complete file paths (for file/directory arguments)
|
|
27
|
+
- Context-aware completion based on current namespace
|
|
28
|
+
- Show help text for completions
|
|
29
|
+
|
|
30
|
+
### 4. Command History
|
|
31
|
+
- Persistent history saved to `~/.nexus/history`
|
|
32
|
+
- Up/down arrows for history navigation
|
|
33
|
+
- Reverse search with Ctrl+R
|
|
34
|
+
- History size limit: 1000 commands
|
|
35
|
+
- View history with `history` command
|
|
36
|
+
- Search history by query
|
|
37
|
+
|
|
38
|
+
### 5. Session Management
|
|
39
|
+
- Save current session: `save <name>`
|
|
40
|
+
- Load saved session: `load <name>`
|
|
41
|
+
- List all sessions: `sessions`
|
|
42
|
+
- Sessions stored in `~/.nexus/sessions/`
|
|
43
|
+
- Session includes:
|
|
44
|
+
- Command history
|
|
45
|
+
- Execution results
|
|
46
|
+
- Context (workspace, config, environment)
|
|
47
|
+
- Metadata (command counts, duration, tags)
|
|
48
|
+
|
|
49
|
+
### 6. Rich Output
|
|
50
|
+
- Multiple output formats:
|
|
51
|
+
- Text (human-readable, default)
|
|
52
|
+
- Tables (for array results)
|
|
53
|
+
- Pretty-printed objects with colors
|
|
54
|
+
- Streaming progress indicators
|
|
55
|
+
- Color-coded responses:
|
|
56
|
+
- Success: green ✔
|
|
57
|
+
- Error: red ✖
|
|
58
|
+
- Warning: yellow ⚠
|
|
59
|
+
- Info: blue ℹ
|
|
60
|
+
- Smart data rendering based on type
|
|
61
|
+
|
|
62
|
+
### 7. Built-in Commands
|
|
63
|
+
- `help` - Show available commands
|
|
64
|
+
- `services` - List discovered services
|
|
65
|
+
- `use <namespace>` - Switch to service namespace
|
|
66
|
+
- `history [limit]` - Show command history
|
|
67
|
+
- `clear` - Clear screen
|
|
68
|
+
- `save <name>` - Save current session
|
|
69
|
+
- `load <name>` - Load saved session
|
|
70
|
+
- `sessions` - List saved sessions
|
|
71
|
+
- `config` - Show current configuration
|
|
72
|
+
- `exit` / `quit` - Exit REPL
|
|
73
|
+
|
|
74
|
+
## Usage
|
|
75
|
+
|
|
76
|
+
### Starting REPL
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
nexus repl
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Welcome Banner
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
┌──────────────────────────────────────────────┐
|
|
86
|
+
│ │
|
|
87
|
+
│ NEXUS CLI │
|
|
88
|
+
│ │
|
|
89
|
+
│ Version: 2.0.0 │
|
|
90
|
+
│ Services: 23 discovered │
|
|
91
|
+
│ │
|
|
92
|
+
│ Type help for available commands │
|
|
93
|
+
│ Type exit to quit │
|
|
94
|
+
│ │
|
|
95
|
+
└──────────────────────────────────────────────┘
|
|
96
|
+
|
|
97
|
+
nexus >
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Basic Commands
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Show help
|
|
104
|
+
nexus > help
|
|
105
|
+
|
|
106
|
+
# List services
|
|
107
|
+
nexus > services
|
|
108
|
+
|
|
109
|
+
# Switch to a namespace
|
|
110
|
+
nexus > use graphrag
|
|
111
|
+
✔ Switched to namespace: graphrag
|
|
112
|
+
|
|
113
|
+
# Execute command in namespace
|
|
114
|
+
nexus:graphrag > store-document --file report.pdf --title "Q4 Report"
|
|
115
|
+
✔ Document stored successfully
|
|
116
|
+
id: doc_abc123
|
|
117
|
+
|
|
118
|
+
# View command history
|
|
119
|
+
nexus:graphrag > history
|
|
120
|
+
┌───┬─────────────────────────┬──────────────────────────┬─────────┬──────────┐
|
|
121
|
+
│ # │ command │ timestamp │ success │ duration │
|
|
122
|
+
├───┼─────────────────────────┼──────────────────────────┼─────────┼──────────┤
|
|
123
|
+
│ 3 │ store-document ... │ 2025-11-14T10:15:30.000Z │ ✔ │ 145ms │
|
|
124
|
+
│ 2 │ use graphrag │ 2025-11-14T10:15:20.000Z │ ✔ │ 1ms │
|
|
125
|
+
│ 1 │ services │ 2025-11-14T10:15:10.000Z │ ✔ │ 5ms │
|
|
126
|
+
└───┴─────────────────────────┴──────────────────────────┴─────────┴──────────┘
|
|
127
|
+
|
|
128
|
+
# Save session
|
|
129
|
+
nexus:graphrag > save my-work
|
|
130
|
+
✔ Session saved: my-work
|
|
131
|
+
|
|
132
|
+
# View configuration
|
|
133
|
+
nexus:graphrag > config
|
|
134
|
+
namespace: graphrag
|
|
135
|
+
workspace: typescript
|
|
136
|
+
outputFormat: text
|
|
137
|
+
verbose: false
|
|
138
|
+
commandCount: 5
|
|
139
|
+
sessionDuration: 120s
|
|
140
|
+
|
|
141
|
+
# Exit
|
|
142
|
+
nexus:graphrag > exit
|
|
143
|
+
✔ Goodbye!
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Tab Completion
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Press Tab to see all commands
|
|
150
|
+
nexus > [TAB]
|
|
151
|
+
clear config exit help history load quit
|
|
152
|
+
save services sessions use
|
|
153
|
+
|
|
154
|
+
# Press Tab to complete command
|
|
155
|
+
nexus > se[TAB]
|
|
156
|
+
nexus > services
|
|
157
|
+
|
|
158
|
+
# Press Tab to complete namespace
|
|
159
|
+
nexus > use gr[TAB]
|
|
160
|
+
nexus > use graphrag
|
|
161
|
+
|
|
162
|
+
# Press Tab to see command options
|
|
163
|
+
nexus:graphrag > query --[TAB]
|
|
164
|
+
--text --limit --strategy
|
|
165
|
+
|
|
166
|
+
# Press Tab with partial option
|
|
167
|
+
nexus:graphrag > query --li[TAB]
|
|
168
|
+
nexus:graphrag > query --limit
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Command History Navigation
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Use up arrow to navigate history
|
|
175
|
+
nexus > [UP] # Shows previous command
|
|
176
|
+
nexus > [UP] # Shows command before that
|
|
177
|
+
nexus > [DOWN] # Navigate forward in history
|
|
178
|
+
|
|
179
|
+
# Ctrl+R for reverse search
|
|
180
|
+
nexus > [Ctrl+R]
|
|
181
|
+
(reverse-i-search)`query': query --text "authentication"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Session Management
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Save current session
|
|
188
|
+
nexus > save analysis-session
|
|
189
|
+
✔ Session saved: analysis-session
|
|
190
|
+
|
|
191
|
+
# List all sessions
|
|
192
|
+
nexus > sessions
|
|
193
|
+
┌───────────────────┬──────────────────────────┬──────────────────────────┬──────────┬──────┐
|
|
194
|
+
│ name │ created │ updated │ commands │ tags │
|
|
195
|
+
├───────────────────┼──────────────────────────┼──────────────────────────┼──────────┼──────┤
|
|
196
|
+
│ analysis-session │ 2025-11-14T10:00:00.000Z │ 2025-11-14T10:30:00.000Z │ 25 │ │
|
|
197
|
+
│ debugging-work │ 2025-11-13T15:20:00.000Z │ 2025-11-13T16:00:00.000Z │ 45 │ │
|
|
198
|
+
└───────────────────┴──────────────────────────┴──────────────────────────┴──────────┴──────┘
|
|
199
|
+
|
|
200
|
+
# Load a session
|
|
201
|
+
nexus > load analysis-session
|
|
202
|
+
✔ Session loaded: analysis-session
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Architecture
|
|
206
|
+
|
|
207
|
+
### Components
|
|
208
|
+
|
|
209
|
+
#### 1. REPL Core (`src/repl/repl.ts`)
|
|
210
|
+
- Main REPL loop
|
|
211
|
+
- Readline interface setup
|
|
212
|
+
- Event handlers (line, SIGINT, close)
|
|
213
|
+
- Built-in command handlers
|
|
214
|
+
- Session lifecycle management
|
|
215
|
+
|
|
216
|
+
#### 2. Completer (`src/repl/completer.ts`)
|
|
217
|
+
- Tab completion logic
|
|
218
|
+
- Context-aware suggestions
|
|
219
|
+
- Command/option/argument completion
|
|
220
|
+
- Namespace completion
|
|
221
|
+
- Help text for completions
|
|
222
|
+
|
|
223
|
+
#### 3. Evaluator (`src/repl/evaluator.ts`)
|
|
224
|
+
- Command parsing and tokenization
|
|
225
|
+
- Option parsing (--long, -short)
|
|
226
|
+
- Command type detection (builtin, service, namespace)
|
|
227
|
+
- Command execution
|
|
228
|
+
- Error handling
|
|
229
|
+
|
|
230
|
+
#### 4. Renderer (`src/repl/renderer.ts`)
|
|
231
|
+
- Result formatting
|
|
232
|
+
- Table rendering
|
|
233
|
+
- Object pretty-printing
|
|
234
|
+
- Color-coded output
|
|
235
|
+
- Welcome banner
|
|
236
|
+
- Prompt generation
|
|
237
|
+
|
|
238
|
+
#### 5. Context Manager (`src/core/session/context-manager.ts`)
|
|
239
|
+
- Current namespace tracking
|
|
240
|
+
- Workspace context
|
|
241
|
+
- Last command result
|
|
242
|
+
- Session metadata
|
|
243
|
+
- Context persistence
|
|
244
|
+
|
|
245
|
+
#### 6. History Manager (`src/core/session/history-manager.ts`)
|
|
246
|
+
- Command history storage
|
|
247
|
+
- Persistent history to disk
|
|
248
|
+
- History navigation (up/down)
|
|
249
|
+
- History search
|
|
250
|
+
- Size limit enforcement
|
|
251
|
+
|
|
252
|
+
#### 7. Session Manager (`src/core/session/session-manager.ts`)
|
|
253
|
+
- Session save/load/delete
|
|
254
|
+
- Session list
|
|
255
|
+
- Session export/import
|
|
256
|
+
- Resume last session
|
|
257
|
+
- Session metadata tracking
|
|
258
|
+
|
|
259
|
+
### Data Flow
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
User Input
|
|
263
|
+
↓
|
|
264
|
+
Readline (with tab completion)
|
|
265
|
+
↓
|
|
266
|
+
Evaluator (parse command)
|
|
267
|
+
↓
|
|
268
|
+
Command Handler (execute)
|
|
269
|
+
↓
|
|
270
|
+
Context Manager (update context)
|
|
271
|
+
↓
|
|
272
|
+
History Manager (add to history)
|
|
273
|
+
↓
|
|
274
|
+
Renderer (format result)
|
|
275
|
+
↓
|
|
276
|
+
Display to User
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### File Structure
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
src/
|
|
283
|
+
├── repl/
|
|
284
|
+
│ ├── repl.ts # Main REPL implementation
|
|
285
|
+
│ ├── completer.ts # Tab completion
|
|
286
|
+
│ ├── evaluator.ts # Command parsing & execution
|
|
287
|
+
│ ├── renderer.ts # Output rendering
|
|
288
|
+
│ └── index.ts # Module exports
|
|
289
|
+
│
|
|
290
|
+
├── core/session/
|
|
291
|
+
│ ├── context-manager.ts # REPL context management
|
|
292
|
+
│ ├── history-manager.ts # Command history
|
|
293
|
+
│ ├── session-manager.ts # Session checkpointing
|
|
294
|
+
│ └── index.ts # Module exports
|
|
295
|
+
│
|
|
296
|
+
└── utils/
|
|
297
|
+
├── spinner.ts # Progress spinners
|
|
298
|
+
├── prompt.ts # Interactive prompts
|
|
299
|
+
├── validation.ts # Input validation
|
|
300
|
+
└── index.ts # Module exports
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Configuration
|
|
304
|
+
|
|
305
|
+
### REPL Settings (in .nexus.toml)
|
|
306
|
+
|
|
307
|
+
```toml
|
|
308
|
+
[repl]
|
|
309
|
+
history_size = 1000 # Maximum history size
|
|
310
|
+
history_file = "~/.nexus/history"
|
|
311
|
+
sessions_dir = "~/.nexus/sessions"
|
|
312
|
+
auto_save = false # Auto-save session on exit
|
|
313
|
+
welcome_banner = true # Show welcome banner on start
|
|
314
|
+
|
|
315
|
+
[defaults]
|
|
316
|
+
output_format = "text" # Default output format in REPL
|
|
317
|
+
verbose = false # Verbose mode
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Environment Variables
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
NEXUS_REPL_HISTORY_SIZE=2000 # Override history size
|
|
324
|
+
NEXUS_REPL_NO_BANNER=1 # Disable welcome banner
|
|
325
|
+
VERBOSE=1 # Enable verbose mode
|
|
326
|
+
DEBUG=1 # Enable debug mode (show stack traces)
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Integration Example
|
|
330
|
+
|
|
331
|
+
```typescript
|
|
332
|
+
import { REPL } from './repl/index.js';
|
|
333
|
+
|
|
334
|
+
// Create REPL instance
|
|
335
|
+
const repl = new REPL({
|
|
336
|
+
workspace: detectedWorkspace,
|
|
337
|
+
config: loadedConfig,
|
|
338
|
+
services: discoveredServices,
|
|
339
|
+
commands: generatedCommands,
|
|
340
|
+
version: '2.0.0',
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
// Start REPL
|
|
344
|
+
await repl.start();
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Testing
|
|
348
|
+
|
|
349
|
+
### Unit Tests
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
npm test src/repl/
|
|
353
|
+
npm test src/core/session/
|
|
354
|
+
npm test src/utils/
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Integration Tests
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
# Test REPL with mock services
|
|
361
|
+
npm test tests/integration/repl.test.ts
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Manual Testing
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
# Start REPL
|
|
368
|
+
npm run dev repl
|
|
369
|
+
|
|
370
|
+
# Test commands
|
|
371
|
+
nexus > help
|
|
372
|
+
nexus > services
|
|
373
|
+
nexus > use graphrag
|
|
374
|
+
nexus:graphrag > help
|
|
375
|
+
nexus:graphrab > [TAB]
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## Best Practices
|
|
379
|
+
|
|
380
|
+
### 1. Command Design
|
|
381
|
+
- Keep commands concise and descriptive
|
|
382
|
+
- Use consistent naming across services
|
|
383
|
+
- Provide clear descriptions
|
|
384
|
+
- Include examples in help text
|
|
385
|
+
|
|
386
|
+
### 2. Error Handling
|
|
387
|
+
- Never crash the REPL on errors
|
|
388
|
+
- Show clear error messages
|
|
389
|
+
- Provide suggestions when possible
|
|
390
|
+
- Log errors for debugging
|
|
391
|
+
|
|
392
|
+
### 3. User Experience
|
|
393
|
+
- Fast tab completion (<50ms)
|
|
394
|
+
- Responsive prompt
|
|
395
|
+
- Clear visual feedback
|
|
396
|
+
- Helpful error messages
|
|
397
|
+
|
|
398
|
+
### 4. Performance
|
|
399
|
+
- Lazy-load commands
|
|
400
|
+
- Cache completion results
|
|
401
|
+
- Limit history size
|
|
402
|
+
- Efficient parsing
|
|
403
|
+
|
|
404
|
+
## Future Enhancements
|
|
405
|
+
|
|
406
|
+
### Planned Features
|
|
407
|
+
- [ ] Multi-line input with \ continuation
|
|
408
|
+
- [ ] Command aliases (shortcuts)
|
|
409
|
+
- [ ] Pipe support between commands
|
|
410
|
+
- [ ] Command chaining with &&, ||
|
|
411
|
+
- [ ] Variables ($var syntax)
|
|
412
|
+
- [ ] Script execution (run file)
|
|
413
|
+
- [ ] Auto-suggestions based on history
|
|
414
|
+
- [ ] Fuzzy command matching
|
|
415
|
+
- [ ] Syntax highlighting
|
|
416
|
+
- [ ] Command validation before execution
|
|
417
|
+
|
|
418
|
+
### Advanced Features
|
|
419
|
+
- [ ] REPL plugins
|
|
420
|
+
- [ ] Custom themes
|
|
421
|
+
- [ ] Macro recording
|
|
422
|
+
- [ ] Command templates
|
|
423
|
+
- [ ] Workspace-specific commands
|
|
424
|
+
- [ ] Remote REPL (connect to running services)
|
|
425
|
+
- [ ] REPL over SSH/WebSocket
|
|
426
|
+
|
|
427
|
+
## Troubleshooting
|
|
428
|
+
|
|
429
|
+
### History Not Persisting
|
|
430
|
+
```bash
|
|
431
|
+
# Check history file
|
|
432
|
+
ls -la ~/.nexus/history
|
|
433
|
+
|
|
434
|
+
# Check permissions
|
|
435
|
+
chmod 644 ~/.nexus/history
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
### Tab Completion Not Working
|
|
439
|
+
```bash
|
|
440
|
+
# Verify readline is properly initialized
|
|
441
|
+
# Check that completer function is registered
|
|
442
|
+
# Ensure commands are properly loaded
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Session Save/Load Issues
|
|
446
|
+
```bash
|
|
447
|
+
# Check sessions directory
|
|
448
|
+
ls -la ~/.nexus/sessions/
|
|
449
|
+
|
|
450
|
+
# Verify JSON format
|
|
451
|
+
cat ~/.nexus/sessions/<session-id>.json | jq .
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
## Resources
|
|
455
|
+
|
|
456
|
+
- [Node.js Readline Documentation](https://nodejs.org/api/readline.html)
|
|
457
|
+
- [Inquirer.js](https://github.com/SBoudrias/Inquirer.js)
|
|
458
|
+
- [Commander.js](https://github.com/tj/commander.js)
|
|
459
|
+
- [REPL Design Patterns](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop)
|
|
460
|
+
|
|
461
|
+
## Support
|
|
462
|
+
|
|
463
|
+
For issues or questions about the REPL:
|
|
464
|
+
- Open an issue on GitHub
|
|
465
|
+
- Check existing documentation
|
|
466
|
+
- Review example usage in `examples/repl-usage.ts`
|