{"_id":"@captain-job/auto-repo","_rev":"3-4da34548f1d6d3adf3d10a527b1b25c3","name":"@captain-job/auto-repo","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@captain-job/auto-repo","version":"1.0.0","keywords":["cli","git","github","automation"],"author":{"name":"Job Kiptoo"},"license":"MIT","_id":"@captain-job/auto-repo@1.0.0","maintainers":[{"name":"captain-job","email":"kiptoojob73@gmail.com"}],"homepage":"https://github.com/job-kiptoo-dev/auto-repo#readme","bugs":{"url":"https://github.com/job-kiptoo-dev/auto-repo/issues"},"bin":{"auto-repo":"scripts/auto-repo.js"},"dist":{"shasum":"6b3b24a98714ccb44a53c5989b5afdc4234d9732","tarball":"https://registry.npmjs.org/@captain-job/auto-repo/-/auto-repo-1.0.0.tgz","fileCount":2,"integrity":"sha512-7hZY2/H1AP+oeG6ux6a2WX8ji76GJnYhB2r5C91k7Oj+j0IGajJjpafYVjedEEYxgIZ6JFqsSnqc7MQKQFGgDw==","signatures":[{"sig":"MEUCIQCskdiFKSrAiVpfWxTB6/bOnRtni0ozOCGovo50TXX26wIgcLFxH3kKcSuvh/KECr8E3rkWfZQumvZZBVQrK/F4B+o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3715},"main":"index.js","type":"module","gitHead":"fb2e24e452280c1af13993f0f3fb2b5062025480","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"captain-job","email":"kiptoojob73@gmail.com"},"repository":{"url":"git+https://github.com/job-kiptoo-dev/auto-repo.git","type":"git"},"_npmVersion":"10.9.3","description":"Automate GitHub repo creation and pushing with one command","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-repo_1.0.0_1758618395638_0.7570774734622638","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@captain-job/auto-repo","version":"1.0.1","keywords":["cli","git","github","automation"],"author":{"name":"Job Kiptoo"},"license":"MIT","_id":"@captain-job/auto-repo@1.0.1","maintainers":[{"name":"captain-job","email":"kiptoojob73@gmail.com"}],"homepage":"https://github.com/job-kiptoo-dev/auto-repo#readme","bugs":{"url":"https://github.com/job-kiptoo-dev/auto-repo/issues"},"bin":{"auto-repo":"scripts/auto-repo.js"},"dist":{"shasum":"09975cddc3547c6079c50d6ac1812a984a6f320a","tarball":"https://registry.npmjs.org/@captain-job/auto-repo/-/auto-repo-1.0.1.tgz","fileCount":3,"integrity":"sha512-r8scwzrHpHnx8RyGKGI1QKCW/Ohok59wQpwyb8A1YW9DwOKw6UUIs0IxM3BPQuVTAWGLJwT42BqU3I4CaINPhg==","signatures":[{"sig":"MEYCIQCm7645GZAE/UcaMfDg0VESVzKzNmg9Rw94L6Wx2mKI3QIhAI6NVefRS5ZTNugKDmjz85pf2BjG4qKIqt1LdUvLdUJN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4667},"main":"index.js","type":"module","gitHead":"a678f2555780ef19f2442928694349136f2b8bc9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"captain-job","email":"kiptoojob73@gmail.com"},"repository":{"url":"git+https://github.com/job-kiptoo-dev/auto-repo.git","type":"git"},"_npmVersion":"10.9.3","description":"Automate GitHub repo creation and pushing with one command","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auto-repo_1.0.1_1758626094089_0.7221991296176378","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@captain-job/auto-repo","version":"1.0.2","description":"Automate GitHub repo creation and pushing with one command","type":"module","bin":{"auto-repo":"scripts/auto-repo.js"},"keywords":["cli","git","github","automation"],"author":{"name":"Job Kiptoo"},"license":"MIT","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/job-kiptoo-dev/auto-repo.git"},"bugs":{"url":"https://github.com/job-kiptoo-dev/auto-repo/issues"},"homepage":"https://github.com/job-kiptoo-dev/auto-repo#readme","_id":"@captain-job/auto-repo@1.0.2","gitHead":"626e053fd51b04a97cb63fb0c1d4d54be0cfa58b","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-zGVo8PAI0vmB6h8Ig5mJU9P4cU9sTqMK1qQ5eTOGCKqR9gFlD06tViyYJ20MRkHxmcmELoZwxEMjOFP8iJmjyQ==","shasum":"1cb73d73519036213a1f10707ff647f22df0070b","tarball":"https://registry.npmjs.org/@captain-job/auto-repo/-/auto-repo-1.0.2.tgz","fileCount":3,"unpackedSize":20174,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHS6DTS65HlN9LVwAVNqkI0nPVBH5FRCE3xohKPevZqKAiBQrl7xTfcpi8RT1viNhRTuXi8VSFxdBMx9VVlUKrHFog=="}]},"_npmUser":{"name":"captain-job","email":"kiptoojob73@gmail.com"},"directories":{},"maintainers":[{"name":"captain-job","email":"kiptoojob73@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auto-repo_1.0.2_1758626867551_0.6634913099352773"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-23T09:06:35.508Z","modified":"2025-09-23T11:27:47.935Z","1.0.0":"2025-09-23T09:06:35.817Z","1.0.1":"2025-09-23T11:14:54.236Z","1.0.2":"2025-09-23T11:27:47.726Z"},"bugs":{"url":"https://github.com/job-kiptoo-dev/auto-repo/issues"},"author":{"name":"Job Kiptoo"},"license":"MIT","homepage":"https://github.com/job-kiptoo-dev/auto-repo#readme","keywords":["cli","git","github","automation"],"repository":{"type":"git","url":"git+https://github.com/job-kiptoo-dev/auto-repo.git"},"description":"Automate GitHub repo creation and pushing with one command","maintainers":[{"name":"captain-job","email":"kiptoojob73@gmail.com"}],"readme":"# 🚀 Auto-Repo\n\n**Automated GitHub Repository Creator** - Create, initialize, and push repositories to GitHub with a single command!\n\n[![npm version](https://badge.fury.io/js/%40captain-job%2Fauto-repo.svg)](https://www.npmjs.com/package/@captain-job/auto-repo)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/node/v/@captain-job/auto-repo.svg)](https://nodejs.org/)\n\n## ✨ Features\n\n- 🎯 **One Command Setup** - Create GitHub repo + local git setup + push in seconds\n- 🔐 **Flexible Authentication** - Multiple ways to provide GitHub tokens\n- 👤 **Smart User Detection** - Auto-detects GitHub username from API\n- 🏗️ **Git Automation** - Handles git init, add, commit, remote, and push\n- 🔒 **Public & Private** - Support for both public and private repositories\n- 🛡️ **SSH Ready** - Automatic SSH key configuration for GitHub\n- 🎨 **Interactive Mode** - Guided prompts when information is missing\n- ⚡ **CLI Friendly** - Full command-line argument support\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\nnpm install -g @captain-job/auto-repo\n```\n\n### Basic Usage\n\n1. **Navigate to your project directory:**\n   ```bash\n   cd my-awesome-project\n   ```\n\n2. **Run auto-repo:**\n   ```bash\n   auto-repo \"My awesome project description\"\n   ```\n\n3. **Done!** Your repo is now on GitHub and fully set up 🎉\n\n## 🔐 GitHub Token Setup\n\n### Method 1: Environment Variable (Recommended)\n\n1. **Get your token:**\n   - Go to [GitHub Settings → Developer settings → Personal access tokens](https://github.com/settings/tokens)\n   - Click \"Generate new token (classic)\"\n   - Select `repo` scope (and `workflow` if needed)\n   - Copy your token\n\n2. **Set environment variable:**\n   ```bash\n   export GITHUB_TOKEN=your_token_here\n   ```\n\n3. **Make it permanent:**\n   ```bash\n   echo 'export GITHUB_TOKEN=your_token_here' >> ~/.bashrc\n   source ~/.bashrc\n   ```\n\n### Method 2: CLI Argument\n```bash\nauto-repo --token=your_token_here \"Project description\"\n```\n\n### Method 3: Interactive Prompt\nIf no token is found, auto-repo will securely prompt you to enter it.\n\n### Need Help?\n```bash\nauto-repo --help-token\n```\n\n## 📖 Usage Examples\n\n### Basic Examples\n```bash\n# Interactive mode - prompts for missing info\nauto-repo\n\n# With description\nauto-repo \"A cool web application\"\n\n# Create private repository\nauto-repo --private \"Secret project\"\n```\n\n### Advanced Examples\n```bash\n# Full configuration\nauto-repo --token=ghp_xxx --user=myusername --private \"Enterprise app\"\n\n# Skip pushing (useful for testing)\nauto-repo --no-push \"Local testing repo\"\n\n# Multiple environment files supported\n# auto-repo looks for .env in: current dir, ~/dotfiles/.env, ~/.env\n```\n\n## 🛠️ CLI Options\n\n| Option | Description | Example |\n|--------|-------------|---------|\n| `[description]` | Repository description | `auto-repo \"My project\"` |\n| `--token <token>` | GitHub personal access token | `--token=ghp_xxx` |\n| `--user <username>` | GitHub username | `--user=johndoe` |\n| `--private` | Create private repository | `--private` |\n| `--no-push` | Skip pushing to GitHub | `--no-push` |\n| `--help-token` | Show token setup guide | `--help-token` |\n| `--help` | Show help information | `--help` |\n| `--version` | Show version number | `--version` |\n\n## 🔄 What Auto-Repo Does\n\n1. **🔍 Authentication** - Validates your GitHub token\n2. **👤 User Detection** - Gets your GitHub username from API\n3. **📦 Repo Creation** - Creates repository on GitHub via API\n4. **🔧 Git Setup** - Initializes local git repository\n5. **📝 Commit Changes** - Adds and commits all files\n6. **🔗 Remote Setup** - Configures GitHub as remote origin\n7. **🔐 SSH Config** - Sets up SSH keys for GitHub\n8. **🚀 Push** - Pushes your code to GitHub\n9. **✅ Success** - Provides links and confirmation\n\n## 📁 Environment Variables\n\nAuto-repo looks for environment variables in these locations (in order):\n\n1. `./env` (current directory)\n2. `~/dotfiles/.env` (dotfiles directory)\n3. `~/.env` (home directory)\n\nSupported variables:\n```bash\nGITHUB_TOKEN=your_github_token_here\nGITHUB_USER=your_github_username\n```\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**❌ \"Push failed\" error**\n- **Cause**: SSH key not set up with GitHub\n- **Solution**: Add your SSH key to GitHub at [Settings → SSH Keys](https://github.com/settings/ssh)\n\n**❌ \"Token validation failed\"**\n- **Cause**: Invalid or expired token\n- **Solution**: Generate a new token with `repo` scope\n\n**❌ \"Repository already exists\"**\n- **Cause**: Repo name already taken\n- **Solution**: Auto-repo will continue and update existing repo\n\n**❌ \"Permission denied\"**\n- **Cause**: Token lacks required permissions\n- **Solution**: Ensure token has `repo` scope enabled\n\n### Getting Help\n\n```bash\n# Show token setup instructions\nauto-repo --help-token\n\n# Show all available options\nauto-repo --help\n\n# Check version\nauto-repo --version\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. **Fork** the repository\n2. **Create** your feature branch (`git checkout -b feature/amazing-feature`)\n3. **Commit** your changes (`git commit -m 'Add some amazing feature'`)\n4. **Push** to the branch (`git push origin feature/amazing-feature`)\n5. **Open** a Pull Request\n\n### Development Setup\n\n```bash\n# Clone the repo\ngit clone https://github.com/job-kiptoo-dev/auto-repo.git\ncd auto-repo\n\n# Install dependencies\nnpm install\n\n# Test locally\nnpm link\nauto-repo --help\n```\n\n## 🔒 Security\n\n- 🔐 Tokens are never logged or stored permanently\n- 🎭 Interactive token input is masked\n- 🛡️ Environment variables are preferred over CLI args\n- 🔍 Token validation ensures proper permissions\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Thanks to the GitHub API for making repository automation possible\n- Built with Node.js and the amazing npm ecosystem\n- Inspired by the need for faster development workflows\n\n## 📊 Stats\n\n- ⚡ **Setup time**: < 30 seconds\n- 🎯 **Success rate**: 99.9% with proper token setup\n- 📦 **Package size**: < 5KB\n- 🔄 **Updates**: Regular maintenance and feature updates\n\n## 🔗 Links\n\n- 📦 [npm Package](https://www.npmjs.com/package/@captain-job/auto-repo)\n- 🐙 [GitHub Repository](https://github.com/job-kiptoo-dev/auto-repo)\n- 🐛 [Report Issues](https://github.com/job-kiptoo-dev/auto-repo/issues)\n- 💡 [Feature Requests](https://github.com/job-kiptoo-dev/auto-repo/discussions)\n\n---\n\n<div align=\"center\">\n\n**Made with ❤️ by [Job Kiptoo](https://github.com/job-kiptoo-dev)**\n\n*Star ⭐ this repo if you find it helpful!*\n\n</div>\n","readmeFilename":"readme.md"}