馃敶 Required Information
Is your feature request related to a specific problem?
Yes. adk create now creates or updates an agent-level .gitignore, but it only adds .env.
When local storage is enabled, ADK creates runtime data inside the agent directory, including .adk/session.db and .adk/artifacts/. Because .adk/ is not included in the generated .gitignore, these local session databases and artifacts can be committed accidentally.
Describe the Solution You'd Like
Have adk create add both .env and .adk/ to the generated agent-level .gitignore.
The existing behavior should remain idempotent:
- Preserve existing
.gitignore entries.
- Add missing generated-file entries.
- Do not duplicate entries that already exist.
Impact on your work
This would make newly scaffolded agents safer and cleaner by default. It would prevent local runtime state, SQLite session data, and generated artifacts from appearing as untracked files or being committed accidentally.
There is no specific deadline.
Willingness to contribute
Yes. I am interested in submitting a PR.
馃煛 Recommended Information
Describe Alternatives You've Considered
Users can add .adk/ manually or configure a global Git ignore file. However, every generated agent can create this ADK-specific runtime directory, so handling it in the scaffold is more reliable and discoverable.
Proposed API / Implementation
A newly generated .gitignore would contain:
The current helper that ensures .env is ignored could be generalized to manage all default generated ignore entries. Unit tests should cover new files, existing files, missing entries, newline handling, and duplicate prevention.
Additional Context
PR #5427 added the current behavior that creates or updates .gitignore with .env. This request extends that safety behavior to ADK's local runtime data.
馃敶 Required Information
Is your feature request related to a specific problem?
Yes.
adk createnow creates or updates an agent-level.gitignore, but it only adds.env.When local storage is enabled, ADK creates runtime data inside the agent directory, including
.adk/session.dband.adk/artifacts/. Because.adk/is not included in the generated.gitignore, these local session databases and artifacts can be committed accidentally.Describe the Solution You'd Like
Have
adk createadd both.envand.adk/to the generated agent-level.gitignore.The existing behavior should remain idempotent:
.gitignoreentries.Impact on your work
This would make newly scaffolded agents safer and cleaner by default. It would prevent local runtime state, SQLite session data, and generated artifacts from appearing as untracked files or being committed accidentally.
There is no specific deadline.
Willingness to contribute
Yes. I am interested in submitting a PR.
馃煛 Recommended Information
Describe Alternatives You've Considered
Users can add
.adk/manually or configure a global Git ignore file. However, every generated agent can create this ADK-specific runtime directory, so handling it in the scaffold is more reliable and discoverable.Proposed API / Implementation
A newly generated
.gitignorewould contain:The current helper that ensures
.envis ignored could be generalized to manage all default generated ignore entries. Unit tests should cover new files, existing files, missing entries, newline handling, and duplicate prevention.Additional Context
PR #5427 added the current behavior that creates or updates
.gitignorewith.env. This request extends that safety behavior to ADK's local runtime data.