Installation
Prerequisites
- Node.js 18+ or Bun 1.0+
Install as a CLI
npm install -g @linuxctrl/newtOr with Bun:
bun install -g @linuxctrl/newtAfter installation, run it:
npx @linuxctrl/newtUse without Installing
bunx @linuxctrl/newtThis fetches and runs the latest version without installing it globally.
Install as a Library
npm install @linuxctrl/newtThen import it programmatically:
import { generate, languages } from "@linuxctrl/newt";
// List available languages
console.log(languages);
// Generate a project
await generate({
language: "typescript",
framework: { id: "express", name: "Express", ... },
deps: [],
name: "my-api",
directory: "",
});Build from Source
git clone https://github.com/LinuxCTRL/newt.git
cd newt
bun install
bun run buildThis produces dist/ with the CLI and library.
Running Locally (Development)
# Run CLI directly from source
bun run dev
# Typecheck
bun run typecheck
# Build
bun run build