nexlayer-cli

command module
v0.9.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 2 Imported by: 0

README ΒΆ

Nexlayer CLI

⚠️ Pre-Release Notice: This project is currently in early development (pre-beta). The codebase is not yet ready for production use or forking. We expect to release beta v1 in Q2 2025. Until then, the repository will remain private and invite-only.

Nexlayer Logo

Nexlayer CLI

Deploy Full-Stack AI Applications in Seconds ⚑️

Go Report Card GoDoc License


πŸš€ What is Nexlayer?

Nexlayer is the fastest way to deploy full-stack AI applications with a single command.
It automates containerized full-stack AI deployments on production-ready enterprise-grade kubernetes without complex setup or infrastructure management.

πŸ”₯ Why Use Nexlayer?

πŸš€ Instant deployments. Infinite scale. Zero DevOps. All without Kubernetes complexity.

βœ… Zero DevOps required – Deploy without managing Kubernetes or infrastructure.
βœ… One-command deploys – nexlayer deploy gets your AI-powered web app live instantly.
βœ… Smart project detection – nexlayer init auto-configures your full-stack application.
βœ… Web-First Architecture – Optimized for web applications that leverage AI capabilities.
βœ… Scales automatically – Enterprise-grade auto-scaling, no config needed.
βœ… Custom domains – nexlayer domain set links your app to a domain in seconds.
βœ… Simple monitoring – nexlayer info provides instant deployment insights.
βœ… Comprehensive validation – nexlayer validate ensures your configuration is correct.
βœ… True developer speed – No YAML headaches, just focus on your code.

πŸ”₯ From local development to internet scale in secondsβ€”deploy full-stack AI-powered web applications, not just raw models. πŸš€


⚑ Quick Start

1️⃣ Install Nexlayer CLI

Recommended: Install with the automated script (supports all features)

curl -sSL https://raw.githubusercontent.com/Nexlayer/nexlayer-cli/main/install.sh | bash
  • βœ… Configures shell environment automatically
  • βœ… Verifies system requirements
  • βœ… Supports both global and local installation
  • βœ… Better project path handling and error reporting

Alternative: Install directly using Go (minimal installation)

go install github.com/Nexlayer/nexlayer-cli@latest
  • βœ… Simple one-line installation
  • βœ… Uses Go's standard package management
  • ⚠️ Manual shell configuration may be needed
  • ⚠️ Limited to current working directory
2️⃣ Create and Initialize a Project
mkdir myapp && cd myapp
nexlayer init
  • Auto-detects your framework (Next.js, React, Vue.js, Python, Go, etc.)
  • Generates a nexlayer.yaml deployment file
  • Sets up environment variables and dependencies
3️⃣ Validate Your Configuration
nexlayer validate
  • Validates your configuration against the Nexlayer schema
  • Provides detailed error messages and suggestions
  • Offers auto-fix capabilities for common issues
4️⃣ Deploy Your Application
nexlayer deploy
  • Instantly deploys your app to the Nexlayer AI Cloud Platform
  • Handles containerization, infrastructure provisioning, and scaling
  • Provides a unique URL to access your application
5️⃣ Manage Your Deployment
# Check deployment status
nexlayer info

# Set a custom domain
nexlayer domain set my-app --domain example.com

# View all active deployments
nexlayer list

πŸ’» Command Reference

Essential Commands and Flags
Command Description Key Flags
nexlayer init Initialize a new project -i, --interactive: Enable guided setup
nexlayer deploy Deploy an application -d, --dry-run: Validate without deploying
nexlayer validate Validate configuration -v, --verbose: Show detailed validation
Authentication Commands
Command Description
nexlayer login Authenticate with Nexlayer
nexlayer list List active deployments
nexlayer info Get deployment details
nexlayer domain Manage custom domains
Global Flags
Flag Description
--json Output response in JSON format
-h, --help Show help for commands
πŸš€ Complete Deployment Workflow
# 1. Initialize project with interactive setup
nexlayer init --interactive

# 2. Validate configuration with detailed output
nexlayer validate --verbose

# 3. Test deployment without applying changes
nexlayer deploy --dry-run

# 4. Deploy the application
nexlayer deploy

