Skip to content

rahilsk203/gitauto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

gitAuto

A Node.js CLI tool that makes GitHub repository management easy.

NPM Version License

πŸš€ Quick Start

# Install globally
npm install -g @rahilsk/gitauto

# Run anywhere in your terminal
gitauto

πŸ”§ Automatic Git Configuration

gitAuto now automatically checks and configures your Git settings before running any commands. If your Git username or email isn't configured, it will prompt you to enter them:

? Enter your Git username: your-username
? Enter your Git email: your-email@example.com

This works across all platforms including Windows, macOS, Linux, and Termux (Android).

What is gitAuto?

If you've ever felt overwhelmed by Git commands or found yourself repeating the same GitHub tasks over and over, gitAuto is for you. It's a simple command-line tool that takes care of the tedious parts of working with Git and GitHub.

Instead of remembering complex commands like git push origin main or git checkout -b feature-branch, you just run gitauto and follow the menu prompts. It handles authentication, repository creation, branch management, and more - all without you needing to remember any commands.

Why Use gitAuto?

Let's be honest - working with Git can be frustrating:

  • Creating a new repository means going to GitHub.com, creating it there, then cloning it locally
  • Remembering the right commands for different situations
  • Dealing with authentication tokens
  • Handling merge conflicts and errors

gitAuto simplifies all of this:

βœ… Create repositories with a single menu option
βœ… Automatic authentication through GitHub CLI
βœ… Smart suggestions based on your repository's current state
βœ… Clear error messages that actually help you fix problems
βœ… Works on Windows, Mac, Linux, and even Android (Termux)

πŸ“‹ What Can It Do?

Here's what you can do with gitAuto:

Repository Management

  • Create new GitHub repositories automatically
  • Clone existing repositories
  • Delete repositories (carefully!)

Daily Git Tasks

  • Push your changes with one click
  • Pull the latest updates
  • View your commit history
  • Check repository status

Smart Features

  • Analytics Dashboard: See commit counts, branch info, and contributor stats
  • Smart Suggestions: Get helpful tips like "You have uncommitted changes" or "Your branch is behind remote"
  • Automatic Conflict Resolution: Handles those annoying "non-fast-forward" errors automatically
  • Smart Error Resolver: Automatically detects and fixes common Git issues
  • Automatic Git Configuration: Checks and configures your Git username and email automatically

Advanced Features

  • Work with multiple repositories at once
  • Monitor performance and execution times
  • Handle over 100 different error scenarios gracefully
  • DSA-level optimizations for faster performance

πŸ› οΈ Installation

Easy Way (Recommended)

# Install globally so you can use it anywhere
npm install -g @rahilsk/gitauto

# Check if it worked
gitauto --version

From Source (For Developers)

# Get the code
git clone https://github.com/rahilsk203/gitAuto.git
cd gitAuto

# Install dependencies
npm install

# Run it
node index.js

🎯 Getting Started

First Time Setup

When you first run gitauto, it will:

  1. Check if you have Git and GitHub CLI installed (installs them if missing)
  2. Check and configure your Git username and email (prompts you if missing)
  3. Log you into GitHub through your browser
  4. Show you a menu of options

That's it! No manual configuration needed.

Using gitAuto

Just run gitauto from any directory:

gitauto

The tool will automatically show you different options depending on whether you're in a Git repository or not.

In a Git repository: You'll see options for pushing, pulling, viewing status, etc.

Outside a Git repository: You'll see options for creating or cloning repositories.

🧠 Smart Error Resolver

gitAuto now includes an intelligent error resolver that automatically detects and fixes common Git issues:

What it can fix:

  • Git index lock issues
  • Repository initialization problems
  • Permission errors
  • Large file handling
  • Corrupted Git index
  • Merge conflicts
  • Branch configuration issues
  • Authentication problems
  • Network connectivity issues
  • Git configuration errors
  • Remote repository issues
  • Disk space problems

How it works:

When gitAuto encounters an error during any Git operation, it automatically analyzes the error message and attempts to resolve it. If a fix is available, it applies the fix and retries the operation. If not, it falls back to detailed error explanations and suggestions.

This feature makes gitAuto much more resilient and user-friendly, especially for beginners who might encounter common Git issues.

πŸ“± Android Support (Termux)

Yes, gitAuto works on Android! Install it in Termux:

# Install Node.js in Termux
pkg install nodejs -y

# Install gitAuto
npm install -g @rahilsk/gitauto

# Run it
gitauto

It will automatically handle installing Git and GitHub CLI through Termux's package manager. Fixed in v1.6.2 to properly detect Termux environments and use the pkg package manager for dependency installation.

πŸ€” Common Questions

Do I need to know Git commands?

Not really! gitAuto handles the complex Git commands for you. However, understanding basic Git concepts (commits, branches, pushing/pulling) will help you use it more effectively.

Is my code safe?

Yes. gitAuto only automates standard Git operations. It doesn't delete your code or make changes without asking first. When potentially destructive operations are needed (like force pushing), it asks for your permission.

What if something goes wrong?

gitAuto has built-in error handling for over 100 common Git scenarios. When errors occur, it explains what went wrong in plain English and suggests how to fix it.

Does it work offline?

You need an internet connection for GitHub operations (creating repositories, pushing, pulling), but you can still view local repository information and status offline.

πŸ§ͺ Development

Want to contribute or modify gitAuto?

Setting Up

# Get the code
git clone https://github.com/rahilsk203/gitAuto.git
cd gitAuto

# Install dependencies
npm install

# Run it
node index.js

Project Structure

gitAuto/
β”œβ”€β”€ index.js          # Main entry point
β”œβ”€β”€ package.json      # Project info and dependencies
β”œβ”€β”€ README.md         # This file
β”œβ”€β”€ lib/              # Core functionality
β”‚   β”œβ”€β”€ auth.js       # GitHub authentication
β”‚   β”œβ”€β”€ git.js        # Git command handling
β”‚   β”œβ”€β”€ github.js     # GitHub API interactions
β”‚   β”œβ”€β”€ menu.js       # Interactive menus
β”‚   └── core.js       # Shared utilities
β”œβ”€β”€ test/             # Automated tests
└── scripts/          # Build tools

πŸ†˜ Troubleshooting

Common Issues

"GitHub CLI not found": gitAuto will try to install it automatically. If that fails, install it manually from https://cli.github.com/

"Authentication failed": Make sure you can access GitHub in your browser, then run gh auth login

"Permission denied": On Windows, try running your terminal as Administrator

"Slow performance": Check your internet connection or try clearing caches through the menu

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

SKRahil
Full-Stack Developer & AI Enthusiast

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors