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 🙏

© 2025 – Pkg Stats / Ryan Hefner

kolay-cli

v1.0.0

Published

Official CLI for KolayOcean deployment platform

Readme

Kolay CLI

🌊 The official command-line interface for KolayOcean deployment platform.

Installation

npm install -g kolay-cli

Or run directly with npx:

npx kolay-cli --help

Quick Start

# Login to your account
kolay auth login

# Create a new project
kolay projects create

# Deploy your project
kolay deploy my-project --wait

# View deployment logs
kolay logs <deployment-id> --follow

# Add a custom domain
kolay domains add my-project example.com

VS Code Integration

The Kolay CLI is perfect for VS Code development workflows. You can use it directly from the integrated terminal:

Setup in VS Code

  1. Install the CLI:

    npm install -g kolay-cli
  2. Login from VS Code terminal:

    kolay auth login
  3. Create a project from your current workspace:

    # The CLI will auto-detect your package.json settings
    kolay projects create
  4. Deploy with one command:

    kolay deploy --wait

VS Code Terminal Commands

Use these commands directly in your VS Code integrated terminal:

# Quick deployment from current project
kolay deploy --wait

# View real-time logs
kolay logs <deployment-id> --follow

# Manage environment variables
kolay env set my-project NODE_ENV production
kolay env set my-project --file .env

# Check project status
kolay projects status

# View all projects
kolay projects list

Tips for VS Code Users

  • The CLI automatically detects your package.json and suggests build commands
  • Use kolay deploy --wait to see deployment progress in your terminal
  • Set up VS Code tasks to automate deployments
  • Use the integrated terminal for seamless workflow

Commands

Authentication

kolay auth login                    # Login to your account
kolay auth logout                   # Logout
kolay auth whoami                   # Show current user
kolay auth register                 # Create new account
kolay auth keys list                # List API keys
kolay auth keys create              # Create API key

Projects

kolay projects list                 # List your projects
kolay projects create               # Create a new project
kolay projects deploy [name]        # Deploy a project
kolay projects status [name]        # Show project status
kolay projects delete [name]        # Delete a project

# Quick deploy alias
kolay deploy [project] --wait       # Deploy and wait for completion

Domains

kolay domains list [project]        # List domains
kolay domains add <project> <domain> # Add custom domain
kolay domains remove <project> <domain> # Remove domain

Logs

kolay logs <deployment-id>          # View deployment logs
kolay logs <deployment-id> --follow # Follow log output
kolay logs <deployment-id> --lines 50 # Show last 50 lines
kolay logs <deployment-id> --level error # Filter by level

Environment Variables

kolay env list [project]            # List environment variables
kolay env set <project> <key> [value] # Set variable
kolay env set <project> --file .env # Load from file
kolay env remove <project> <key>    # Remove variable

Configuration

kolay config list                   # Show current config
kolay config set <key> <value>      # Set config value
kolay config get <key>              # Get config value
kolay config reset                  # Reset to defaults

Configuration

The CLI stores configuration in ~/.kolay/config.json.

Environment Variables

You can override settings with environment variables:

  • KOLAY_API_URL - Override API URL
  • KOLAY_AUTH_URL - Override Auth API URL
  • KOLAY_TOKEN - Use specific API token

API URLs

Default URLs:

  • API: http://localhost:3000/api
  • Auth: http://localhost:4300/api/auth

Production URLs:

  • API: https://api.kolayocean.com
  • Auth: https://auth.kolayocean.com/api/auth

Project Detection

When creating projects, the CLI automatically detects:

  • Project name from package.json
  • Build command from package.json scripts
  • Framework-specific defaults

Authentication

Login with Email/Password

kolay auth login
# Enter email and password interactively

API Keys

For CI/CD and automation:

# Create an API key
kolay auth keys create --name "CI/CD Pipeline"

# Use API key
export KOLAY_TOKEN=ko_your_api_key_here
kolay projects list

Session Management

  • Access tokens expire in 1 hour
  • Refresh tokens are automatically handled
  • Sessions are stored securely in config file

Examples

Deploy a Next.js App

# Login
kolay auth login

# Create project (auto-detects Next.js)
cd my-nextjs-app
kolay projects create

# Deploy with environment variables
kolay env set my-nextjs-app NEXT_PUBLIC_API_URL https://api.example.com
kolay deploy my-nextjs-app --wait

# Add custom domain
kolay domains add my-nextjs-app myapp.example.com

CI/CD Integration

# In your CI/CD pipeline
export KOLAY_TOKEN=${{ secrets.KOLAY_TOKEN }}

# Deploy on push to main
kolay deploy my-project --wait

# Check deployment status
if [ $? -eq 0 ]; then
  echo "Deployment successful!"
else
  echo "Deployment failed"
  kolay logs $(kolay projects status my-project --format json | jq -r '.latest_deployment_id')
  exit 1
fi

Load Environment Variables

# Create .env file
cat > .env << EOF
API_KEY=secret123
DATABASE_URL=postgres://localhost/myapp
REDIS_URL=redis://localhost:6379
EOF

# Load into project
kolay env set my-project --file .env

Global Options

--api-url <url>     Override API URL
--auth-url <url>    Override Auth API URL
--token <token>     Use specific API token
--help              Show help
--version           Show version

Troubleshooting

Common Issues

Authentication Errors

# Clear config and re-login
kolay config reset
kolay auth login

Network Errors

# Check API URLs
kolay config list

# Use custom URLs
kolay --api-url https://api.kolayocean.com projects list

Permission Errors

# Check token permissions
kolay auth whoami

# Create new API key
kolay auth keys create --name "New Key"

Debug Mode

# Enable verbose logging
DEBUG=kolay:* kolay projects deploy my-project

Contributing

The CLI is built with TypeScript and Commander.js.

Development Setup

git clone https://github.com/kolaylabs/kolayocean-cli
cd kolayocean-cli
npm install
npm run dev

Building

npm run build
npm pack
npm install -g kolay-cli-1.0.0.tgz

License

MIT License - see LICENSE for details.

Support