simplecloud
v0.0.1-beta.38
Published
simplecloud.app cli
Downloads
1,852
Readme
SimpleCloud CLI
A command-line interface tool for SimpleCloud.
Development
Prerequisites
- Node.js >= 18.0.0
- Bun (for development)
Setup
Install dependencies:
bun installDevelopment
Development Watcher (Recommended)
Run with automatic rebuilding on file changes:
bun run devThis will:
- 🔧 Start a file watcher
- 📁 Watch all
.tsfiles insrc/ - 🔄 Automatically rebuild
dist/on changes - ⚡ Debounced builds (300ms delay)
- 🛑 Stop with
Ctrl+C
Local Package Testing
Create a local package file for testing:
bun run local:pack # Creates temp/simplecloud.tgz (no version in filename)Building
Build the CLI for distribution:
bun run buildThis creates optimized, minified bundles in the dist/ folder that include all dependencies.
Testing
Test the built CLI:
bun run test:cliTest specific commands:
node dist/cli.js --help
node dist/cli.js start group testLocal Development
Option 1: Shell Alias (Recommended - No Conflicts)
Create a local scl alias that points to your development build:
bun run local:setup # Creates 'scl' alias in ~/.zshrc
source ~/.zshrc # Reload shell configNow you can use scl for local testing without conflicting with published versions:
scl --help # Local development
scl start group mygroupPro Tip: Run bun run dev in one terminal and use scl commands in another terminal for seamless development with auto-rebuilding!
Option 2: npm link (Development Symlink)
Creates symlinks to global npm location (uses same command names):
bun run local:link # Link for development
bun run local:unlink # Unlink when doneOption 3: Direct Execution
Run the built CLI directly:
bun run build
node dist/cli.js --help
node dist/cli.js start group mygroupGenerating API
bunx swagger-typescript-api generate -p swagger.yaml -o src/lib/generated -n simplecloud-api.ts --sort-types --single-http-client --clean-outputPublishing to npm
- Update the version in
package.json - Update author, repository, and other metadata fields
- Ensure you're logged into npm:
npm login - Publish:
npm publish
The prepublishOnly script will automatically build the project before publishing.
