A command-line interface for managing the full lifecycle of LessVM applications on Solana.
curl -L https://github.com/openSVM/lessvm/releases/latest/download/lessvm-installer.sh | sh
irm https://github.com/openSVM/lessvm/releases/latest/download/lessvm-installer.ps1 | iex
brew tap openSVM/lessvm
brew install lessvm
Download the appropriate binary for your platform from the releases page.
# For Intel Macs
curl -L https://github.com/openSVM/lessvm/releases/latest/download/lessvm-x86_64-apple-darwin.tar.xz | tar xJ
sudo mv lessvm /usr/local/bin/
# For Apple Silicon (M1/M2) Macs
curl -L https://github.com/openSVM/lessvm/releases/latest/download/lessvm-aarch64-apple-darwin.tar.xz | tar xJ
sudo mv lessvm /usr/local/bin/
# For x86_64 architecture
curl -L https://github.com/openSVM/lessvm/releases/latest/download/lessvm-x86_64-unknown-linux-gnu.tar.xz | tar xJ
sudo mv lessvm /usr/local/bin/
# For ARM64 architecture
curl -L https://github.com/openSVM/lessvm/releases/latest/download/lessvm-aarch64-unknown-linux-gnu.tar.xz | tar xJ
sudo mv lessvm /usr/local/bin/
cargo install lessvm
lessvm [OPTIONS] <COMMAND>
-v, --verbose
: Enable verbose logging-h, --help
: Show help information-V, --version
: Show version information
lessvm new <NAME> [--template <TEMPLATE>]
Creates a new LessVM project with the specified name. Optionally specify a template (default: basic).
lessvm build [--path <PATH>]
Builds the LessVM application, compiling and optimizing the code for deployment.
lessvm deploy [--path <PATH>] [--cluster <CLUSTER>]
Deploys the built application to the specified Solana cluster (default: devnet).
lessvm status [--path <PATH>]
Checks the deployment status of the application.
lessvm update [--path <PATH>] [--hot-reload]
Updates the deployed application. Use --hot-reload
for hot reloading when possible.
lessvm logs [--path <PATH>] [--follow]
Views application logs. Use --follow
to stream logs in real-time.
A typical LessVM project has the following structure:
my-lessvm-app/
├── src/
│ └── main.less # Main application code
├── tests/
│ └── main_test.less # Test files
├── build/ # Build artifacts
└── lessvm.toml # Project configuration
The lessvm.toml
file contains project configuration:
[project]
name = "my-app"
version = "0.1.0"
template = "basic"
[solana]
cluster = "devnet"
program_id = "optional-deployed-program-id"
keypair_path = "~/.config/solana/id.json"
[build]
target = "solana"
optimization_level = "release"
To build the CLI tool from source:
git clone https://github.com/openSVM/lessvm
cd lessvm/cli
cargo build --release
This project uses cargo-dist to automate the release process. To create a new release:
-
Update version in
Cargo.toml
-
Tag a new version:
git tag -a v0.1.1 -m "Release v0.1.1" git push origin v0.1.1
-
GitHub Actions will automatically:
- Build binaries for all supported platforms
- Create installers (shell script, PowerShell script, Homebrew)
- Generate release artifacts
- Create a GitHub release
- Publish to package managers
To test the release process locally:
cd cli
cargo dist build --artifacts=all --target=<your-platform>
MIT License