trace $CLI bundle init experimental-jobs-as-code --config-file ./input.json --output-dir output

cd output/my_jobs_as_code

# silence uv output because it's non-deterministic
uv sync 2> /dev/null

# remove version constraint because it always creates a warning on dev builds
cat databricks.yml | grep -v databricks_cli_version > databricks.yml.new
mv databricks.yml.new databricks.yml

trace $CLI bundle validate -t dev --output json | jq ".resources"

rm -fr .venv resources/__pycache__ uv.lock my_jobs_as_code.egg-info
