DEV Community

Cover image for PackSmith: A minimal library for building packages.πŸš€
Gazi Nahian
Gazi Nahian

Posted on • Edited on

PackSmith: A minimal library for building packages.πŸš€

πŸš€ Build Lightning-Fast JavaScript/TypeScript Packages β€” Minus the Boilerplate

Tired of wasting hours setting up the same configs over and over again?
You're not alone.

Creating clean, reusable JS/TS packages should be easy β€” but it often turns into a slog: wiring up TypeScript, ESLint, test runners, bundlers, folder structures... every time. 😩

What if you could skip all of that and jump straight into coding?

Meet PackSmith β€” a minimal, opinionated library for building modern JS/TS packages.

No framework lock-in. No fluff. Just fast, clean, production-ready packages.

βš’οΈ What Is PackSmith?

PackSmith is a lightweight CLI + library that helps you scaffold and build framework-agnostic packages β€” ideal for utilities, SDKs, helpers, and core modules.

Run one command:

npx create-packsmith <project-name>
Enter fullscreen mode Exit fullscreen mode

And you're ready to go with:

βœ… TypeScript + ESLint + Vitest + TSUP
βœ… Clean folder structure
βœ… Handy build, test, and lint scripts
βœ… Built-in utilities (no extra dependencies needed!)
βœ… Zero clutter β€” just your code

πŸ€” Why PackSmith?

Most tools today are built for apps using frameworks like React, Vue, or Svelte. But if you're building reusable libraries β€” especially for backend or cross-platform environments β€” the setup can be repetitive and frustrating.

PackSmith is built specifically for library authors who want:

  • Preconfigured TypeScript and linting
  • A test runner that just works
  • No need to copy configs from old repos
  • A clean structure with no extra fluff
  • Minimal, type-safe utility functions built in

🧰 Comes With Built-in Utilities

PackSmith includes type-safe, dependency-free utilities to speed up development:

  • βœ… Validation helpers
  • βœ… Array and string manipulation functions
  • βœ… Small, focused functions β€” no bloat

Fewer dependencies = smaller bundles + less to maintain.

πŸ—‚οΈ Example Project Layout

my-package/
β”œβ”€β”€ .gitignore            # Git ignore rules
β”œβ”€β”€ .npmignore            # Controls which files are published
β”œβ”€β”€ eslint.config.mjs     # ESLint configuration
β”œβ”€β”€ node_modules/         # Installed dependencies
β”œβ”€β”€ package-lock.json     # npm lockfile
β”œβ”€β”€ package.json          # Project metadata and scripts
β”œβ”€β”€ README.md             # Project documentation
β”œβ”€β”€ src/                  # Source code lives here
β”‚   └── index.ts          # Entry point of your package
β”œβ”€β”€ test/                 # Unit tests
β”‚   └── index.test.ts     # Example test with Vitest
β”œβ”€β”€ dist/                 # Build output (auto-generated by TSUP)
β”œβ”€β”€ tsconfig.json         # TypeScript configuration
β”œβ”€β”€ tsup.config.ts        # Build setup (TSUP)
└── vitest.config.ts      # Test runner config
Enter fullscreen mode Exit fullscreen mode

Clean. Predictable. Production-ready.

πŸ‘€ Who Should Use This?

  • Solo developers who want to skip boilerplate
  • Open-source maintainers who value clean tooling
  • Teams that need a repeatable, lightweight foundation for internal libraries

⚑ TL;DR

PackSmith helps you build framework-agnostic JavaScript/TypeScript packages quickly β€” so you spend less time configuring, and more time creating.

πŸ”— Read the Docs
⭐ Star PackSmith on GitHub
πŸ’¬ Got feedback or ideas? Drop a comment or open an issue!

Let’s build smarter, not harder. Say goodbye to setup hell β€” and hello to PackSmith. ✨

Top comments (0)