Xeno CLI Overview & System Architecture
Xeno CLI: Overview & Scaffolding Engine
Section titled “Xeno CLI: Overview & Scaffolding Engine”@xeno-js/cli is the official command-line utility for the Xeno framework.
Executable via the xeno binary token, it automates project initialization,
infrastructure setup, dependency wiring, and configuration file generation for
Xeno applications.
1. Panoramica Generale (General Overview)
Section titled “1. Panoramica Generale (General Overview)”@xeno-js/cli acts as an interactive scaffolding engine designed to eliminate
boilerplate setup time. It guides developers through prompt-driven setups or
quick execution flags (--full / --empty) to assemble tailored application
architecture templates.
Key Technical Attributes
Section titled “Key Technical Attributes”-
Target Execution Runtime: Node.js
>=20.0.0. -
Exposed Binary Identifier:
xeno(dist/index.js). -
Core Dependencies: Driven by
promptsfor interactive user selection andpicocolorsfor terminal output formatting. -
Extensible Engine: Powered by an internal
ScaffoldingEnginethat coordinates sequential file generation tasks through modular generator handlers.
2. Installazione Globale (Global Installation)
Section titled “2. Installazione Globale (Global Installation)”To make the xeno command globally available across your local environment,
install the package using npm:
# Global installation commandnpm install -g @xeno-js/cliVerification and System Engine Check
Section titled “Verification and System Engine Check”Ensure your Node.js version satisfies the package requirement (>=20.0.0):
node -v# Output should be >= v20.0.0
xeno --version3. Scopi della CLI (Core Scaffolding Capabilities)
Section titled “3. Scopi della CLI (Core Scaffolding Capabilities)”The primary goal of @xeno-js/cli is to establish production-ready Xeno
application structures configured with strongly-typed setups out of the box.
flowchart TD A[xeno init command] --> B{Execution Mode} B -->|Interactive Prompts| C[User selects features] B -->|--full flag| D[Enable all features] B -->|--empty flag| E[Minimal Core setup]
C --> F[Scaffolding Engine] D --> F E --> F
F --> G[Generate Configuration Files] F --> H[Generate Source Code Structure] F --> I[Automatic npm install execution]
subgraph Generated Artifacts G --> G1[package.json / tsconfig.json] G --> G2[.env.example / drizzle.config.ts] H --> H1[src/main.ts / src/bootstrap.ts] H --> H2[src/registry.ts / src/schema.ts] endCore Responsibilities
Section titled “Core Responsibilities”- Modular Feature Opt-In / Opt-Out Dynamically enables/disables integration packages based on project requirements:
-
Validation: Zod schema validation.
-
Persistence Layer: Choice between PostgreSQL (Drizzle ORM +
pg/postgres) or SQLite (@libsql/client). -
Remote HTTP Client: Axios & Cockatiel integration.
-
Authentication: Supabase client (
@supabase/supabase-js). -
Logging & Observability: Pino JSON logger (
pino/pino-pretty) and Sentry tracking (@sentry/node). -
Distributed Caching: Redis driver (
ioredis).
- Automated Code Generation Creates all essential project configuration files and application bootstrap scripts:
-
package.json: Generated with matching dependency versions and database script aliases (db:generate,db:push,db:migrate). -
src/bootstrap.ts: Assembles the programmaticAppBuilderpipeline according to selected modules. -
src/main.ts: Provides the entry point for starting the application container. -
src/registry.ts: Prepares the type-safeXenoRegistrycontainer tokens. -
.env.example: Populates environment variable keys for configured drivers.
- Automated Workspace Bootstrap Executes
npm installinside the created target directory automatically upon completing file generation.
Command Usage Examples
Section titled “Command Usage Examples”# Interactive setup in a custom folderxeno my-xeno-service
# Non-interactive full feature scaffoldxeno my-xeno-service --full
# Non-interactive minimal scaffoldxeno my-xeno-service --emptySupport Us
Section titled “Support Us”Xeno is an MIT-licensed open source project. It can grow thanks to the support of these awesome people. If you’d like to join them, please read more at support section