Understand, extract, and verify a TypeScript or React module.
TypeScript
0
4 commits
updated Sep 20, 2026
Understand, extract, and verify a TypeScript or React module.
CodeLift traces everything reachable from one entrypoint, lets you review an immutable extraction plan, creates a standalone source package, and verifies it without changing the original project.
[!IMPORTANT] CodeLift is pre-release software. The
codelift-clipackage is prepared for npm but has not been published from this repository yet. Until it is published, use the source-checkout commands below.
Starting with one .ts, .mts, or .tsx entrypoint, CodeLift:
The source project is always read-only. Export is allowed only to a new directory outside the source project.
After the npm package is published, open a terminal in the project you want to inspect:
cd /path/to/your-project
npx codelift-cli
That command starts the local Studio, selects the current directory as the project root, chooses a
single unambiguous tsconfig, and opens the browser. Nothing is installed globally.
Useful short forms:
npx codelift-cli ./another-project # Studio for another project
npx codelift-cli src/index.ts # Studio with this entrypoint selected
npx codelift-cli inspect src/index.ts # report in the terminal
If several TypeScript configurations can own the entrypoint, CodeLift does not guess. Studio asks
you to select one; terminal commands print the candidates and exit with code 2.
Requirements:
>=24; Node 24 LTS is the CI baseline, newer releases are accepted;If pnpm is not installed, use npm to invoke the pinned pnpm version:
cd /path/to/CodeLift
npx pnpm@12.4.0 install
npx pnpm@12.4.0 demo
Once pnpm is installed, the same workflow is shorter:
pnpm install
pnpm demo
pnpm demo builds CodeLift and opens Studio on the included Node fixture. To open Studio for the
current directory, run:
pnpm start
To use this checkout against another project without changing directories:
pnpm build
node packages/cli/dist/bin.js /absolute/path/to/project
codelift inspect src/index.ts
codelift inspect src/index.ts --format json
Project root defaults to the current directory and tsconfig is discovered automatically. Advanced
overrides remain available:
codelift inspect src/index.ts \
--project /path/to/project \
--tsconfig tsconfig.library.json \
--format pretty
Exit codes:
| Code | Meaning |
|---|---|
0 | Operation completed without blocking issues |
1 | Analysis or plan completed with blocking issues, or verification failed |
2 | Invalid arguments, ambiguous configuration, or execution error |
The destination is intentionally required and is never invented by CodeLift:
codelift plan src/index.ts \
--name invoice-kit \
--out ../invoice-kit \
--save codelift.plan.json
The versioned plan records:
Warnings require explicit acceptance with --accept-warnings. Blocking issues cannot be bypassed.
Any input change makes the plan stale and prevents export.
codelift extract --plan codelift.plan.json
Export requires a non-existing destination outside the source project. CodeLift writes into a temporary sibling directory, validates the complete result, and atomically renames it into place. If export fails or is cancelled, the staging directory is removed and no final package appears.
Generated packages are private by default and include editable source, build configuration,
package.json, README, and codelift-report.json. A source license is copied only when explicitly
requested through the programmatic plan API.
Safe structural checks do not require network access:
codelift verify ../invoice-kit
This checks the plan manifest, local import resolution, package exports, public types, unexpected
files, and absolute references back to the source project. Install/build/smoke checks are reported
as not-run, never silently presented as passed.
To test a real isolated build:
codelift verify ../invoice-kit --install
CodeLift shows this choice explicitly in Studio. It copies the package to a temporary directory,
runs npm install --ignore-scripts, and executes only CodeLift-generated build and smoke commands.
Dependency lifecycle scripts remain disabled unless --allow-install-scripts is also supplied.
Studio guides the operation through:
Project → Analyze → Plan → Review → Export → Verify → Report
passed, failed, not-run, unsupported, or cancelled.Long export and verification operations are cancellable jobs. Every job is bound to the Studio session token, source project, plan digest, and destination.
| Capability | node-esm | react-library |
|---|---|---|
.ts / .mts | ✓ | ✓ |
.tsx and standard React JSX modes | — | ✓ |
| CSS and CSS Modules | — | ✓ |
| JSON and SVG | — | ✓ |
| PNG, JPEG, WebP, GIF, AVIF, ICO | — | ✓ |
| WOFF/WOFF2, TTF, OTF | — | ✓ |
TypeScript paths aliases | ✓ | ✓ |
| Node built-ins | ✓ | Diagnosed when present |
| Package build | TypeScript | Vite library mode + declarations |
React and React DOM are classified as both peer dependencies and development dependencies. Other
runtime imports become dependencies. Ranges come from the source manifest; CodeLift never replaces
them with latest.
Not yet supported: CommonJS, Sass/Less, React Native, custom bundler loaders/plugins, multiple entrypoints, project references, workspace package transfer, and automatic test migration.
The deterministic core API keeps project discovery out of analyzeProject itself:
import {
analyzeProject,
createExtractionPlan,
exportPackage,
verifyPackage,
} from "@codelift/core";
const analysis = await analyzeProject({
projectRoot: "/absolute/project",
tsconfigPath: "tsconfig.json",
entrypoint: "src/index.ts",
});
const plan = await createExtractionPlan({
projectRoot: analysis.project.root,
tsconfigPath: analysis.project.tsconfig,
entrypoint: analysis.entrypoint,
packageName: "invoice-kit",
destination: "/absolute/output/invoice-kit",
});
if (plan.status === "ready") {
const exported = await exportPackage(plan);
const verification = await verifyPackage({ packageRoot: exported.destination });
console.log(verification.status);
}
Public schemas are independently versioned:
AnalysisResult schema 2;ExtractionPlan schema 1;ExportResult schema 1;VerificationResult schema 1.All long-running APIs accept an optional AbortSignal.
127.0.0.1 and has no CORS support.realpath boundary checks reject path traversal and symlink escapes.NODE_PATH and source-linking variables removed.See SECURITY.md for vulnerability reporting.
codelift-cli
├── CLI commands
├── Fastify loopback server
├── compiled React Studio
└── @codelift/core
├── project discovery
├── TypeScript compatibility adapter
├── TS/TSX/CSS/resource graph
├── extraction planner
├── safe exporter
└── isolated verifier
The repository is a pnpm workspace:
packages/core — analysis, planning, export, and verification APIs;packages/cli — the publishable codelift-cli package and codelift binary;packages/studio-server — local Fastify API and job/session boundary;apps/studio — React 19, React Flow, Dagre, and CSS Modules;fixtures — deterministic Node and React golden projects.CodeLift itself builds with TypeScript 7. Project analysis is isolated behind CompilerAdapter and
uses the TypeScript 6 compatibility package until the new compiler exposes the required stable API.
pnpm install
pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm test:e2e
Convenience commands:
pnpm start # production Studio for the current directory
pnpm demo # production Studio for fixtures/node-esm-basic
Validate the publishable package:
pnpm build
cd packages/cli
npm pack --dry-run
CI runs lint, type checking, unit/integration tests, builds, browser tests, and package smoke tests on Node 24 across Ubuntu, macOS, and Windows. See docs/releasing.md for the guarded npm provenance workflow. The project is licensed under MIT.
0.2.0-alpha — short launch, npm packaging, and React/resource analysis;0.3.0-alpha — versioned plans and safe exporter;0.4.0-beta — isolated verification and the complete Studio workflow;1.0.0 — after Node utility, React component, and alias-heavy real-world migrations stabilize the
schemas and edge cases.Feedback is collected through GitHub Issues and voluntarily attached, sanitized reports only.
4 commits
TypeScript
90.2%
CSS
8.6%
JavaScript
1.0%
Understand, extract, and verify a TypeScript or React module.
TypeScript
0
4 commits
updated Sep 20, 2026
Understand, extract, and verify a TypeScript or React module.
CodeLift traces everything reachable from one entrypoint, lets you review an immutable extraction plan, creates a standalone source package, and verifies it without changing the original project.
[!IMPORTANT] CodeLift is pre-release software. The
codelift-clipackage is prepared for npm but has not been published from this repository yet. Until it is published, use the source-checkout commands below.
Starting with one .ts, .mts, or .tsx entrypoint, CodeLift:
The source project is always read-only. Export is allowed only to a new directory outside the source project.
After the npm package is published, open a terminal in the project you want to inspect:
cd /path/to/your-project
npx codelift-cli
That command starts the local Studio, selects the current directory as the project root, chooses a
single unambiguous tsconfig, and opens the browser. Nothing is installed globally.
Useful short forms:
npx codelift-cli ./another-project # Studio for another project
npx codelift-cli src/index.ts # Studio with this entrypoint selected
npx codelift-cli inspect src/index.ts # report in the terminal
If several TypeScript configurations can own the entrypoint, CodeLift does not guess. Studio asks
you to select one; terminal commands print the candidates and exit with code 2.
Requirements:
>=24; Node 24 LTS is the CI baseline, newer releases are accepted;If pnpm is not installed, use npm to invoke the pinned pnpm version:
cd /path/to/CodeLift
npx pnpm@12.4.0 install
npx pnpm@12.4.0 demo
Once pnpm is installed, the same workflow is shorter:
pnpm install
pnpm demo
pnpm demo builds CodeLift and opens Studio on the included Node fixture. To open Studio for the
current directory, run:
pnpm start
To use this checkout against another project without changing directories:
pnpm build
node packages/cli/dist/bin.js /absolute/path/to/project
codelift inspect src/index.ts
codelift inspect src/index.ts --format json
Project root defaults to the current directory and tsconfig is discovered automatically. Advanced
overrides remain available:
codelift inspect src/index.ts \
--project /path/to/project \
--tsconfig tsconfig.library.json \
--format pretty
Exit codes:
| Code | Meaning |
|---|---|
0 | Operation completed without blocking issues |
1 | Analysis or plan completed with blocking issues, or verification failed |
2 | Invalid arguments, ambiguous configuration, or execution error |
The destination is intentionally required and is never invented by CodeLift:
codelift plan src/index.ts \
--name invoice-kit \
--out ../invoice-kit \
--save codelift.plan.json
The versioned plan records:
Warnings require explicit acceptance with --accept-warnings. Blocking issues cannot be bypassed.
Any input change makes the plan stale and prevents export.
codelift extract --plan codelift.plan.json
Export requires a non-existing destination outside the source project. CodeLift writes into a temporary sibling directory, validates the complete result, and atomically renames it into place. If export fails or is cancelled, the staging directory is removed and no final package appears.
Generated packages are private by default and include editable source, build configuration,
package.json, README, and codelift-report.json. A source license is copied only when explicitly
requested through the programmatic plan API.
Safe structural checks do not require network access:
codelift verify ../invoice-kit
This checks the plan manifest, local import resolution, package exports, public types, unexpected
files, and absolute references back to the source project. Install/build/smoke checks are reported
as not-run, never silently presented as passed.
To test a real isolated build:
codelift verify ../invoice-kit --install
CodeLift shows this choice explicitly in Studio. It copies the package to a temporary directory,
runs npm install --ignore-scripts, and executes only CodeLift-generated build and smoke commands.
Dependency lifecycle scripts remain disabled unless --allow-install-scripts is also supplied.
Studio guides the operation through:
Project → Analyze → Plan → Review → Export → Verify → Report
passed, failed, not-run, unsupported, or cancelled.Long export and verification operations are cancellable jobs. Every job is bound to the Studio session token, source project, plan digest, and destination.
| Capability | node-esm | react-library |
|---|---|---|
.ts / .mts | ✓ | ✓ |
.tsx and standard React JSX modes | — | ✓ |
| CSS and CSS Modules | — | ✓ |
| JSON and SVG | — | ✓ |
| PNG, JPEG, WebP, GIF, AVIF, ICO | — | ✓ |
| WOFF/WOFF2, TTF, OTF | — | ✓ |
TypeScript paths aliases | ✓ | ✓ |
| Node built-ins | ✓ | Diagnosed when present |
| Package build | TypeScript | Vite library mode + declarations |
React and React DOM are classified as both peer dependencies and development dependencies. Other
runtime imports become dependencies. Ranges come from the source manifest; CodeLift never replaces
them with latest.
Not yet supported: CommonJS, Sass/Less, React Native, custom bundler loaders/plugins, multiple entrypoints, project references, workspace package transfer, and automatic test migration.
The deterministic core API keeps project discovery out of analyzeProject itself:
import {
analyzeProject,
createExtractionPlan,
exportPackage,
verifyPackage,
} from "@codelift/core";
const analysis = await analyzeProject({
projectRoot: "/absolute/project",
tsconfigPath: "tsconfig.json",
entrypoint: "src/index.ts",
});
const plan = await createExtractionPlan({
projectRoot: analysis.project.root,
tsconfigPath: analysis.project.tsconfig,
entrypoint: analysis.entrypoint,
packageName: "invoice-kit",
destination: "/absolute/output/invoice-kit",
});
if (plan.status === "ready") {
const exported = await exportPackage(plan);
const verification = await verifyPackage({ packageRoot: exported.destination });
console.log(verification.status);
}
Public schemas are independently versioned:
AnalysisResult schema 2;ExtractionPlan schema 1;ExportResult schema 1;VerificationResult schema 1.All long-running APIs accept an optional AbortSignal.
127.0.0.1 and has no CORS support.realpath boundary checks reject path traversal and symlink escapes.NODE_PATH and source-linking variables removed.See SECURITY.md for vulnerability reporting.
codelift-cli
├── CLI commands
├── Fastify loopback server
├── compiled React Studio
└── @codelift/core
├── project discovery
├── TypeScript compatibility adapter
├── TS/TSX/CSS/resource graph
├── extraction planner
├── safe exporter
└── isolated verifier
The repository is a pnpm workspace:
packages/core — analysis, planning, export, and verification APIs;packages/cli — the publishable codelift-cli package and codelift binary;packages/studio-server — local Fastify API and job/session boundary;apps/studio — React 19, React Flow, Dagre, and CSS Modules;fixtures — deterministic Node and React golden projects.CodeLift itself builds with TypeScript 7. Project analysis is isolated behind CompilerAdapter and
uses the TypeScript 6 compatibility package until the new compiler exposes the required stable API.
pnpm install
pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm test:e2e
Convenience commands:
pnpm start # production Studio for the current directory
pnpm demo # production Studio for fixtures/node-esm-basic
Validate the publishable package:
pnpm build
cd packages/cli
npm pack --dry-run
CI runs lint, type checking, unit/integration tests, builds, browser tests, and package smoke tests on Node 24 across Ubuntu, macOS, and Windows. See docs/releasing.md for the guarded npm provenance workflow. The project is licensed under MIT.
0.2.0-alpha — short launch, npm packaging, and React/resource analysis;0.3.0-alpha — versioned plans and safe exporter;0.4.0-beta — isolated verification and the complete Studio workflow;1.0.0 — after Node utility, React component, and alias-heavy real-world migrations stabilize the
schemas and edge cases.Feedback is collected through GitHub Issues and voluntarily attached, sanitized reports only.
4 commits
TypeScript
90.2%
CSS
8.6%
JavaScript
1.0%