Skip to content

Installation

This chapter covers installing and verifying Shape locally.

If Rust is not installed:

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

The recommended setup is to install both the CLI and the LSP:

Terminal window
cargo install shape-cli
cargo install shape-lsp

This installs:

  • shape - CLI, runner, and REPL entrypoint
  • shape-lsp - language server for editor integration

Verify both binaries:

Terminal window
shape --version
shape-lsp --version

The LSP is picked up automatically by editors with Shape support:

For development or the latest unreleased features:

Terminal window
git clone https://github.com/shape-lang/shape
cd shape
cargo build --workspace --release

The binary will be at target/release/shape.

The LSP binary will be at target/release/shape-lsp.

Shape extensions add language runtime integrations (Python, TypeScript, etc.). Install them with shape ext:

Terminal window
shape ext install python
shape ext install typescript

This downloads the extension crate from crates.io, compiles it for your platform, and installs the shared library to ~/.shape/extensions/. Extensions are automatically detected by both the CLI and LSP — no additional configuration needed.

Manage installed extensions:

Terminal window
shape ext list # show installed and available extensions
shape ext remove python # uninstall an extension

Create hello.shape:

fn main() {
print("hello from shape")
}
main()

Run it:

Terminal window
shape run hello.shape

Expected output:

hello from shape

Or test an expression directly:

let x = 10
let y = 20
print(x + y) // 30

Continue with Your First Program.