npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-icetype

v0.2.0

Published

Create IceType projects - scaffolds new schema-driven TypeScript projects

Readme

create-icetype

Scaffold new IceType projects with best-practice configuration. This CLI tool creates fully-configured TypeScript projects with IceType schema definitions and your choice of database adapter.

Installation

You do not need to install this package directly. Use npx to run it:

npx create-icetype my-app
# or
pnpm create icetype my-app

Usage

# Create a basic project with SQLite
npx create-icetype my-app

# Create a project with PostgreSQL adapter
npx create-icetype my-app --template with-postgres

# Create a project with Drizzle ORM integration
npx create-icetype my-app --template with-drizzle

# Create a project with ClickHouse for analytics
npx create-icetype my-app --template with-clickhouse

# Create a project with Apache Iceberg for data lakes
npx create-icetype my-app --template with-iceberg

Command Line Options

| Option | Alias | Description | |--------|-------|-------------| | --template <name> | -t | Project template to use (default: basic) | | --help | -h | Show help message | | --version | -v | Show version number |

API

For programmatic usage, you can import the package:

Main Exports

| Export | Description | |--------|-------------| | createProject(options) | Create a new project programmatically | | promptForOptions(partial) | Get options with defaults for missing values | | main(args) | CLI entry point | | enableColors(enabled) | Enable/disable colored output |

Types

| Type | Description | |------|-------------| | CreateOptions | Options for project creation | | GeneratorResult | Result of project generation |

CreateOptions

interface CreateOptions {
  projectName: string;
  template: 'basic' | 'with-postgres' | 'with-drizzle' | 'with-clickhouse' | 'with-iceberg';
  interactive?: boolean;
}

GeneratorResult

interface GeneratorResult {
  success: boolean;
  projectPath: string;
  filesCreated: string[];
  error?: string;
  warnings?: string[];
}

Templates

basic

Minimal IceType setup with SQLite for local development.

Includes:

  • @icetype/core - Core schema parser
  • @icetype/sqlite - SQLite adapter
  • TypeScript configuration
  • Basic blog schema example

with-postgres

IceType with PostgreSQL adapter for production databases.

Includes:

  • @icetype/core - Core schema parser
  • @icetype/postgres - PostgreSQL DDL generation
  • E-commerce schema example (Users, Products, Orders)
  • Migration scripts (npm run db:migrate)

with-drizzle

IceType with Drizzle ORM integration for type-safe SQL queries.

Includes:

  • @icetype/core - Core schema parser
  • @icetype/drizzle - Drizzle schema generation
  • drizzle-orm and drizzle-kit
  • CMS schema example (Users, Posts, Categories)
  • Drizzle Studio (npm run db:studio)

with-clickhouse

IceType with ClickHouse for real-time analytics.

Includes:

  • @icetype/core - Core schema parser
  • @icetype/clickhouse - ClickHouse DDL generation
  • @clickhouse/client - Official ClickHouse client
  • Analytics schema example (Events, PageViews, Sessions)
  • Pre-built analytics queries

with-iceberg

IceType with Apache Iceberg for data lake management.

Includes:

  • @icetype/core - Core schema parser
  • @icetype/iceberg - Iceberg metadata generation
  • Data lake schema example (Bronze/Silver/Gold layers)
  • Time-travel query examples

Examples

Programmatic Usage

import { createProject } from 'create-icetype';

const result = await createProject({
  projectName: 'my-analytics-app',
  template: 'with-clickhouse',
});

if (result.success) {
  console.log(`Created project at ${result.projectPath}`);
  console.log('Files created:', result.filesCreated);
} else {
  console.error('Error:', result.error);
}

With Custom Options

import { createProject, promptForOptions } from 'create-icetype';

// Get options with defaults
const options = await promptForOptions({
  projectName: 'my-app',
  // template will default to 'basic'
});

const result = await createProject(options);

Disable Colors (for CI)

import { enableColors, main } from 'create-icetype';

// Disable ANSI colors for CI environments
enableColors(false);

await main(['my-app', '--template', 'with-postgres']);

Project Structure

After running create-icetype, you will have:

my-app/
  package.json      # Dependencies and scripts
  tsconfig.json     # TypeScript configuration
  schema.ts         # IceType schema definitions
  .gitignore        # Git ignore rules
  .env.example      # Environment variables template (database templates)
  .editorconfig     # Editor configuration
  .prettierrc       # Prettier configuration
  .prettierignore   # Prettier ignore rules
  README.md         # Project documentation

Generated Schema

Each template includes a comprehensive schema example:

import { DB } from '@icetype/core'

export const db = DB({
  User: {
    id: 'string! #unique',
    email: 'string! #unique #index',
    name: 'string!',
    posts: '[Post] -> author',
  },
  Post: {
    id: 'string! #unique',
    title: 'string!',
    content: 'text!',
    author: 'User! <- posts',
  },
})

Documentation

For full documentation, visit the IceType Documentation.

Related Packages

License

MIT