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

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.2.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.2.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitsmith-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 1877d6adad3367316f6fa01c7dd089edce258d46b41cbd41e136904266ab9341
MD5 105aa417bd612d3ab3474b462448f559
BLAKE2b-256 5c168095e229c0e569e10ed501542d235bc22c15899382e6b8f8a3874987b6a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitsmith-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: gitsmith-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16c3145a6512e92d5cd90fc7e8b0af5a8ebf2662ba7fd235a55702832f11a6ca
MD5 4127bfd28fc02f0a75847f272909ce6b
BLAKE2b-256 2f57590f4c60418635e407a16b6738afc9340721a192e39fc7a8776923227041

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitsmith-0.2.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