@cocobean-ai/cli
v0.4.0
Published
CLI for deploying static sites, serverless functions, and container apps to cocobean.ai
Readme
Preview Service CLI
Deploy your React, Vue, and Next.js apps to user-spa.com with a single command.
Installation
npm install
npm link # Optional: makes 'preview-cli' available globallyConfiguration
The CLI uses the production API by default (https://aiswforge.com/api/spa-deploy).
For local development:
cp .env.example .env
# Edit .env and set DEPLOY_API=http://localhost:4005Usage
Deploy a built app
# Deploy a directory
preview-cli deploy ./build
# Deploy with custom project/user IDs
preview-cli deploy ./build -p my-project -u user123
# Deploy a zip file
preview-cli deploy ./app.zipList deployments
preview-cli listDelete a deployment
preview-cli delete happy-panda-x7k9Use custom API endpoint
# Via command line option
preview-cli deploy ./build --api http://localhost:4005
# Via environment variable
DEPLOY_API=http://localhost:4005 preview-cli deploy ./buildExample Workflow
- Build your React app:
npm run build- Deploy it:
preview-cli deploy ./build- Get your URL:
✔ Deployment successful!
Deployment Details:
ID: happy-panda-x7k9
URL: https://happy-panda-x7k9.user-spa.com
Files: 15
Size: 1.52 MB
Framework: reactSupported Frameworks
- ✅ React (with BrowserRouter or HashRouter)
- ✅ Vue.js
- ✅ Next.js (static export)
- ✅ Any static HTML/JS/CSS
Important Notes
- Build with relative paths: Add
"homepage": "."to your package.json - Client-side routing: The service handles SPA routing automatically
- HTTPS only: All deployments are served over HTTPS
- Unique subdomains: Each deployment gets a memorable subdomain
