Skip to content

Languages

Cascade ships with eight built-in language profiles. Each profile bundles the conventions, tooling, and LLM guidance for that language. The pipeline reads the profile and adapts.

LanguageDetectionTest command
Pythonpyproject.toml, setup.py, requirements.txtpytest
TypeScripttsconfig.jsonnpx vitest run
JavaScriptpackage.jsonnpx vitest run
Gogo.modgo test ./...
RustCargo.tomlcargo test
Javapom.xml, build.gradlemvn test
RubyGemfile, Rakefilebundle exec rspec
C#*.csproj, *.slndotnet test

When you run a Cascade command, the language is resolved in this order:

  1. Explicit override in cascade.yaml (language: go)
  2. CLI flag (--language rust)
  3. Auto-detection from marker files in the repo root

Polyglot repos: the highest-priority profile wins. So a repo with both pyproject.toml (Python, priority 60) and go.mod (Go, priority 90) is detected as Go. If that’s wrong for your project, set language explicitly in cascade.yaml.

  • file_extensions: which extensions Cascade considers part of the language
  • source_dir_default: where new source files go (src for Python, . for Go)
  • test_dir_default: where tests go (tests for Python, . for Go inline)
  • test_file_glob: how test files are named (test_*.py, *_test.go)
  • test_command: what runs to validate generated code
  • install_command: how to install dependencies
  • type_check_command: optional type check before running tests
  • detection_files: marker files that identify this language
  • notes_for_llm: language-specific guidance passed to the LLM in prompts

A new language is one entry in src/cascade/languages.py:

KOTLIN = LanguageProfile(
name="kotlin",
display_name="Kotlin",
file_extensions=(".kt", ".kts"),
source_dir_default="src/main/kotlin",
test_dir_default="src/test/kotlin",
test_file_glob="*Test.kt",
test_command=("gradle", "test"),
install_command=("gradle", "build", "-x", "test"),
type_check_command=None,
formatter_command=("ktlint", "--format"),
detection_files=("build.gradle.kts", "settings.gradle.kts"),
detection_priority=75,
notes_for_llm=(
"Idiomatic Kotlin: prefer val over var, use data classes, "
"use expressions over statements. Tests with JUnit 5 + MockK."
),
)

Add it to the PROFILES registry and submit a PR. That’s it.