mirror of
https://github.com/aljazceru/mcp-code.git
synced 2025-12-17 04:35:19 +01:00
initial commit
This commit is contained in:
22
index.ts
Normal file
22
index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { initConfig, readConfig, writeConfig } from "./config.js";
|
||||
import { initNDK, ndk } from "./ndk.js";
|
||||
import "./db.js";
|
||||
import { runCli } from "./commands/index.js";
|
||||
import { runConfigWizard } from "./wizard";
|
||||
|
||||
// Load config and ensure defaults
|
||||
const config = initConfig();
|
||||
|
||||
// If there's no privateKey or bunker configured, run the setup wizard
|
||||
if (!config.privateKey && !config.bunker) {
|
||||
const updatedConfig = await runConfigWizard(config);
|
||||
await initNDK(updatedConfig);
|
||||
} else {
|
||||
await initNDK(config);
|
||||
}
|
||||
|
||||
// Process command-line arguments
|
||||
const args = process.argv;
|
||||
|
||||
// Check if running with "mcp" command
|
||||
await runCli(args);
|
||||
Reference in New Issue
Block a user