open-index/open-npm huggingface dataset:
npm package: @leash/cli
Description: Deploy web applications with one command. Supports Next.js, Expo, Vite, and Node.js.
Author: Leash
Latest version: 0.8.0

# Leash CLI

The simplest way to deploy your web applications. One command. Any framework.

## Installation

```bash
npm install -g @leash/cli
```

## Quick Start

```bash
# 1. Create an account
leash register

# 2. Go to your project directory
cd my-app

# 3. Deploy (auto-detects framework)
leash deploy

# Your app is live at https://leash.build/username/my-app
```

## Supported Frameworks

- **Next.js** - Full-stack React applications
- **Expo / React Native** - Mobile apps deployed as web
- **Vite** - Modern frontend applications
- **Any Node.js app** - Generic Node.js applications

## Commands

### Authentication

```bash
leash register          # Create a new account
leash login             # Log in to your account
leash logout            # Log out
leash whoami            # Show current user
```

### Deployment

```bash
leash deploy                        # Deploy current project
leash deploy --message "Bug fix"    # Deploy with message
```

### App Management

```bash
leash init                  # Initialize app in current directory
leash init --name my-app    # Initialize with custom name
leash apps:list             # List all your apps
leash apps:delete <appId>   # Delete an app
```

### Environment Variables

```bash
leash env:set KEY value     # Set environment variable
leash env:list              # List all variables
leash env:delete KEY        # Delete a variable
```

### Databases

```bash
leash db:create                           # Create database (interactive)
leash db:create --type postgres --name db # Create with options
leash db:list                             # List all databases
leash db:connect <id>                     # Get connection details
leash db:delete <id>                      # Delete database
```

### Logs

```bash
leash logs              # View recent logs
leash logs --lines 200  # View more lines
leash logs --follow     # Stream logs live
```

### Configuration

```bash
leash config                    # Show current config
leash config:set-url <url>      # Set API URL (advanced)
leash config:get-url            # Get current API URL
leash config:reset              # Reset to defaults
```

## Configuration Files

Global config stored in `~/.leash/config.json`:
```json
{
  "apiUrl": "https://leash.build/api",
  "token": "your-auth-token"
}
```

Project config stored in `.leash/config.json`:
```json
{
  "appId": "app_123",
  "appName": "my-app"
}
```

## Environment Variables

- `LEASH_API_URL` - Override API URL
- `LEASH_DEV=1` - Use localhost for development

## Links

- Website: https://leash.build
- Documentation: https://leash.build/docs