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

frontal-cli

v0.1.2

Published

Frontal CLI

Downloads

32

Readme

Frontal CLI

The official command-line interface for Frontal.

Quick Start

Installation

# Install globally
npm install -g frontal-cli

# Or use with bun
bun install frontal-cli

# Or install with Homebrew
brew tap frontal-labs/cli
brew install frontal-cli

Authentication

# Login to your Frontal account
frontal auth login

# This will open a browser for authentication
# or provide an API key option

Basic Usage

# List all available commands
frontal --help

# Check current configuration
frontal config show

# Deploy a project
frontal deploy

# List your projects
frontal projects list

Commands

Authentication

frontal auth login          # Login to Frontal
frontal auth logout         # Logout from current session
frontal auth status         # Check authentication status
frontal auth whoami         # Show current user info

Projects

frontal projects list       # List all projects
frontal projects create     # Create a new project
frontal projects info       # Show project details
frontal projects delete     # Delete a project

Deployment

frontal deploy              # Deploy current directory
frontal deploy --prod       # Deploy to production
frontal deploy --env staging # Deploy to specific environment
frontal deploy status       # Check deployment status

Functions

frontal functions list      # List deployed functions
frontal functions deploy    # Deploy a function
frontal functions logs      # View function logs
frontal functions invoke    # Invoke a function

Storage

frontal storage list        # List storage buckets
frontal storage upload      # Upload files
frontal storage download    # Download files
frontal storage delete      # Delete files

API Keys

frontal api-keys list       # List API keys
frontal api-keys create     # Create new API key
frontal api-keys revoke     # Revoke an API key

Configuration

frontal config show         # Show current configuration
frontal config set          # Set configuration value
frontal config unset        # Remove configuration value
frontal config reset        # Reset to defaults

Configuration

Environment Variables

# Frontal API endpoint
export FRONTAL_API_URL="https://api.frontal.dev"

# Default project
export FRONTAL_PROJECT="my-project"

# Default environment
export FRONTAL_ENVIRONMENT="development"

# API key (alternative to auth login)
export FRONTAL_API_KEY="your-api-key-here"

Configuration File

The CLI stores configuration in ~/.frontal/config.json:

{
  "apiUrl": "https://api.frontal.dev",
  "apiKey": "encrypted-api-key",
  "defaultProject": "my-project",
  "defaultEnvironment": "development",
  "user": {
    "id": "user-id",
    "email": "[email protected]"
  }
}

Project Structure

The CLI works with standard Frontal project structures:

my-project/
├── frontal.json          # Project configuration
├── functions/            # Serverless functions
│   └── my-function/
│       ├── index.js
│       └── package.json
├── storage/              # Static assets
├── config/               # Configuration files
└── tests/                # Test files

frontal.json

{
  "name": "my-project",
  "version": "1.0.0",
  "environments": {
    "development": {
      "functions": {
        "my-function": {
          "runtime": "nodejs18",
          "memory": 256,
          "timeout": 30
        }
      }
    },
    "production": {
      "functions": {
        "my-function": {
          "runtime": "nodejs18",
          "memory": 512,
          "timeout": 60
        }
      }
    }
  }
}

Examples

Deploying a Function

# Create a new function
mkdir my-function
cd my-function

# Initialize function
cat > index.js << 'EOF'
export async function handler(event) {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: 'Hello, World!' })
  };
}
EOF

# Deploy
frontal functions deploy my-function

Setting Up Storage

# Upload files to storage
frontal storage upload ./public/* --bucket my-assets

# List uploaded files
frontal storage list --bucket my-assets

# Download files
frontal storage download my-assets/logo.png

Managing Projects

# Create a new project
frontal projects create --name "my-awesome-project"

# Set as default
frontal config set defaultProject "my-awesome-project"

# Deploy to the new project
frontal deploy

Development

Building from Source

# Clone the repository
git clone https://github.com/frontal-labs/cli.git
cd cli

# Install dependencies
bun install

# Build the CLI
bun run build

# Run locally
./dist/bin/frontal.js --help

Running Tests

# Run all tests
bun run test

# Run tests in watch mode
bun run test:watch

# Generate coverage report
bun run test:coverage

Code Quality

# Lint code
bun run lint

# Format code
bun run format

# Type check
bun run type-check

Troubleshooting

Common Issues

Authentication Problems

# Check auth status
frontal auth status

# Clear cached credentials
frontal auth logout

# Re-authenticate
frontal auth login

Deployment Failures

# Check deployment logs
frontal deploy status --verbose

# Validate project structure
frontal validate

# Check configuration
frontal config show

Network Issues

# Set custom API endpoint
frontal config set apiUrl "https://api.frontal.dev"

# Use proxy if needed
export HTTPS_PROXY="http://proxy.example.com:8080"

Debug Mode

Enable debug logging:

# Set log level
export FRONTAL_LOG_LEVEL=debug

# Or use flag
frontal --verbose deploy

Getting Help

# General help
frontal --help

# Command-specific help
frontal deploy --help

# Show version
frontal --version

Homebrew Management

Installation

# Add the tap
brew tap frontal-labs/cli

# Install the CLI
brew install frontal-cli

Updates

# Update to latest version
brew upgrade frontal-cli

# Or update all packages
brew upgrade

Uninstallation

# Remove the CLI
brew uninstall frontal-cli

# Remove the tap
brew untap frontal-labs/cli

Troubleshooting

# Reinstall if issues occur
brew reinstall frontal-cli

# Force upgrade to latest
brew upgrade frontal-cli --force

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Changelog

See CHANGELOG.md for version history and changes.