@linuxctrl/newt
v0.1.1
Published
A universal project scaffold generator — pick language, framework, deps, and go
Maintainers
Readme
newt
Universal project scaffold generator — pick a language, pick a framework, add your deps, and go.
npx @linuxctrl/newtFeatures
- 5 languages — TypeScript, Python, Rust, Go, Zig
- 20+ frameworks — React (Vite), Next.js, Vue, Svelte, Astro, Hono, Express, FastAPI, Flask, Django, Axum, Actix Web, Gin, Echo, and more
- Smart deps — Each framework surfaces compatible dependencies (ORM, testing, linting, styling, auth, etc.)
- Dual generation — Delegates to official CLIs (
create-vite,create-next-app, etc.) or scaffolds from built-in templates - Interactive flow — Guided prompts with
@clack/prompts: language → framework → deps → project name → directory
Usage
# Run interactively
bunx @linuxctrl/newt
# Or from source
bun run devFollow the prompts:
✦ newt — project scaffold generator
? First thing's first: what language are we building with? TypeScript
? Nice! Which framework sparks joy? React (Vite)
? Let's kit it out. What else do you need? Tailwind CSS, Vitest
? What shall we call this masterpiece? my-app
? Where should we put it? (relative to current dir) .
✦ Done! cd my-app && npm run devFrameworks
| Language | Frameworks | |---|---| | TypeScript | React (Vite), Next.js, Vue (Vite), Nuxt, Svelte (Vite), SvelteKit, Solid (Vite), Astro, Hono, Express, Remix | | Python | FastAPI, Flask, Django | | Rust | Axum, Actix Web, Rocket, Leptos | | Go | Gin, Echo, Fiber, Chi | | Zig | Zap, http.zig |
Frameworks with established CLIs (React/Vite, Next.js, Astro, etc.) shell out to their official create-* commands. The rest are scaffolded from built-in templates so you get a running project immediately.
Installation
CLI (global)
npm install -g @linuxctrl/newt
bun install -g @linuxctrl/newtLibrary
npm install @linuxctrl/newtimport { generate, languages } from "@linuxctrl/newt";
import type { Language, Framework, Dep, ProjectAnswers } from "@linuxctrl/newt";
// Get all available languages
console.log(languages);
// Generate a project programmatically
await generate({
language: "typescript",
framework: { id: "express", name: "Express", ... },
deps: [],
name: "my-api",
directory: "",
});Development
git clone https://github.com/LinuxCTRL/newt.git
cd newt
bun install
# Run the CLI
bun run dev
# Typecheck
bun run typecheck
# Build
bun run buildProject Structure
newt/
├── src/
│ ├── index.ts # Library entry (re-exports)
│ ├── core/
│ │ ├── types.ts # TypeScript types
│ │ ├── registry.ts # Language/framework/dep registry
│ │ └── generator.ts # Scaffold engine & built-in templates
│ └── cli/
│ ├── prompts.ts # Interactive prompt flow
│ └── index.ts # CLI entry point
├── package.json
├── tsconfig.json
└── README.mdLicense
MIT
