Skip to main content

Intelligent CLI tool for automated GitHub repository synchronization - clone, sync, and manage all your repos from one command

Project description

gitsmith

Intelligent CLI Repository Synchronization Engine

CI PyPI Python License: MIT


gitsmith automates the painful process of setting up all your GitHub repositories on a new machine. It authenticates via your GitHub token (stored securely in your OS keyring), fetches all accessible repos, compares them against your local filesystem, and only clones what's missing -- performing idempotent delta synchronization.

Features

Feature Description
Secure Auth Token encrypted in OS keyring (Windows DPAPI / macOS Keychain / Linux Secret Service)
Delta Sync Compares remote vs local -- only clones what's missing
Always Dry-Run First See exactly what will happen before any action is taken
Interactive Skip Deselect any repos you don't want via checkbox
Interactive CLI Beautiful wizard with step indicators, progress bars, Rich panels
Org Support Sync personal repos, organization repos, or both
Concurrent Cloning Clone multiple repos in parallel with ThreadPoolExecutor
Fault Tolerant One repo failure doesn't crash the whole run
Token Fingerprinting SHA-256 fingerprints for token identification without exposure

Installation

From PyPI (recommended)

pip install gitsmith-cli

From Source

git clone git@github.com:vamsi-31/gitfordge.git
cd gitfordge
pip install -e .

Quick Start

1. Store Your Token (one time)

gitsmith auth login

Your token is encrypted and stored in your OS credential manager. It is never stored in plain text files.

2. Sync All Repos (interactive wizard)

gitsmith sync

The wizard guides you through:

  1. Authentication verification
  2. Target selection (personal / org / both)
  3. Directory and protocol configuration
  4. Dry-run preview -- see all repos and their status
  5. Interactive skip -- deselect repos you don't want
  6. Confirmation -- approve before execution
  7. Concurrent cloning with progress bars

3. Check Status (dry run only)

gitsmith status

4. Declarative Mode (for scripts/CI)

gitsmith sync --token $GITHUB_TOKEN --dir ./repos --no-interactive --yes

Commands

Command Description
gitsmith sync Main sync command (interactive wizard)
gitsmith status Show delta without executing
gitsmith auth login Store GitHub token securely
gitsmith auth logout Remove stored token
gitsmith auth status Show auth status + token fingerprint

Sync Flags

Flag Description
--token, -t GitHub token (or use keyring)
--org, -o Target specific organization
--dir, -d Target directory (default: current)
--protocol, -p Clone via https or ssh
--include Only repos matching regex
--exclude Skip repos matching regex
--update / --no-update Pull existing repos
--workers, -w Parallel clone threads (default: 4)
--dry-run Preview only, don't execute
--no-interactive Skip wizard
--yes, -y Auto-confirm after preview
--verbose, -v Show git output

Token Security

gitsmith takes token security seriously:

  • Never stored in files -- uses OS-level encrypted credential managers
  • Never logged -- token values are masked in all output
  • Fingerprinted -- SHA-256 hash truncated to 8 chars for safe identification
  • Constant-time comparison -- prevents timing attacks
  • Priority chain -- CLI flag > env var > OS Keyring > interactive prompt
Platform Backend Encryption
Windows Credential Manager DPAPI (user session key)
macOS Keychain Access AES-256
Linux Secret Service (GNOME Keyring / KDE KWallet) Session-bound

License

MIT - see LICENSE

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

gitsmith-0.1.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitsmith-0.1.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file gitsmith-0.1.0.tar.gz.

File metadata

  • Download URL: gitsmith-0.1.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gitsmith-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6c48a6d9ed25e33633c1bfa6bd8239e25996ac45829b0e83c0cd5b8d8ac446d
MD5 d5943d706b59593e0308420ef06feb93
BLAKE2b-256 b0264aa21c573966c47d9913ba8d53c1ca1b4cc69f40cc2c1c3e277cd16b78c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitsmith-0.1.0.tar.gz:

Publisher: publish.yml on vamsi-31/gitsmith

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitsmith-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitsmith-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gitsmith-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b76476dc0c9624bc566cdc583905e55e1a3580ea98dd997a19fcfe75df070924
MD5 1605ac83f5d7f7a0fc955fbce4d6985b
BLAKE2b-256 2788cf03144529e126a9d8454f8173d932193afb03f0ec8717a6444ba9e2b4ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitsmith-0.1.0-py3-none-any.whl:

Publisher: publish.yml on vamsi-31/gitsmith

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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