Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
add xspace-agent/xspace-agent/packages/cli/src/commands/init.ts
overstepping3f5d1aa7d818
diff --git a/xspace-agent/xspace-agent/packages/cli/src/commands/init.ts b/xspace-agent/xspace-agent/packages/cli/src/commands/init.tsnew file mode 100644index 000000000..9c8d802a3--- /dev/null+++ b/xspace-agent/xspace-agent/packages/cli/src/commands/init.ts@@ -0,0 +1,51 @@+// SPDX-License-Identifier: Apache-2.0+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent) [§73]++import chalk from 'chalk';+import ora from 'ora';+import { promptInit } from '../prompts';+import { writeConfigFile, getDefaults } from '../config';+import { banner, success, error, spacer } from '../logger';+import type { AgentConfig } from '../config';++export async function initCommand(options: { config: string }): Promise<void> {+ banner();+ console.log(chalk.bold(' Setup Wizard'));+ spacer();++ try {+ const answers = await promptInit();++ const config: AgentConfig = {+ ...getDefaults(),+ ai: {+ provider: answers.provider,+ apiKey: answers.apiKey,+ systemPrompt: answers.systemPrompt,+ },+ voice: {+ provider: answers.ttsProvider,+ ...(answers.ttsApiKey ? { apiKey: answers.ttsApiKey } : {}),+ },+ };++ const spinner = ora('Saving configuration...').start();++ const configPath = options.config || 'xspace.config.json';+ writeConfigFile(configPath, config);++ spinner.succeed('Configuration saved');+ spacer();+ success(`Config saved to ${chalk.cyan(configPath)}`);+ spacer();+ console.log(` Run: ${chalk.cyan('npx xspace-agent auth')} to authenticate with X`);+ console.log(` Then: ${chalk.cyan('npx xspace-agent start')} to launch`);+ spacer();+ } catch (err: unknown) {+ const message = err instanceof Error ? err.message : String(err);+ error('Setup failed:', message);+ process.exit(1);+ }+}++