Pitcrew Documentation

Learn the language, explore the standard library, and see real-world examples.

$ curl -fsSL https://pitcrew.io/install | sh

Getting Started

Quick Start

Create a file called hello.pit and run it:

// hello.pit
print("Hello from pitcrew!")

// Run a shell command
hostname := `hostname`
print("Running on", hostname)
$ pit run hello.pit
Hello from pitcrew!
Running on macbook.local

Run code on a remote host over SSH:

fn uptime() string {
  `uptime`
}

result := ssh uptime(), host: "my-server.com", user: "deploy"
print(result)

Standard Library

Pitcrew ships with modules for file I/O, networking, cloud providers, package management, and more. Browse the full reference →

Examples

Real-world scripts you can read, adapt, and run.

hello.pit
Minimal hello world
ssh.pit
Run commands over SSH
deploy-node.pit
Deploy a Node.js app
rolling-deploy.pit
Zero-downtime rolling deploy
nginx-proxy.pit
Set up nginx reverse proxy
postgres-replication.pit
Configure Postgres replication
secrets.pit
Encrypt and manage secrets
publish-website.pit
Deploy a site to S3 + CloudFront

Key Concepts

fn

Static Types

Every variable, argument, and return value has a type checked at compile time. No runtime surprises.

ssh

SSH as a Keyword

The compiler understands execution boundaries. Code inside ssh blocks runs on the remote host.

!

Error Types

Functions declare errors in their signature with !. Callers must catch or propagate.

|>

Pipes & Blocks

Chain operations left-to-right with |>. Use map blocks for data transformation.