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.2.tar.gz (9.1 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.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: github_sync_agent-0.1.2.tar.gz
  • Upload date:
  • Size: 9.1 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.2.tar.gz
Algorithm Hash digest
SHA256 4262d3bc8e0272beb1d4563bdfd619ed81d5defc9056d1579cf6a937da246ca3
MD5 81dabb8d796512aa6224d7394ad0114a
BLAKE2b-256 1bcf31134dd44dfde11eab80531a951be65167843580d744b8fdade786ed14ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for github_sync_agent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1aee44f9f4bbcbdd246c27578d7c72824c1a0e87586691e293d9f14fbd4e1082
MD5 8de04879d2b2afb70ed7336ce352d7f3
BLAKE2b-256 9cc941f96173238c300b6b055c43bbbe7c65ded0890bf6a4b2bd24c43d745576

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