Skip to content

fix: default to cwd instead of interactive directory prompt#18

Open
parshvadaftari wants to merge 1 commit intoopen-gitagent:mainfrom
parshvadaftari:fix/auto_use_cwd
Open

fix: default to cwd instead of interactive directory prompt#18
parshvadaftari wants to merge 1 commit intoopen-gitagent:mainfrom
parshvadaftari:fix/auto_use_cwd

Conversation

@parshvadaftari
Copy link
Contributor

Summary

  • Remove the interactive Repository path prompt that blocks the CLI when run without --dir or --prompt
  • gitclaw now defaults to process.cwd() immediately, matching modern CLI conventions
  • Remove the now-unused askQuestion helper function

Closes #13

Motivation

Running gitclaw with no flags would block on an interactive prompt asking for the repository path. This was unnecessary since parseArgs() already defaults dir to
process.cwd(), and ensureRepo() handles scaffolding agent.yaml if missing.

Changes

src/index.ts

  • Removed askQuestion() helper (only used by the interactive prompt)
  • Removed the else if branch that triggered the directory prompt when no --dir or --prompt was provided

Test plan

  • gitclaw with no flags — starts immediately without prompting
  • gitclaw --dir /some/path — works as before
  • gitclaw -p "some prompt" — works as before
  • gitclaw --repo <url> — works as before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-use current directory instead of prompting for repository path

1 participant