sitevision-cli
v0.1.1
Published
This CLI was largely built on the back of the [sitevision-scripts](https://github.com/sitevision/sitevision-scripts) project. However, these scripts have some limitations: - Clunky for use with environments requiring signed packages - Clunkly management o
Readme
Sitevision CLI
This CLI was largely built on the back of the sitevision-scripts project. However, these scripts have some limitations:
- Clunky for use with environments requiring signed packages
- Clunkly management of credentials and unsecure handling of credentials
- No type safety
Features
- Interactive Menu - Full-screen TUI with arrow key navigation
- Project Detection - Automatically detects Sitevision projects
- Two Modes - Interactive menu OR direct command execution
- Automatic Setup - Guided setup for dev properties and signing credentials
- Secure Credentials - Passwords can be entered per-session (not stored on disk)
Install
npm install --global sitevision-cliUsage
The CLI must be run inside a Sitevision project directory (containing a manifest.json).
Interactive Mode
Simply run svc to launch the interactive menu:
svcOn first run (or if setup is incomplete), the CLI will:
- Check if
node_modulesexists and offer to runnpm installif missing - Check if dev properties are configured and offer to set them up if missing
- Check if you have setup signing credentials and offer to do so if missing
- Display project information
- Show the main menu
Use arrow keys to navigate and Enter to select:
- Dev - Start development server with watch mode
- Dev (Signed) - Development with automatic signing before each deploy
- Build - Build a dist bundle
- Sign - Sign built dist bundle
- Deploy - Deploy to configured development environment
- Deploy (Force) - Force deploy (overwrite existing)
- Deploy Production - Deploy signed app to configured production environment
- Info - Show project info
- Exit
Direct Commands
You can also run commands directly:
Development
# Start development server with watch mode
svc dev
# Start development server with automatic signing
svc dev --signedBuilding
# Build the application for production
svc buildSigning
# Sign the app for production deployment
svc signDeployment
# Deploy to development server
svc deploy
# Force deploy (overwrite existing)
svc deploy --force
# Deploy to production (requires signed app)
svc deploy --productionSetup
# Configure signing credentials
svc setup-signingProject Info
# Show project information and configuration
svc infoConfiguration
Development Properties (.dev_properties.json)
Create this file in your project root for deployment configuration:
{
"domain": "your-site.sitevision.se",
"siteName": "YourSite",
"addonName": "your-addon",
"username": "[email protected]",
"password": "",
"useHTTPForDevDeploy": false,
"signingUsername": "[email protected]",
"certificateName": "optional-certificate-name"
}Note: You can leave password empty - the CLI will prompt for it securely at runtime and store it in session memory only.
Signing Credentials
Signing credentials are used to sign apps via developer.sitevision.se:
signingUsername- Your developer.sitevision.se accountcertificateName- Optional, if you have multiple certificates
The signing password is never stored on disk - it's prompted for each session.
License
MIT
