Skip to content

Installation

Quick Install

Run this command in your terminal:

Terminal
curl -fsSL https://structyl.akinshin.dev/install.sh | sh

Install Specific Version

Terminal
curl -fsSL https://structyl.akinshin.dev/install.sh | sh -s -- --version 0.1.0

What Gets Installed

The installer creates ~/.structyl/ with:

  • bin/structyl - Version manager shim
  • versions/X.Y.Z/ - Installed binaries
  • default-version - Default version file

Quick Install

Run this command in PowerShell:

PowerShell
irm https://structyl.akinshin.dev/install.ps1 | iex

Install Specific Version

PowerShell
irm https://structyl.akinshin.dev/install.ps1 -OutFile install.ps1 .\install.ps1 -Version 0.1.0

What Gets Installed

The installer creates %USERPROFILE%\.structyl\ with:

  • bin\structyl.cmd - Version manager shim
  • versions\X.Y.Z\ - Installed binaries
  • default-version - Default version file

Install with Go

If you have Go 1.22+ installed:

Terminal
go install github.com/AndreyAkinshin/structyl/cmd/structyl@latest

Install Specific Version

Terminal
go install github.com/AndreyAkinshin/structyl/cmd/structyl@v0.1.0

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:

Terminal
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:

  1. STRUCTYL_VERSION environment variable
  2. .structyl/version file (searches up to root)
  3. ~/.structyl/default-version file
  4. Latest installed version

Nightly Builds

Install the latest development build from the main branch:

Terminal
curl -fsSL https://structyl.akinshin.dev/install.sh | sh -s -- --version nightly

Pin a project to nightly builds:

Terminal
mkdir -p .structyl && echo 'nightly' > .structyl/version

Nightly builds are automatically updated on every push to main. Re-run the install command to update.

Managing Versions

Install Additional Versions

Terminal
curl -fsSL https://structyl.akinshin.dev/install.sh | sh -s -- --version 0.2.0

Set Default Version

Terminal
echo '0.2.0' > ~/.structyl/default-version

List Installed Versions

Terminal
ls ~/.structyl/versions/

Remove a Version

Terminal
rm -rf ~/.structyl/versions/0.1.0

Verify Installation

Terminal
structyl version

Build from Source

Clone and build the project:

bash
git clone https://github.com/AndreyAkinshin/structyl.git
cd structyl
go build -o structyl ./cmd/structyl

Move the binary to a directory in your PATH:

bash
# Linux/macOS
sudo mv structyl /usr/local/bin/

# Or add to your local bin
mv structyl ~/bin/

Upgrading

Check for Updates

bash
structyl upgrade --check

This shows the current CLI version, pinned project version, and latest available version.

Upgrade to Latest

bash
structyl upgrade

This updates the .structyl/version file to the latest stable release. Run the setup script afterward to install:

bash
.structyl/setup.sh    # Linux/macOS
.structyl/setup.ps1   # Windows

Upgrade to Specific Version

bash
structyl upgrade 1.2.3

Nightly Builds

bash
structyl upgrade nightly

Shell Completion

Structyl supports shell completion for bash, zsh, and fish.

Bash

bash
# Add to ~/.bashrc
eval "$(structyl completion bash)"

Zsh

bash
# Add to ~/.zshrc
eval "$(structyl completion zsh)"

Fish

fish
# Add to ~/.config/fish/config.fish
structyl completion fish | source

Alias Support

If you use an alias for structyl, you can enable completion for it in two ways:

Option 1: Generate completion directly for your alias:

bash
# Bash
eval "$(structyl completion bash --alias=st)"

# Zsh
eval "$(structyl completion zsh --alias=st)"

# Fish
structyl completion fish --alias=st | source

Option 2: Add completion for the alias after loading the main completion:

bash
# Bash - add after the eval
complete -F _structyl_completions st

# Zsh - add after the eval
compdef _structyl st

# Fish
complete -c st -w structyl

Next Steps

Now that you have Structyl installed, proceed to the Quick Start guide to create your first project.

Released under the MIT License.