Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »


1.11.0 • Public • Published


Initialize a new TypeScript webapp, component, cli, or utility project.

This is an opinionated project initialization tool which assumes the following:

  • TypeScript will be used for source code.
  • Styles will use one or both of:
    • Styled Components (recommended)
    • SCSS (aka: SASS)
  • React will be used for web application development.
  • Babel will be used to compile TypeScript (and/or JavaScript).
  • Webpack will be used to compile web application bundles.
    • Normalize.css will be used in your web application.
  • Jest will be used for testing.
    • Fake timers will be used.
    • Mocks will be cleared between tests.
    • React Test Renderer will be used for React snapshot testing.
  • src/ contains TypeScript source files.
  • scss/ contains style source files.
  • public/ contains static web source files.
  • lib/ contains CLI or library build output.
    • lib/index.js is the CLI or library entry point.
  • dist/ contains web application build output.
    • This directory is deployable.
  • css/ contains style build output.
    • React component library CSS must be imported explicitly (e.g. import "library/css/index.css";), and is not automatically consumed by importing a component from the library!

This utility only creates and modifies files. After running the utility, your project is independent of this utility. There is no "eject" mechanism because it isn't necessary.

This utility is intended to create a very lean project similar to what a knowledgeable developer might create by hand. Configurations are small and simple with the minimum information to work reliably in most environments. Dependencies are kept to a minimum, and few (if any) non-development dependencies are included.

See the examples directory for samples of the utility's output.

Getting Started

Create a new project directory, change into it, and use npm (or yarn) to initialize your package.json file.

mkdir MyProject
cd MyProject
npm init

Run this utility.

npx init-ts-project

You will be asked what kind of project you are starting. Use the arrow and return keys to select the project type.

? Choose a project type › - Use arrow-keys. Return to submit.
❯  Web Application
   Component Library
   Utility Library
   Command Line Tool

You will also be asked if you want to create starter files. Choose "no" if your project already contains source files, otherwise you may overwrite your code. The default value is "no".

? Create starter project source files (may overwrite existing source files) › (y/N)

This utility will then create and/or overwrite configuration files and update your package.json file.


npm i init-ts-project

DownloadsWeekly Downloads






Unpacked Size

148 kB

Total Files


Last publish


  • avatar