01 · Installation

Installation & Environment Setup

The X2Y Dev Tools SDK is engineered as a zero-dependency, lightweight module designed for seamless integration into modern Node.js and TypeScript ecosystems. It operates entirely in-memory, ensuring that installation introduces no external network overhead or complex dependency trees.

Prerequisites

Baseline environment requirements

Node.js

Version 18.0.0 or higher. Node.js 20+ recommended for optimal perf_hooks performance.

TypeScript

Version 5.0.0 or higher if utilizing the SDK within a TypeScript project. Native type definitions ship with the package — no @types/ required.

Package manager

npm, yarn, or pnpm. Any registry-compatible workflow is supported, including air-gapped mirrors.

Installation vectors

Choose the method that matches your architecture

NPM (Global Execution)

For standalone scripting, CI/CD automation and cross-repository auditing. Makes the core engine accessible from any directory without a local package.json.

npm install -g x2y-dev-tools-sdk

Integration context. Ideal for global utility scripts analyzing legacy codebases across repositories, pre-commit hooks, or automated refactoring audits in isolated CI/CD runners without polluting project dependencies.

Implementation. The compiled distribution is available in your global node_modules path and can be referenced directly in standalone Node.js scripts executed via the CLI.

GitHub (Source & Bleeding Edge)

For contributors, security auditors and early adopters. Bypasses the npm registry — strictly necessary where security policy requires building from audited source, or for features not yet published to stable.

npm install git+https://github.com/x2yDevs/x2y-sdk.git

Integration context. Fork the repository, apply custom patches via patch-package, or contribute directly to the core engine.

Post-installation build step. If you clone manually rather than via npm install git+…, compile the TypeScript source first:

git clone https://github.com/x2yDevs/x2y-sdk.git
cd x2y-sdk
npm install
npx tsc

TypeScript configuration

Recommended compiler options

Because the SDK is written in TypeScript and ships with native type definitions, no additional @types/ packages are required. To ensure strict type checking and proper module resolution, verify your tsconfig.json includes the following:

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  }
}

Verification

Confirm the SDK is operational

Execute the following diagnostic script. If it runs without module resolution errors, the SDK is fully operational and ready for production integration.

const { X2YSdk } = require('x2y-dev-tools-sdk');

const sdk = new X2YSdk(
  { rateLimitThreshold: 80 },
  { targetLanguage: 'javascript', rules: ['idiom'] }
);

console.log(`X2Y SDK v${sdk.version} initialized successfully.`);
console.log(`Active Rules: ${sdk.config.rules.join(', ')}`);
X2Y SDK v1.0.4 initialized successfully.
Active Rules: idiom

Ready to integrate

Ship safer API integrations and cleaner code reviews.

Start with the installation guide, inspect the full API reference, or audit the release-gate playground before deploying x2y SDK into your own Node.js or TypeScript stack.