1.0 KiB
1.0 KiB
Gitea CLI
A command line interface for interacting with Gitea servers.
Installation
- Clone this repository
- Install dependencies:
pip install -r requirements.txt
Configuration
Create a .env
file in the project root with your Gitea credentials:
GITEA_URL=https://your-gitea-instance.com
GITEA_TOKEN=your_access_token
To get an access token:
- Log into your Gitea instance
- Go to Settings > Applications
- Generate a new token
Usage
Create a new repository:
python gitea_cli.py create-repo --name my-repo --description "My new repository" --private
Create a repository and set it as remote:
If you're in a git repository and want to create a new Gitea repository and set it as the remote origin:
python gitea_cli.py create-repo --name my-repo --description "My new repository" --set-remote
This will:
- Create a new repository on Gitea
- Check if the current directory is a git repository
- Remove any existing 'origin' remote
- Add the new Gitea repository as 'origin'