Skip to content

Repository files navigation

giteacli

A CLI tool for interacting with Gitea instances. Manage repositories, issues, pull requests, labels, and more with type-safe commands.

Installation

# Using npm
npm install -g @seepine/giteacli

# Using pnpm
pnpm add -g @seepine/giteacli

Commands

Authentication

# Login to a Gitea instance
giteacli login --host <host> --token <token>

# Show current logged in user
giteacli whoami

Repository Management

# List your repositories
giteacli repo list

# Create a new repository
giteacli repo add --name <name>

# Fork a repository
giteacli repo fork --repo <owner/repo>

Repository Labels

# List labels in a repository
giteacli repo label list --repo <owner/repo>

# Create a new label
giteacli repo label add --repo <owner/repo> --name <name> --color <color>

# Edit a label
giteacli repo label edit --repo <owner/repo> --id <id>

# Delete a label
giteacli repo label del --repo <owner/repo> --id <id>

Organization Management

Organization Labels

# List labels in an organization
giteacli org label list --org <org>

# Create a new label
giteacli org label add --org <org> --name <name> --color <color>

# Edit a label
giteacli org label edit --org <org> --id <id>

# Delete a label
giteacli org label del --org <org> --id <id>

Issue Management

# Get a single issue
giteacli issue get --repo <owner/repo> --index <index>

# List issues in a repository
giteacli issue list --repo <owner/repo>

# Search issues
giteacli issue search

# Create a new issue
giteacli issue add --repo <owner/repo> --title <title> --body <body>

# Edit an issue
giteacli issue edit --repo <owner/repo> --index <index>

# Add labels to an issue
giteacli issue add-labels --repo <owner/repo> --index <index> --labels <labels>

# Remove labels from an issue
giteacli issue del-labels --repo <owner/repo> --index <index> --labels <labels>

Issue Comments

# List comments on an issue
giteacli issue comment list --repo <owner/repo> --index <index>

# Add a comment to an issue
giteacli issue comment add --repo <owner/repo> --index <index> --body <body>

# Edit a comment
giteacli issue comment edit --repo <owner/repo> --comment-id <commentId> --body <body>

Pull Request Management

# List pull requests in a repository
giteacli pr list --repo <owner/repo>

# Search pull requests
giteacli pr search

# Get a single pull request
giteacli pr get --repo <owner/repo> --index <index>

# Create a new pull request
giteacli pr add --repo <owner/repo> --title <title> --head <head> --base <base>

# Edit a pull request
giteacli pr edit --repo <owner/repo> --index <index>

# Get pull request comments
giteacli pr comments --repo <owner/repo> --index <index>

# List pull request reviews
giteacli pr reviews --repo <owner/repo> --index <index>

# Find first PR that need changes (REQUEST_CHANGES review)
giteacli pr tbd

Reviewers

# Add a reviewer to a pull request
giteacli pr reviewer add --repo <owner/repo> --index <index> --username <username>

# Remove a reviewer from a pull request
giteacli pr reviewer del --repo <owner/repo> --index <index> --username <username>

# Request re-review
giteacli pr reviewer review --repo <owner/repo> --index <index> --username <username>

Actions

# List action runs in a repository
giteacli action list --repo <owner/repo>

# Filter action runs
giteacli action list --repo <owner/repo> --status success --branch main --event push

# List jobs in an action run
giteacli action job list --repo <owner/repo> --index <runId>

# View an action job
giteacli action job view --repo <owner/repo> --index <jobId>

Configuration

# Set configuration values
giteacli config set <key> <value>

# Get a configuration value
giteacli config get <key>

# List configuration values
giteacli config list

# Unset a configuration value
giteacli config unset <key>

# Available keys: format
# format: json or toon

Output Format

By default, output is JSON. You can set format=toon in config for pretty-printed output:

giteacli config set format toon

To switch back to JSON:

giteacli config set format json

Pagination and Filters

List commands support pagination with --page and --limit where available:

giteacli issue list --repo <owner/repo> --page 1 --limit 30
giteacli pr list --repo <owner/repo> --state open --page 1 --limit 30
giteacli action list --repo <owner/repo> --page 1 --limit 20

Boolean filters currently require an explicit value:

giteacli issue search --assigned true
giteacli pr search --created false
giteacli repo list --forked true

License

MIT

About

A CLI tool for interacting with Gitea instances

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages