Skip to content

feat(cli): Add checking for git and gh CLI tools in GitHub mode #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 12, 2025

Conversation

bhouston
Copy link
Member

This PR implements issue #217 to check for git and gh CLI tools when GitHub mode is enabled.

Changes

  • Enable GitHub mode by default in options.ts
  • Check for git and gh CLI tools when GitHub mode is enabled
  • Disable GitHub mode if required tools are not available or not authenticated
  • Update README.md with information about the new behavior
  • Update tsconfig.json to exclude test files from build

Implementation Details

When GitHub mode is enabled, the CLI now:

  1. Checks if git CLI is available
  2. Checks if gh CLI is available
  3. If gh CLI is available, checks if it's authenticated
  4. If any of these checks fail, warns the user and disables GitHub mode

This ensures that users are informed about missing requirements and prevents errors when trying to use GitHub features without the necessary tools.

Closes #217

Implements a utility function to check if git and gh CLI tools are available
and if gh is authenticated when GitHub mode is enabled.

- Created gitCliCheck.ts utility with functions to check git/gh availability
- Added warning messages when GitHub mode is enabled but tools are missing
- Added unit tests for the new functionality

Fixes #217
Closes #217

- Enable GitHub mode by default
- Add automatic checking for git and gh CLI tools when GitHub mode is enabled
- Disable GitHub mode if required tools are not available or not authenticated
- Update README.md with information about the new behavior
- Update tsconfig.json to exclude test files from build
@bhouston bhouston merged commit f5e19ff into main Mar 12, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-v1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If githug mode is enabled, ensure that gh and git cli commands exist on the shell, otherwise warn.
1 participant