spinforge-cli
v0.3.13
Published
SpinForge CLI - Deploy and manage applications with ease on the SpinForge platform
Maintainers
Readme
SpinForge CLI
Installation
npm install -g spinforge-cliQuick Start
# Deploy current directory
spinforge deploy
# Deploy with custom domain
spinforge deploy -d myapp.spinforge.dev
# Deploy a specific folder
spinforge deploy -p ./my-app -d myapp.localFeatures
- 🚀 Instant Deployments - Deploy applications in seconds
- 🔧 Framework Auto-Detection - Automatically detects Next.js, React, Vue, Express, and more
- 🌐 Custom Domains - Deploy with your own domain
- 📊 Real-time Monitoring - View logs and metrics
- 🔄 Hot Reloading - Watch for changes and auto-deploy
- 🎯 Zero Config - Works out of the box with sensible defaults
Commands
Authentication
spinforge login # Login to SpinForge
spinforge logout # Logout from SpinForge
spinforge whoami # Display current user informationDeployment
spinforge deploy [options] # Deploy an application
-p, --path <path> # Path to deploy (default: current directory)
-d, --domain <domain> # Domain for the application
-f, --framework <type> # Framework type (auto-detected if not specified)
-n, --name <name> # Application name
-m, --memory <size> # Memory limit (default: 512MB)
--cpu <limit> # CPU limit (default: 0.5)Management
spinforge deployments # List all deployments
spinforge status [id] # Get status of spinlets
spinforge logs <id> # Stream logs from a spinlet
spinforge stop <id> # Stop a running spinlet
spinforge routes # Manage domain routesDevelopment
spinforge watch [path] # Watch for changes and auto-deploy
spinforge deploy-folder # Prepare folder for hot deploymentFramework Support
SpinForge automatically detects and optimizes deployments for:
- Next.js - Full support for SSR, SSG, and API routes
- React - Optimized static builds
- Vue - Production-ready deployments
- Express - Node.js server applications
- NestJS - Enterprise Node.js applications
- Remix - Full-stack React framework
- Static Sites - HTML, CSS, JS websites
- Custom Node.js - Any Node.js application
Examples
Deploy a Next.js Application
cd my-nextjs-app
spinforge deploy -d myapp.spinforge.devDeploy with Environment Variables
spinforge deploy -e API_KEY=secret -e DB_URL=postgres://...Watch for Changes
spinforge watch ./my-appDeploy Pre-built Application
spinforge deploy-folder ./dist --skip-build --framework staticConfiguration
Create a spinforge.json in your project root:
{
"name": "my-app",
"domain": "myapp.spinforge.dev",
"framework": "nextjs",
"env": {
"NODE_ENV": "production"
},
"build": {
"command": "npm run build",
"output": ".next"
}
}Configuration
SpinForge CLI requires explicit configuration. You can configure it using:
- Environment Variables
- spinforge.config.json file in your project directory
Environment Variables
SPINFORGE_API_URL- API URL (required)SPINFORGE_WEB_URL- Web UI URL (required)SPINFORGE_TOKEN- API token for authenticationSPINFORGE_DEPLOYMENTS- Local deployment directory path (required)
spinforge.config.json
Create a spinforge.config.json file in your project directory:
{
"apiUrl": "https://api.spinforge.dev",
"webUrl": "https://spinforge.dev",
"deploymentPath": "~/.spinforge/deployments"
}Environment variables take precedence over the config file.
Local Development
For local development:
export SPINFORGE_API_URL=http://localhost:9006
export SPINFORGE_WEB_URL=http://localhost:3000
export SPINFORGE_DEPLOYMENTS=/Users/you/.spinforge/deploymentsSupport
License
MIT License - see LICENSE for details.
