Run Atmos from Any Subdirectory
· 2 min read
Atmos now automatically discovers your repository root and runs from there, just like Git. No more cd-ing back to the root directory.
The Git-Like Behavior
If you've used Git, you know you can run git status from any subdirectory in your repository, and Git automatically finds the repository root. Atmos now works the same way.
Before:
cd components/terraform/vpc
atmos terraform plan vpc -s prod
# Error: Could not find atmos.yaml
cd ../../..
atmos terraform plan vpc -s prod # Now it works
Now:
cd components/terraform/vpc
atmos terraform plan vpc -s prod # Just works
How It Works
When you run Atmos from a subdirectory:
- Atmos detects you're in a Git repository
- It finds the repository root (where
.gitlives) - It uses that as the base path for all operations
- Your
atmos.yamlat the repository root is found automatically
Just like Git, Atmos walks up the directory tree to find the repository root.
