https://github.com/hebertzin/cli
CLI to automate the process of creating repositories on github
https://github.com/hebertzin/cli
cli-github cobra golang
Last synced: 12 months ago
JSON representation
CLI to automate the process of creating repositories on github
- Host: GitHub
- URL: https://github.com/hebertzin/cli
- Owner: hebertzin
- Created: 2024-07-24T15:00:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-27T13:36:59.000Z (over 1 year ago)
- Last Synced: 2024-10-12T05:07:24.580Z (over 1 year ago)
- Topics: cli-github, cobra, golang
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub CLI
## Overview
This project is a simple but very useful tool for automating repository creation and deletion processes on GitHub. It was built in Golang and is constantly improving. It is already very useful in my daily life.
## Requirements
- Go (Golang) installed on your machine.
- A GitHub access token with appropriate permissions.
## Feature
With this CLI you can automate the repository creation process, increasing the project development, as it clones the boilerplates, creates the repository, sets the main branch, and makes the first commit.
## How to use this project
### 1. Install Go
If you don't already have Go installed, follow the installation instructions on the [official Go website](https://golang.org/doc/install).
2 Install and compile the Project
```bash
git clone https://github.com/hebertsanto/cli.git
cd cli
go build -o cli
```
3 Move the Binary to a Directory in the PATH:
```shell
sudo mv cli /usr/local/bin/
```
### 4. Configure GitHub Token
You need a GitHub access token to authenticate your requests. Create a token on [GitHub](https://github.com/settings/tokens) and set the permissions required to create and delete repositories.
Set the `GITHUB_TOKEN` environment variable to your token:
```shell
export GITHUB_TOKEN=your_token_here
````
5 Check if the Environment Variable is Set:
```shell
echo $GITHUB_TOKEN
```
6 Change variables
Change the following variables with your github data

7 If everything is ok you can start using it directly in your terminal
Create a repo
```shell
cli create-repo [repo-name] --type node
```
Delete a repo
```shell
cli delete-repo [username] [repo-name]
```