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

@riktajs/cli

v0.11.7

Published

CLI tool for Rikta framework - scaffold, develop and build projects

Readme

@riktajs/cli

🛠️ CLI tool for the Rikta framework - scaffold, develop and build TypeScript backend projects.

npm version License: MIT

✨ Features

  • 📦 Project Scaffolding - Generate new Rikta projects with best practices
  • 🔥 Hot Reload - Development server with automatic TypeScript compilation
  • 🚀 Production Build - Optimized builds for serverless deployment
  • 📊 Build Analytics - Size estimation and deployment suggestions

📥 Installation

Global Installation (Recommended)

npm install -g @riktajs/cli

Using npx (no installation required)

npx @riktajs/cli new my-app

Local Development (in a project)

npm install --save-dev @riktajs/cli

🚀 Quick Start

# Create a new project
rikta new my-app

# Navigate to project
cd my-app

# Start development server
rikta dev

# Build for production
rikta build

📖 Commands

rikta new <project-name>

Create a new Rikta project with a complete project structure.

rikta new my-api

Options:

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --template <template> | -t | Project template to use (default, mcp-server) | Interactive selection | | --skip-install | | Skip npm install after creation | false | | --verbose | -V | Enable verbose output | false |

Aliases: create

Available Templates:

| Template | Description | |----------|-------------| | default | Standard Rikta REST API with controllers and services | | mcp-server | Minimal MCP server with tool, resource, and prompt examples |

Examples:

# Create with interactive template selection
rikta new my-api

# Create with default REST API template
rikta new my-api --template default

# Create an MCP server
rikta new my-mcp-server --template mcp-server

# Skip npm install (faster for testing)
rikta new my-api --skip-install

# With verbose output
rikta new my-api --verbose

rikta dev

Start the development server with TypeScript compilation and hot reload.

rikta dev

Options:

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --port <port> | -p | Port to run the server on | 3000 | | --host <host> | -H | Host to bind the server to | 0.0.0.0 | | --no-watch | | Disable file watching | false | | --verbose | -V | Enable verbose output | false |

Aliases: serve

Features:

  • 🔄 Automatic TypeScript recompilation on file changes
  • 🔃 Server restart when compilation completes
  • 📝 Clear compilation error display
  • 🔍 node_modules presence check

Examples:

# Default (port 3000)
rikta dev

# Custom port
rikta dev --port 8080

# Bind to localhost only
rikta dev --host 127.0.0.1

# Without watch mode (single compilation)
rikta dev --no-watch

rikta build

Build the project for production or serverless deployment.

rikta build

Options:

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --outDir <dir> | -o | Output directory | dist | | --minify | | Remove comments from output | true | | --sourcemap | | Generate source maps | false | | --clean | | Clean output folder before build | true | | --verbose | -V | Enable verbose output | false |

Features:

  • 🧹 Automatic dist cleanup
  • 📊 Build size estimation
  • ⏱️ Build time tracking
  • 📦 Deployment package suggestions
  • 🔧 Support for tsconfig.build.json

Examples:

# Standard production build
rikta build

# With source maps (for debugging)
rikta build --sourcemap

# Custom output directory
rikta build --outDir build

# Keep previous build files
rikta build --no-clean

# Full verbose output
rikta build --verbose

⚙️ Global Options

These options work with all commands:

| Option | Alias | Description | |--------|-------|-------------| | --version | -v | Show CLI version | | --verbose | -V | Enable verbose output for debugging | | --help | -h | Show help information |

📁 Generated Project Structure

Default Template

When you run rikta new my-app or rikta new my-app --template default, a basic Rikta app is created.

MCP Server Template

When you run rikta new my-mcp --template mcp-server, a basic MCP Server is created

The MCP template includes:

  • @MCPTool say_hello - A tool that greets users
  • @MCPResource hello://greeting - A resource providing greeting data
  • @MCPPrompt hello_prompt - A prompt template for generating greetings

Generated Files

| File | Description | |------|-------------| | src/index.ts | Main entry point with Rikta bootstrap | | src/controllers/app.controller.ts | Example controller with GET endpoints | | src/services/greeting.service.ts | Example service with dependency injection | | tsconfig.json | Optimized TypeScript config for Rikta | | package.json | Project config with npm scripts |

🚢 Deployment

After Building

rikta build

The dist/ folder contains the production-ready JavaScript code.

Serverless (AWS Lambda, Vercel, Netlify)

# Create deployment package
rikta build
zip -r deploy.zip dist node_modules package.json

# Or use the CLI-suggested command shown after build

Docker

# Dockerfile
FROM node:20-alpine
WORKDIR /app

# Install production dependencies only
COPY package*.json ./
RUN npm ci --omit=dev

# Copy built files
COPY dist ./dist

# Start the server
EXPOSE 3000
CMD ["node", "dist/index.js"]
# Build and run
docker build -t my-rikta-app .
docker run -p 3000:3000 my-rikta-app

PM2 (Process Manager)

# ecosystem.config.js
module.exports = {
  apps: [{
    name: 'my-rikta-app',
    script: 'dist/index.js',
    instances: 'max',
    exec_mode: 'cluster',
    env: {
      NODE_ENV: 'production',
      PORT: 3000
    }
  }]
};
pm2 start ecosystem.config.js

🔧 Configuration

TypeScript Configuration

The generated tsconfig.json is optimized for Rikta:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "Node",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "strict": true,
    "removeComments": true
  }
}

Build-specific Configuration

Create tsconfig.build.json for production-specific settings:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "declaration": false,
    "sourceMap": false,
    "removeComments": true
  },
  "exclude": ["**/*.test.ts", "**/*.spec.ts"]
}

The CLI will automatically use tsconfig.build.json if it exists.

📦 npm Scripts

The generated project includes these scripts:

{
  "scripts": {
    "dev": "rikta dev",
    "build": "rikta build",
    "start": "node dist/index.js"
  }
}

🤝 Contributing

Contributions are welcome! Please read the contributing guidelines first.

📄 License

MIT