<!--
title: ensure cross-platform compatibility
domain: devtools
topic: Configurations
language: Toml
source: jj-vcs/jj
updated: 2025-09-14
url: https://awesomereviewers.com/reviewers/jj-ensure-cross-platform-compatibility/
-->

{% raw %}
When creating configuration files and build tasks, prioritize cross-platform compatibility by avoiding shell-specific syntax and considering how tools discover their configuration files across different environments.

Key considerations:
- Avoid shell-specific commands that may not work on Windows (e.g., complex piping with xargs)
- Consider how tools locate configuration files - some tools search parent directories automatically while others require explicit paths
- Test configuration discovery from different working directories, not just the project root
- Document platform limitations when unavoidable

Example from mise configuration:
```toml
[tasks."check:codespell"]
description = "Check code for common misspellings"
tools.uv = "{{vars.uv_version}}"
# Good: Uses tool that auto-discovers config, works cross-platform
run = "uv run codespell"

# Avoid: Shell-specific syntax that breaks on Windows
# run = "jj file list | xargs mise run codespell"
```

This approach ensures your development environment works consistently for all team members regardless of their operating system, reducing setup friction and debugging time spent on platform-specific issues.
{% endraw %}
