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-go-server

v1.0.2

Published

[![CI](https://github.com/rxtech-lab/create-go-server/actions/workflows/ci.yml/badge.svg)](https://github.com/rxtech-lab/create-go-server/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/rxtech-lab/create-go-server/branch/main/graph/badge.svg)]

Readme

create-go-server

CI codecov

A CLI tool to quickly scaffold a production-ready Go web server with best practices built-in.

Features

  • 🚀 Fast Setup - Get started with a single command
  • 🏗️ Modern Stack - Fiber, GORM, Wire DI, OpenAPI
  • 🔧 Hot Reload - Development-friendly with auto-reload
  • 🐳 Docker Ready - Includes docker-compose.yaml for local development
  • ☸️ Kubernetes Support - Optional K8s manifests
  • 🔄 CI/CD Ready - GitHub Actions workflows included
  • 📝 OpenAPI First - API-first development with code generation
  • 🧪 Testing Setup - Testing utilities and examples included
  • 🔐 Type-safe - Strict server mode for compile-time safety
  • 📦 Dependency Injection - Wire for clean dependency management

Installation

npm create go-server
# or
pnpm create go-server
# or
yarn create go-server

Usage

Interactive Mode

npm create go-server

The CLI will prompt you for:

  • GitHub repository URL
  • Project name
  • Docker repository
  • Backend framework (Fiber)
  • ORM framework (GORM)
  • Database (PostgreSQL)
  • Whether to use strict server mode
  • Whether to include Kubernetes files
  • Whether to include CI files

Non-interactive Mode

Use the -y flag to skip all prompts and use default values:

npm create go-server -- -y

Generated Project Structure

your-project/
├── api/                    # OpenAPI specifications
├── cmd/                    # Application entry points
│   └── server/            # Main server application
├── internal/              # Private application code
│   ├── api/              # Generated API code
│   ├── config/           # Configuration management
│   ├── database/         # Database connections and migrations
│   ├── dto/              # Data transfer objects
│   ├── models/           # Database models
│   ├── server/           # HTTP server implementation
│   ├── service/          # Business logic
│   ├── testutil/         # Testing utilities
│   └── utils/            # Utility functions
├── k8s/                   # Kubernetes manifests (optional)
├── tools/                 # Build tools and generators
├── .env.example          # Environment variables template
├── .gitignore
├── docker-compose.yaml   # Local development setup
├── go.mod
├── Makefile              # Build commands
└── README.md             # Project documentation

Development

Prerequisites

  • Node.js 18.x or 20.x
  • pnpm 8.x

Setup

# Clone the repository
git clone https://github.com/rxtech-lab/create-go-server.git
cd create-go-server

# Install dependencies
pnpm install

# Build the project
pnpm build

# Run tests
pnpm test

# Run tests with coverage
pnpm coverage

Local Development

# Build and link locally
pnpm build:local

# Now you can use it anywhere
create-go-server -y

Adding New Templates

  1. Create a new file in src/templates/ folder and name it as somename.some_ext.tmpl
  2. Add an entry in src/templates/templates.yaml.tmpl file
  3. Rebuild the project with pnpm build

Templates are rendered using Nunjucks, which is similar to Jinja2 in Python.

Template Variables

Available variables in templates:

  • githubRepository - GitHub repository URL
  • projectName - Project name
  • dockerRepository - Docker repository name
  • backendFramework - Backend framework (currently only "fiber")
  • ormFramework - ORM framework (currently only "gorm")
  • databaseFramework - Database framework (currently only "postgres")
  • useStrictServer - Boolean for strict server mode
  • useKubernetes - Boolean for Kubernetes files
  • useCI - Boolean for CI files

Hooks

Hooks allow you to run commands after file generation:

- path: go.mod.tmpl
  output: go.mod
  hooks:
    afterAllEmit:
      type: shell
      command: make generate

Available hooks:

  • afterEmit - Called after each file is emitted
  • afterAllEmit - Called after all files are emitted

CI/CD

The project includes GitHub Actions workflows:

  • CI (ci.yml) - Runs tests, builds, and validates generated projects
  • Coverage (coverage.yml) - Generates and uploads code coverage reports
  • Publish (publish.yml) - Publishes to npm on release

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

Support

If you encounter any issues or have questions, please open an issue.