def test_generate_files_overwrite(agent_folder: Path) -> None:
  """Existing files should be overwritten when generating again."""
  agent_folder.mkdir(parents=True, exist_ok=True)
  (agent_folder / ".env").write_text("OLD")

  cli_create._generate_files(
      str(agent_folder),
      google_api_key="new-key",
      model="gemini-2.0-flash-001",
  )

  assert "GOOGLE_API_KEY=new-key" in (agent_folder / ".env").read_text()
Existing files should be overwritten when generating again.
tests/unittests/cli/utils/test_cli_create.py