Skip to main content

Git Forge API Client..

Project description

GIT FORGE API CLIENTS

W.I.P. API clients for GitHub & GitLab.

Run commands or query api on all projects or groups of an authenticated GitLab or GitHub user.

So far only GitLab & GitHub are supported and the commands - sync (clone a repository, or pull from it if already cloned) or status (show the local status of the repository).

Coming soon - A wider array of forges, commands and configuration...

INSTALLATION

pip install gitforge

CONFIGURATION

Add personal access tokens and desired destination directories to ~/.config/gitforge/config. These defaults can be overridden on the command line with the --token and --destination arguments. See below for more details.

AUTHENTICATION

Generate a GitHub Personal Access Token here.

Generate a GitLab Personal Access Token here.

OPTIONS

GITHUB

usage: github [-h] [-r REPO [REPO ...]] [-d DESTINATION] [-t TOKEN]
              [-p SSH/HTTP] [-i] [-c COMMAND] [-v]

CLI GitHub API Client

optional arguments:
  -h, --help            show this help message and exit
  -r REPO [REPO ...], --repos REPO [REPO ...]
                        github repo names
  -d DESTINATION, --destination DESTINATION
                        destination path
  -t TOKEN, --token TOKEN
                        github personal access token
  -p SSH/HTTP, --protocol SSH/HTTP
                        protocol to use - ssh or http (defaults to ssh)
  -i, --interactive     choose repos interactively
  -c COMMAND, --command COMMAND
                        command to run - sync or status (defaults to sync)
  -v                    increase verbosity

GITLAB

usage: gitlab [-h] [-p PROJECT [PROJECT ...] | -g GROUP [GROUP ...]]
              [-d DESTINATION] [-t TOKEN] [-P SSH/HTTP] [-i] [-r COMMAND] [-v]

CLI GitLab API Client

optional arguments:
  -h, --help            show this help message and exit
  -p PROJECT [PROJECT ...], --projects PROJECT [PROJECT ...]
                        gitlab project names
  -g GROUP [GROUP ...], --groups GROUP [GROUP ...]
                        gitlab group names
  -d DESTINATION, --destination DESTINATION
                        destination path
  -t TOKEN, --token TOKEN
                        gitlab personal access token
  -P SSH/HTTP, --protocol SSH/HTTP
                        protocol to use - ssh or http (defaults to ssh)
  -i, --interactive     choose projects interactively
  -r COMMAND, --run COMMAND
                        command to run - sync or status (defaults to sync)
  -v                    increase verbosity

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitforge-0.0.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page