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
  • Verify SSH works (auto-fixes port 443 and ssh-agent if needed)
  • Write a config file to ~/.config/github-sync/config.yaml

Setup will not complete until ssh -T git@github.com succeeds.


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.4.tar.gz (10.5 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.4-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: github_sync_agent-0.1.4.tar.gz
  • Upload date:
  • Size: 10.5 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.4.tar.gz
Algorithm Hash digest
SHA256 a9261208554c0bf55025357bfc4b30878e1db4318cd2667cbfcad5248714f9c5
MD5 2d3e79471d180e271449f2e2d2904910
BLAKE2b-256 b49e6e2b7b0bd22cca4c15669858e56dda3bc24822ea64c57c23f9ceb09818e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for github_sync_agent-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3175508d9dca9108b75f67285d22d4c15a6d033dc782a50509c490efea46c819
MD5 7ab640525a76349517ab2a80caccd409
BLAKE2b-256 3e75ff49f738748ad5654b507c50e011e14e7eb798385b3d8640fb8afeb90f37

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