Installation
Quick Install
Run this command in your terminal:
curl -fsSL https://structyl.akinshin.dev/install.sh | shInstall Specific Version
curl -fsSL https://structyl.akinshin.dev/install.sh | sh -s -- --version 0.1.0What Gets Installed
The installer creates ~/.structyl/ with:
bin/structyl- Version manager shimversions/X.Y.Z/- Installed binariesdefault-version- Default version file
Quick Install
Run this command in PowerShell:
irm https://structyl.akinshin.dev/install.ps1 | iexInstall Specific Version
irm https://structyl.akinshin.dev/install.ps1 -OutFile install.ps1
.\install.ps1 -Version 0.1.0What Gets Installed
The installer creates %USERPROFILE%\.structyl\ with:
bin\structyl.cmd- Version manager shimversions\X.Y.Z\- Installed binariesdefault-version- Default version file
Install with Go
If you have Go 1.22+ installed:
go install github.com/AndreyAkinshin/structyl/cmd/structyl@latestInstall Specific Version
go install github.com/AndreyAkinshin/structyl/cmd/[email protected]Note: Go install doesn't support version pinning. For multi-version management, use the binary installer instead.
Version Pinning
Pin a project to a specific Structyl version by creating a .structyl/version file:
mkdir -p .structyl && echo '0.1.0' > .structyl/version The shim automatically detects this file and uses the specified version. This works from any subdirectory in your project. For new projects, running structyl init creates this file automatically.
Version Resolution
When you run structyl, the version is resolved in this order:
STRUCTYL_VERSIONenvironment variable.structyl/versionfile (searches up to root)~/.structyl/default-versionfile- Latest installed version
Nightly Builds
Install the latest development build from the main branch:
curl -fsSL https://structyl.akinshin.dev/install.sh | sh -s -- --version nightlyPin a project to nightly builds:
mkdir -p .structyl && echo 'nightly' > .structyl/versionNightly builds are automatically updated on every push to main. Re-run the install command to update.
Managing Versions
Install Additional Versions
curl -fsSL https://structyl.akinshin.dev/install.sh | sh -s -- --version 0.2.0Set Default Version
echo '0.2.0' > ~/.structyl/default-versionList Installed Versions
ls ~/.structyl/versions/Remove a Version
rm -rf ~/.structyl/versions/0.1.0Verify Installation
structyl versionBuild from Source
Clone and build the project:
git clone https://github.com/AndreyAkinshin/structyl.git
cd structyl
go build -o structyl ./cmd/structylMove the binary to a directory in your PATH:
# Linux/macOS
sudo mv structyl /usr/local/bin/
# Or add to your local bin
mv structyl ~/bin/Upgrading
Check for Updates
structyl upgrade --checkThis shows the current CLI version, pinned project version, and latest available version.
Upgrade to Latest
structyl upgradeThis updates the .structyl/version file to the latest stable release. Run the setup script afterward to install:
.structyl/setup.sh # Linux/macOS
.structyl/setup.ps1 # WindowsUpgrade to Specific Version
structyl upgrade 1.2.3Nightly Builds
structyl upgrade nightlyShell Completion
Structyl supports shell completion for bash, zsh, and fish.
Bash
# Add to ~/.bashrc
eval "$(structyl completion bash)"Zsh
# Add to ~/.zshrc
eval "$(structyl completion zsh)"Fish
structyl completion fish | sourceNext Steps
Now that you have Structyl installed, proceed to the Quick Start guide to create your first project.