!git.name
The !git.name Atmos YAML function returns the bare name of the current Git repository —
for example, atmos. The value is derived from the origin remote URL and works for GitHub,
GitLab, Bitbucket, and Azure DevOps.
Availability and evaluation
Supported locations:
- CLI configuration (
atmos.yaml,atmos.d, and profiles): during configuration loading. - Resolved stack values: after inheritance, merging, and component template processing.
- Scaffold manifests: during manifest loading.
Automatic evaluation requires native YAML tags from edition 2026-10-20, including unpinned projects. Quoted function strings remain literal; earlier editions retain legacy string-form behavior.
See YAML function scope for field restrictions, import timing, and native tags versus quoted strings.
Usage
# Get the bare repository name.
# If the repository cannot be resolved, it returns a default value if specified; otherwise, it returns an error.
!git.name <default-value>
Examples
vars:
git_name: !git.name
# With a fallback value when there is no remote.
git_name_safe: !git.name my-repo
Related Functions
!git.repository— the full<owner>/<name>slug!git.owner— the repository owner / organization!git.host— the repository host (e.g.github.com)!git.url— the remote URL!git.sha— the current commit SHA