Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Settings

The [project] and [source] sections define project metadata and control which files Batuta processes.

[project] Section

[project]
name = "my-project"
description = "A Python ML pipeline migrated to Rust"
primary_language = "Python"
authors = ["Alice <alice@example.com>", "Bob <bob@example.com>"]
license = "MIT"
KeyTypeDefaultDescription
namestring"untitled"Project name used in generated Cargo.toml and reports
descriptionstring(none)Optional project description
primary_languagestring(none)Primary source language (Python, C, Shell, Rust)
authorsarray[]List of author strings
licensestring"MIT"SPDX license identifier

When you run batuta init, the name is inferred from the directory name and primary_language is detected by file extension analysis.

[source] Section

[source]
path = "."
exclude = [".git", "target", "build", "dist", "node_modules", "__pycache__", "*.pyc", ".venv", "venv"]
include = []
KeyTypeDefaultDescription
pathstring"."Root directory for source analysis (relative to config file)
excludearraySee belowGlob patterns for files and directories to skip
includearray[]Glob patterns that override exclude rules

Default Exclude Patterns

The following patterns are excluded by default to skip build artifacts, virtual environments, and version control metadata:

  • .git, target, build, dist
  • node_modules, __pycache__, *.pyc
  • .venv, venv

Include Overrides

The include array takes precedence over exclude. Use it to pull specific files back into scope.

[source]
exclude = ["tests"]
include = ["tests/integration"]  # Keep integration tests, skip unit tests

Workspace Configuration

For monorepo or multi-crate projects, set path to the workspace root and use exclude to skip directories that should not be transpiled.

[source]
path = "."
exclude = [".git", "target", "docs", "scripts", "infra"]

Batuta traverses the source tree recursively from path, respecting the exclude and include filters at every level.


Navigate: Table of Contents