This repository contains a shell script that automates the creation of a new GitHub repository from a specified template and clones it locally. It leverages the GitHub CLI and Git to streamline repository setup.
Features
- Automates repository creation on GitHub using a predefined template
- Clones the newly created repository to the local machine
- Validates required tools (GitHub CLI and Git) are installed
- Provides error handling for common failure points
Tech Stack
- Shell scripting (Bash)
- GitHub CLI (
gh) - Git
Getting Started
Prerequisites
- GitHub CLI installed and authenticated
- Git installed on your system
Installation and Usage
- Clone or download this repository.
- Make the script executable:
chmod +x gh_create_from_template.sh
- Run the script:
./gh_create_from_template.sh
- Follow the prompt to enter the new repository name.
The script will create a new public repository on GitHub based on the justin-napolitano/gh_submodule_sync template and then clone it locally.
Project Structure
gh_create_from_template.sh: The main shell script that performs repository creation and cloning.README.md: This file.index.md: Documentation with an overview and usage instructions.
Future Work / Roadmap
- Add support for private repositories and configurable visibility.
- Parameterize the template repository to allow user selection.
- Add command-line arguments to bypass interactive prompts.
- Enhance error handling and logging.
- Support for additional GitHub repository settings (e.g., topics, descriptions).