Turborepo 2.8
Turborepo 2.8 is the build system for agentic coding, with features like:
- Git worktree support: Share your local cache across Git worktrees
- Agent Skill: Make any agent a Turborepo expert
- AI-enabled documentation: AI chat, versioned docs, Markdown responses for agents, and more
turbo docs: Search documentation directly from your terminal- Task descriptions: Add context to your task definitions in
turbo.json
As usage of coding agents continues to accelerate, Turborepo will keep innovating to make your workflows faster, locally and remotely. Check out our AI guide to learn how to use AI most effectively in a Turborepo.
Upgrade today by running npx @turbo/codemod migrate or get started with npx create-turbo@latest.
# Use the automated upgrade CLI
pnpm dlx @turbo/codemod migrate
# Start a new repository
pnpm dlx create-turbo@latest# Use the automated upgrade CLI
yarn dlx @turbo/codemod migrate
# Start a new repository
yarn dlx create-turbo@latest# Use the automated upgrade CLI
npx @turbo/codemod migrate
# Start a new repository
npx create-turbo@latest# Use the automated upgrade CLI
bunx @turbo/codemod migrate
# Start a new repository
bunx create-turbo@latestShared cache for Git worktrees
Many developers want to run multiple coding agents in parallel, in the same repository. But how do you keep your agents from getting in each others' way?
Git worktrees are a common technique for this. They allow you to check out multiple branches simultaneously, in separate directories, all sharing the same Git history. However, each worktree would have a new local cache instance, so you would miss cache when creating a new worktree.
Starting with this release, Turborepo now shares the local cache across Git worktrees.
# Create a cache for your task
turbo run build
# Create a worktree and change to its directory
git worktree add -B my-branch ../my-branch && cd ../my-branch
## Run the task again for a full cache hit
turbo run buildCombined with Remote Caching, this can tremendously speed up your agentic coding experience. The feedback loops that you create with your turbo commands can achieve higher cache hit rates, locally and in CI.
No configuration is required. Turborepo will automatically detect when it's running in a worktree and share the local cache.
Agent Skill
Agent Skills are an open standard that give new capabilities and expertise to agents. They're folders of instructions, scripts, and resources that agents can use to do things more accurately and efficiently.
You can now add the Turborepo Skill to your agent, making it an expert in Turborepo and monorepos.
npx skills add vercel/turborepoThe Skill teaches agents best practices for Turborepo, recommendations for monorepos, anti-patterns to avoid, and other important patterns to get the most out of your repository.
Visit our AI guide to learn more.
Improved AI accessibility for our docs
We've retooled this site to enable agents and AI-assisted humans to work more efficiently with Turborepo.
Machine readability for agents
We've improved your agents' ability to fetch docs from our site in a number of ways:
- Markdown responses for agents: By responding with Markdown (instead of HTML), we help to preserve your context window. No configuration or special instructions are required. Run
curl -sL -H "Accept: text/markdown" https://turborepo.dev/repo/docsin your terminal to see an example response. - .md routes: You can also visit a markdown version of any documentation page by appending
.mdto a route. For example, try https://turborepo.dev/docs.md. - /sitemap.md: A machine-readable sitemap is available at https://turborepo.dev/sitemap.md, allowing agents to find out what docs exist.
- Versioned documentation: Starting with version 2.7.6 of Turborepo, versioned docs are now available on subdomains of
turborepo.dev. Visit the 2.7.6 documentation here.
AI interaction for humans
We've improved the docs for AI-assisted humans, too.
- Chat with the docs: We've added an "Ask AI" button to the documentation, so you can chat with a bot that knows every bit of the Turborepo documentation.
- Sample prompts: The docs now include prompts that you can copy for common tasks. You can paste them into your agent directly, and edit them to fit your needs. For an example, see the sample prompt for adding Turborepo to an existing repository.
turbo docs subcommand
You can now search the Turborepo documentation directly from your terminal:
# Search the docs for "package configurations"
turbo docs "package configurations"A list of docs that fit your search query will be printed to your terminal.
Task descriptions
You can now add a description field to your task definitions in turbo.json:
{
"tasks": {
"build": {
"description": "Compiles TypeScript and bundles the application",
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
"test": {
"description": "Runs the test suite with coverage",
"dependsOn": ["build"]
}
}
}Descriptions are purely informational and don't affect task execution. They're useful for providing context for cases like:
- Onboarding: Help new team members understand what each task does
- Documentation: Keep task purposes documented alongside their configuration
- AI tools: Provide context that AI assistants can use to understand your repository
All changes
Acknowledgments and community
Turborepo is the result of the combined work of all of its contributors, including our core team: Anthony and Tom.
Thank you for your continued support, feedback, and collaboration to make Turborepo your build tool of choice. To learn how to get involved, visit the Community page.
We also thank everyone who contributed to this release of Turborepo: @claycurry, @Palid, @leos, @mdlawson, @richhaines, @msebi, @varmac231, and @wantop1.