Skip to main content

Sync all your local projects to GitHub automatically

Project description

GitHub Sync Agent

Automatically syncs every local project directory to its own GitHub repository.

For each project it will:

  1. git init if not already a repo
  2. Create the GitHub repo if it doesn't exist yet
  3. Ensure the remote uses SSH
  4. Stage + commit any uncommitted changes
  5. Push to origin

Runs daily via a systemd user timer, and on-demand via CLI.


Installation

pip install github-sync-agent

First-time setup

github-sync init

The wizard will:

  • Check git and gh are installed
  • Authenticate with GitHub (gh auth login)
  • Ask which folder to scan for projects
  • Set up your SSH key automatically
  • Write a config file to ~/.config/github-sync/config.yaml

Usage

# Sync all projects
github-sync sync

# Sync a single project
github-sync sync --project my-project

# Preview without making changes
github-sync sync --dry-run

# Show status of all projects
github-sync status

Configuration (~/.config/github-sync/config.yaml)

Generated by github-sync init. You can edit it at any time.

Key Default Description
github_user (detected from gh auth) Your GitHub username
projects_root ~/projects Scans all subdirectories here
schedule_time 02:00 Daily run time
default_visibility private private or public for new repos
auto_commit_message chore: auto-sync Commit message for auto-commits
exclude [] Directory names to skip
log_file ~/.local/share/github-sync/github-sync.log Log file path
log_level INFO DEBUG / INFO / WARNING / ERROR

Excluding a project

exclude:
  - SomeProjectToSkip

Requirements


License

MIT

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

github_sync_agent-0.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

github_sync_agent-0.1.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file github_sync_agent-0.1.1.tar.gz.

File metadata

  • Download URL: github_sync_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for github_sync_agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1066a506649495085c5c6d926b1be11a48a6fbb315d3ce4915445a8859dd6feb
MD5 94600d46bee4d974bbe96feff043c912
BLAKE2b-256 1b0293db11fb7b529a7254283446660534516e94496120c6b9595423fd52943d

See more details on using hashes here.

File details

Details for the file github_sync_agent-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for github_sync_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e8e8f6263a85261095eaeb9f48a983c5f27a63bda913f8d1e72a753ce7e66e6
MD5 4a36c9d94944edc863a5e0fe1015b782
BLAKE2b-256 7a7de7a2d079fa8fe623921bc1071dc0da9bc1c15fda592a35135a8a317e87b3

See more details on using hashes here.

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