feat(cli): auto-detect project root by walking up for Cargo.toml#174
Merged
rocketman-code merged 4 commits intomainfrom Feb 28, 2026
Merged
feat(cli): auto-detect project root by walking up for Cargo.toml#174rocketman-code merged 4 commits intomainfrom
rocketman-code merged 4 commits intomainfrom
Conversation
208f3a1 to
721db29
Compare
This was referenced Feb 28, 2026
3a85da8 to
84f5a82
Compare
84f5a82 to
eabb365
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
find_project_root()that walks up from CWD looking forCargo.toml, matching cargo's project discovery behavior--projectflag onbuildandprofilefrom defaulting to.to auto-detecting viafind_project_root()(explicit--projectstill overrides)default_runs_dir(),default_tags_dir(), andfind_latest_binary()to resolve paths relative to the discovered project root instead of CWDAll piano commands (
build,run,profile,report,diff,tag) now work from any subdirectory within a Rust project.Closes #135
Closes #85
Test plan
find_project_root(project dir, subdirectory, nested subdirectory, error case)piano buildfromsrc/subdirectory without--projectpiano reportfromsrc/subdirectory withoutPIANO_RUNS_DIRpiano runfromsrc/subdirectory--projectexplicitly still work)