πŸ›  Example: Deploying a Next.js App

Let's deploy a simple Next.js app with Nexlayer. https://github.com/Nexlayer/hello-world-nextjs

πŸ“‚ Project Structure
hello-world-nextjs/
β”œβ”€β”€ app/                      # Next.js application
β”‚   β”œβ”€β”€ pages/                # Next.js pages (routes)
β”‚   β”‚   β”œβ”€β”€ index.tsx         # Homepage
β”‚   β”‚   β”œβ”€β”€ about.tsx         # Example additional page
β”‚   β”œβ”€β”€ public/               # Static assets (images, icons, etc.)
β”‚   β”‚   β”œβ”€β”€ logo.png          # Example asset
β”‚   β”œβ”€β”€ package.json          # Node.js dependencies
β”‚   β”œβ”€β”€ next.config.ts        # Next.js configuration
β”‚   β”œβ”€β”€ tsconfig.json         # TypeScript configuration
β”œβ”€β”€ nginx/                    # NGINX configuration (Reverse Proxy)
β”‚   β”œβ”€β”€ default.conf          # NGINX site config
β”‚   β”œβ”€β”€ nginx.conf            # Global NGINX settings
β”œβ”€β”€ Dockerfile                # Defines the container image
β”œβ”€β”€ nexlayer.yaml             # Nexlayer deployment configuration
β”œβ”€β”€ .gitignore                # Git ignore file
β”œβ”€β”€ README.md                 # Documentation
πŸ”§ nexlayer.yaml Configuration
application:
  name: "hello-world-nextjs"
  pods:
  - name: web
    path: /
    image: ghcr.io/nexlayer/hello-world-nextjs:v0.0.1
    servicePorts:
    - 80

Note: The definitive schema for nexlayer.yaml configuration is maintained in the yaml package, which serves as the single source of truth for all YAML configurations.

πŸ“š Documentation

  • πŸ“– YAML Schema – Single source of truth for nexlayer.yaml configuration
  • πŸ“‘ API Reference – Manage deployments via API

πŸ’ͺ Contributing

We welcome contributions! Check out our Contributing Guide to get involved.

πŸ“œ License

Nexlayer CLI is MIT licensed.

πŸš€ Ready to Deploy?

Documentation ΒΆ

Overview ΒΆ

Package main is the entry point for the Nexlayer CLI application. It initializes and executes the root command, which sets up all subcommands and their respective functionality.

Directories ΒΆ

Path Synopsis
cmd
develop command
pkg
commands/validate
Package validate provides functionality for validating Nexlayer Deployment YAML configuration files.
Package validate provides functionality for validating Nexlayer Deployment YAML configuration files.
config
Package config provides centralized configuration management for the Nexlayer CLI.
Package config provides centralized configuration management for the Nexlayer CLI.
core/ai
Package ai provides AI-powered enhancements for Nexlayer configurations
Package ai provides AI-powered enhancements for Nexlayer configurations
core/api/testing
Package testing provides test utilities for the Nexlayer API client
Package testing provides test utilities for the Nexlayer API client
core/compose
Package compose provides Docker Compose to Nexlayer Deployment YAML conversion functionality.
Package compose provides Docker Compose to Nexlayer Deployment YAML conversion functionality.
core/config
Package config provides a centralized configuration management system for the Nexlayer CLI.
Package config provides a centralized configuration management system for the Nexlayer CLI.
core/types
Package types provides core type definitions for the Nexlayer CLI.
Package types provides core type definitions for the Nexlayer CLI.
detection
Package detection provides project type detection and configuration generation.
Package detection provides project type detection and configuration generation.
ui
ui/components
Package components provides reusable UI components for the CLI
Package components provides reusable UI components for the CLI
ui/styles
Package styles provides consistent styling for the CLI UI
Package styles provides consistent styling for the CLI UI
vars
Package vars provides centralized configuration management for the Nexlayer CLI.
Package vars provides centralized configuration management for the Nexlayer CLI.
yaml
Package yaml provides centralized schema management for Nexlayer Deployment YAML configurations.
Package yaml provides centralized schema management for Nexlayer Deployment YAML configurations.
tools
llm command
metadata command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL