Documentation Index
Fetch the complete documentation index at: https://docs.blocks.team/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Post-clone scripts run automatically after Blocks clones your repository into the sandbox, before the coding agent starts working. Use them to install dependencies, set up tooling, or run any initialization commands your project needs.Creating a post-clone script
- Create a
.blocksdirectory in your repository root - Add a file named
post-cloneorpost-clone.sh - Make it executable:
chmod +x .blocks/post-clone
apt-get.
Always start with
set -e. Without it, the agent continues even if setup fails, which leads to confusing errors mid-task.Common use cases
- Install dependencies
- Install a runtime
- Install a custom binary
- Install system packages
Best practices
Check before installing — make scripts idempotent so they run cleanly every session:npm ci over npm install for faster, reproducible installs.
Add PATH exports to ~/.bashrc — binaries installed to custom paths need to be on PATH for the agent to find them.
Log progress — echo statements make it easy to spot where a script stalls.

