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

@streetjs/cli

v1.0.9

Published

Street Framework CLI — scaffold, generate, migrate, and run TypeScript backend projects.

Downloads

902

Readme

@streetjs/cli

CLI for the StreetJS framework — scaffold projects, generate code, run dev server, manage migrations.

CI npm version npm downloads License: MIT Node.js


Install

npm install -g @streetjs/cli

Or use without installing:

npx @streetjs/cli create my-api

Quick start

street create my-api
cd my-api
npm install
street dev
# [street] Starting development server...
# [street] Listening on http://0.0.0.0:3000

Commands

street create <project-name>

Scaffolds a complete, production-ready StreetJS project.

street create my-api
street create my-api --install    # auto-install dependencies
street create my-api -i           # shorthand

Generated structure:

my-api/
├── src/
│   ├── main.ts                        # Application entry point
│   ├── controllers/
│   │   ├── example.controller.ts      # Example CRUD controller
│   │   └── health.controller.ts       # Health check endpoint
│   ├── services/
│   │   └── example.service.ts         # Business logic layer
│   ├── repositories/
│   │   └── example.repository.ts      # Data access layer
│   ├── middleware/
│   │   └── auth.ts                    # JWT auth + role middleware
│   └── gateways/
│       └── chat.gateway.ts            # WebSocket gateway example
├── tests/
│   └── integration.test.ts            # Integration test suite
├── migrations/                        # SQL migration files
├── uploads/                           # File upload storage
├── docker-init/
│   └── 001_enable_pgcrypto.sql
├── package.json
├── tsconfig.json
├── street.config.ts
├── Dockerfile
├── docker-compose.yml
├── .env.example
├── .gitignore
└── README.md

The generated project includes:

  • Strict TypeScript with NodeNext module resolution
  • Full CRUD REST API with OpenAPI annotations
  • JWT authentication middleware
  • WebSocket gateway
  • PostgreSQL repository with parameterized queries
  • Multi-stage Dockerfile
  • Docker Compose with PostgreSQL
  • Integration test scaffold

street dev

Starts the development server with hot-reload.

cd my-api
street dev
  • Compiles TypeScript on startup
  • Starts the server (default port 3000)
  • Watches src/ for changes with 300ms debounce
  • Recompiles and restarts automatically on save
  • Handles SIGTERM/SIGINT for clean shutdown

street build

Compiles TypeScript for production.

cd my-api
street build
# [street] Building project for production...
# [street] Build completed in 2.1s
# [street] Output: ./dist/

Uses the project's tsconfig.json. Output goes to ./dist/.


street start

Starts the production server from compiled output.

cd my-api
street build
street start
# [street] Starting production server...
# [street] Node env: production

Requires dist/main.js to exist. Run street build first.


street test

Runs the project's test suite using Node's built-in test runner.

cd my-api
street test
  • Compiles TypeScript first
  • Discovers *.test.js files in dist/tests/
  • Runs with node --test
  • No external test framework required

street generate <type> <name>

Generates a controller, service, or repository with full boilerplate.

street generate controller users
street generate service    users
street generate repository users

Valid types: controller, service, repository

Example — street generate controller users:

// src/controllers/users.controller.ts
@Controller('/api/users')
export class UsersController {
  @Get('/')    async findAll(ctx: StreetContext): Promise<void> { ... }
  @Get('/:id') async findById(ctx: StreetContext): Promise<void> { ... }
  @Post('/')   async create(ctx: StreetContext): Promise<void> { ... }
  @Put('/:id') async update(ctx: StreetContext): Promise<void> { ... }
  @Delete('/:id') async delete(ctx: StreetContext): Promise<void> { ... }
}

Name conventions:

| Input | Class | File | Route | |---|---|---|---| | users | Users | users | /api/users | | blog-post | BlogPost | blog-post | /api/blog-posts | | user_profile | UserProfile | user-profile | /api/user-profiles | | category | Category | category | /api/categories |


street migrate:create <name>

Creates a timestamped SQL migration file pair.

street migrate:create create_users_table
# [street] Created migration: 20260101120000_create_users_table.sql
# [street] Created rollback:  20260101120000_create_users_table.rollback.sql

Files are created in migrations/ with a UTC timestamp prefix for deterministic ordering.

Generated up migration:

-- Migration: create_users_table
-- Created: 2026-01-01T12:00:00.000Z

-- Write your SQL migration here.
-- Example:
--   CREATE TABLE create_users_table (
--     id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
--     created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
--     updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
--   );

street migrate:run

Runs all pending SQL migrations in order.

cd my-api
street build
street migrate:run
  • Connects to PostgreSQL using environment variables
  • Tracks applied migrations in a street_migrations table
  • Skips already-applied migrations (idempotent)
  • Runs .sql files in timestamp order

Required environment variables:

PG_HOST=localhost
PG_PORT=5432
PG_DATABASE=mydb
PG_USER=postgres
PG_PASSWORD=secret

Global flags

street --version    # street v1.0.2
street --help       # show all commands
street -v           # shorthand version
street -h           # shorthand help

Generated project — getting started

After street create my-api:

cd my-api

# 1. Copy environment file
cp .env.example .env
# Edit .env with your database credentials

# 2. Start PostgreSQL (Docker)
docker compose up -d postgres

# 3. Install dependencies
npm install

# 4. Run migrations
street migrate:run

# 5. Start dev server
street dev
# → http://localhost:3000

# 6. Test endpoints
curl http://localhost:3000/health
curl http://localhost:3000/api/items
curl http://localhost:3000/openapi.json

Generated project — available scripts

| Script | Command | Description | |---|---|---| | npm run dev | street dev | Development server with hot-reload | | npm run build | street build | Compile for production | | npm run start | street start | Start production server | | npm run test | street test | Run test suite | | npm run migrate | street migrate:run | Run pending migrations | | npm run migrate:create | street migrate:create | Create new migration |


Docker

The generated Dockerfile uses a multi-stage build:

# Build and run with Docker
docker build -t my-api .
docker run -p 3000:3000 --env-file .env my-api

# Or with Docker Compose (includes PostgreSQL)
docker compose up

Links

License

MIT © street contributors