github-sync-agent 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: github-sync-agent
3
+ Version: 0.1.1
4
+ Summary: Sync all your local projects to GitHub automatically
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/yuvalavni/Agents
7
+ Project-URL: Repository, https://github.com/yuvalavni/Agents
8
+ Project-URL: Bug Tracker, https://github.com/yuvalavni/Agents/issues
9
+ Keywords: github,git,sync,backup,automation,cli
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Environment :: Console
14
+ Classifier: Topic :: Software Development :: Version Control :: Git
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: pyyaml>=6.0
18
+ Requires-Dist: click>=8.0
19
+
20
+ # GitHub Sync Agent
21
+
22
+ Automatically syncs every local project directory to its own GitHub repository.
23
+
24
+ For each project it will:
25
+ 1. `git init` if not already a repo
26
+ 2. Create the GitHub repo if it doesn't exist yet
27
+ 3. Ensure the remote uses SSH
28
+ 4. Stage + commit any uncommitted changes
29
+ 5. Push to `origin`
30
+
31
+ Runs daily via a systemd user timer, and on-demand via CLI.
32
+
33
+ ---
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ pip install github-sync-agent
39
+ ```
40
+
41
+ ## First-time setup
42
+
43
+ ```bash
44
+ github-sync init
45
+ ```
46
+
47
+ The wizard will:
48
+ - Check `git` and `gh` are installed
49
+ - Authenticate with GitHub (`gh auth login`)
50
+ - Ask which folder to scan for projects
51
+ - Set up your SSH key automatically
52
+ - Write a config file to `~/.config/github-sync/config.yaml`
53
+
54
+ ---
55
+
56
+ ## Usage
57
+
58
+ ```bash
59
+ # Sync all projects
60
+ github-sync sync
61
+
62
+ # Sync a single project
63
+ github-sync sync --project my-project
64
+
65
+ # Preview without making changes
66
+ github-sync sync --dry-run
67
+
68
+ # Show status of all projects
69
+ github-sync status
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Configuration (`~/.config/github-sync/config.yaml`)
75
+
76
+ Generated by `github-sync init`. You can edit it at any time.
77
+
78
+ | Key | Default | Description |
79
+ |-----|---------|-------------|
80
+ | `github_user` | _(detected from gh auth)_ | Your GitHub username |
81
+ | `projects_root` | `~/projects` | Scans all subdirectories here |
82
+ | `schedule_time` | `02:00` | Daily run time |
83
+ | `default_visibility` | `private` | `private` or `public` for new repos |
84
+ | `auto_commit_message` | `chore: auto-sync` | Commit message for auto-commits |
85
+ | `exclude` | `[]` | Directory names to skip |
86
+ | `log_file` | `~/.local/share/github-sync/github-sync.log` | Log file path |
87
+ | `log_level` | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` |
88
+
89
+ ### Excluding a project
90
+
91
+ ```yaml
92
+ exclude:
93
+ - SomeProjectToSkip
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Requirements
99
+
100
+ - Python 3.10+
101
+ - `git` installed
102
+ - `gh` (GitHub CLI) installed — [installation guide](https://cli.github.com)
103
+
104
+ ---
105
+
106
+ ## License
107
+
108
+ MIT
@@ -0,0 +1,89 @@
1
+ # GitHub Sync Agent
2
+
3
+ Automatically syncs every local project directory to its own GitHub repository.
4
+
5
+ For each project it will:
6
+ 1. `git init` if not already a repo
7
+ 2. Create the GitHub repo if it doesn't exist yet
8
+ 3. Ensure the remote uses SSH
9
+ 4. Stage + commit any uncommitted changes
10
+ 5. Push to `origin`
11
+
12
+ Runs daily via a systemd user timer, and on-demand via CLI.
13
+
14
+ ---
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install github-sync-agent
20
+ ```
21
+
22
+ ## First-time setup
23
+
24
+ ```bash
25
+ github-sync init
26
+ ```
27
+
28
+ The wizard will:
29
+ - Check `git` and `gh` are installed
30
+ - Authenticate with GitHub (`gh auth login`)
31
+ - Ask which folder to scan for projects
32
+ - Set up your SSH key automatically
33
+ - Write a config file to `~/.config/github-sync/config.yaml`
34
+
35
+ ---
36
+
37
+ ## Usage
38
+
39
+ ```bash
40
+ # Sync all projects
41
+ github-sync sync
42
+
43
+ # Sync a single project
44
+ github-sync sync --project my-project
45
+
46
+ # Preview without making changes
47
+ github-sync sync --dry-run
48
+
49
+ # Show status of all projects
50
+ github-sync status
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Configuration (`~/.config/github-sync/config.yaml`)
56
+
57
+ Generated by `github-sync init`. You can edit it at any time.
58
+
59
+ | Key | Default | Description |
60
+ |-----|---------|-------------|
61
+ | `github_user` | _(detected from gh auth)_ | Your GitHub username |
62
+ | `projects_root` | `~/projects` | Scans all subdirectories here |
63
+ | `schedule_time` | `02:00` | Daily run time |
64
+ | `default_visibility` | `private` | `private` or `public` for new repos |
65
+ | `auto_commit_message` | `chore: auto-sync` | Commit message for auto-commits |
66
+ | `exclude` | `[]` | Directory names to skip |
67
+ | `log_file` | `~/.local/share/github-sync/github-sync.log` | Log file path |
68
+ | `log_level` | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` |
69
+
70
+ ### Excluding a project
71
+
72
+ ```yaml
73
+ exclude:
74
+ - SomeProjectToSkip
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Requirements
80
+
81
+ - Python 3.10+
82
+ - `git` installed
83
+ - `gh` (GitHub CLI) installed — [installation guide](https://cli.github.com)
84
+
85
+ ---
86
+
87
+ ## License
88
+
89
+ MIT
@@ -0,0 +1 @@
1
+ __version__ = "0.1.1"
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: github-sync-agent
3
+ Version: 0.1.1
4
+ Summary: Sync all your local projects to GitHub automatically
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/yuvalavni/Agents
7
+ Project-URL: Repository, https://github.com/yuvalavni/Agents
8
+ Project-URL: Bug Tracker, https://github.com/yuvalavni/Agents/issues
9
+ Keywords: github,git,sync,backup,automation,cli
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Environment :: Console
14
+ Classifier: Topic :: Software Development :: Version Control :: Git
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: pyyaml>=6.0
18
+ Requires-Dist: click>=8.0
19
+
20
+ # GitHub Sync Agent
21
+
22
+ Automatically syncs every local project directory to its own GitHub repository.
23
+
24
+ For each project it will:
25
+ 1. `git init` if not already a repo
26
+ 2. Create the GitHub repo if it doesn't exist yet
27
+ 3. Ensure the remote uses SSH
28
+ 4. Stage + commit any uncommitted changes
29
+ 5. Push to `origin`
30
+
31
+ Runs daily via a systemd user timer, and on-demand via CLI.
32
+
33
+ ---
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ pip install github-sync-agent
39
+ ```
40
+
41
+ ## First-time setup
42
+
43
+ ```bash
44
+ github-sync init
45
+ ```
46
+
47
+ The wizard will:
48
+ - Check `git` and `gh` are installed
49
+ - Authenticate with GitHub (`gh auth login`)
50
+ - Ask which folder to scan for projects
51
+ - Set up your SSH key automatically
52
+ - Write a config file to `~/.config/github-sync/config.yaml`
53
+
54
+ ---
55
+
56
+ ## Usage
57
+
58
+ ```bash
59
+ # Sync all projects
60
+ github-sync sync
61
+
62
+ # Sync a single project
63
+ github-sync sync --project my-project
64
+
65
+ # Preview without making changes
66
+ github-sync sync --dry-run
67
+
68
+ # Show status of all projects
69
+ github-sync status
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Configuration (`~/.config/github-sync/config.yaml`)
75
+
76
+ Generated by `github-sync init`. You can edit it at any time.
77
+
78
+ | Key | Default | Description |
79
+ |-----|---------|-------------|
80
+ | `github_user` | _(detected from gh auth)_ | Your GitHub username |
81
+ | `projects_root` | `~/projects` | Scans all subdirectories here |
82
+ | `schedule_time` | `02:00` | Daily run time |
83
+ | `default_visibility` | `private` | `private` or `public` for new repos |
84
+ | `auto_commit_message` | `chore: auto-sync` | Commit message for auto-commits |
85
+ | `exclude` | `[]` | Directory names to skip |
86
+ | `log_file` | `~/.local/share/github-sync/github-sync.log` | Log file path |
87
+ | `log_level` | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` |
88
+
89
+ ### Excluding a project
90
+
91
+ ```yaml
92
+ exclude:
93
+ - SomeProjectToSkip
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Requirements
99
+
100
+ - Python 3.10+
101
+ - `git` installed
102
+ - `gh` (GitHub CLI) installed — [installation guide](https://cli.github.com)
103
+
104
+ ---
105
+
106
+ ## License
107
+
108
+ MIT
@@ -4,14 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "github-sync-agent"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Sync all your local projects to GitHub automatically"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = { text = "MIT" }
12
- authors = [
13
- { name = "yuvalavni" }
14
- ]
12
+ authors = []
15
13
  keywords = ["github", "git", "sync", "backup", "automation", "cli"]
16
14
  classifiers = [
17
15
  "Programming Language :: Python :: 3",
@@ -28,6 +26,7 @@ dependencies = [
28
26
  [project.urls]
29
27
  Homepage = "https://github.com/yuvalavni/Agents"
30
28
  Repository = "https://github.com/yuvalavni/Agents"
29
+ "Bug Tracker" = "https://github.com/yuvalavni/Agents/issues"
31
30
 
32
31
  [project.scripts]
33
32
  github-sync = "github_sync.cli:main"
@@ -1,132 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: github-sync-agent
3
- Version: 0.1.0
4
- Summary: Sync all your local projects to GitHub automatically
5
- Author: yuvalavni
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/yuvalavni/Agents
8
- Project-URL: Repository, https://github.com/yuvalavni/Agents
9
- Keywords: github,git,sync,backup,automation,cli
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Operating System :: POSIX :: Linux
13
- Classifier: Environment :: Console
14
- Classifier: Topic :: Software Development :: Version Control :: Git
15
- Requires-Python: >=3.10
16
- Description-Content-Type: text/markdown
17
- Requires-Dist: pyyaml>=6.0
18
- Requires-Dist: click>=8.0
19
-
20
- # GitHub Sync Agent
21
-
22
- Automatically syncs every project under `/home/yuval/projects` to GitHub (`github.com/yuvalavni`).
23
-
24
- For each project it will:
25
- 1. `git init` if not already a repo
26
- 2. Create the GitHub repo if it doesn't exist yet
27
- 3. Ensure the remote uses SSH
28
- 4. Stage + commit any uncommitted changes
29
- 5. Push to `origin`
30
-
31
- Runs daily at **02:00** via a systemd user timer, and on-demand via CLI.
32
-
33
- ---
34
-
35
- ## Directory layout
36
-
37
- ```
38
- agents/github-sync/
39
- ├── github_sync_agent.py # Main script
40
- ├── config.yaml # GitHub user, projects root, schedule, exclusions
41
- ├── requirements.txt
42
- ├── install.sh # One-time setup
43
- ├── systemd/
44
- │ ├── github-sync.service
45
- │ └── github-sync.timer
46
- └── logs/
47
- └── github-sync.log
48
- ```
49
-
50
- ---
51
-
52
- ## Quick start
53
-
54
- ```bash
55
- cd /home/yuval/projects/Agents/agents/github-sync
56
-
57
- # 1. Install (once)
58
- bash install.sh
59
-
60
- # 2. Dry run
61
- .venv/bin/python github_sync_agent.py --dry-run
62
-
63
- # 3. Sync for real
64
- .venv/bin/python github_sync_agent.py
65
- ```
66
-
67
- ---
68
-
69
- ## Configuration (`config.yaml`)
70
-
71
- | Key | Default | Description |
72
- |-----|---------|-------------|
73
- | `github_user` | `yuvalavni` | GitHub username |
74
- | `projects_root` | `/home/yuval/projects` | Scans all subdirectories here |
75
- | `schedule_time` | `02:00` | Daily run time |
76
- | `default_visibility` | `private` | `private` or `public` for new repos |
77
- | `auto_commit_message` | `chore: auto-sync` | Commit message for auto-commits |
78
- | `exclude` | `[]` | Directory names to skip |
79
- | `log_file` | `logs/github-sync.log` | Log file path |
80
- | `log_level` | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` |
81
-
82
- ### Excluding a project
83
-
84
- ```yaml
85
- exclude:
86
- - SomePrivateProject
87
- - TempExperiment
88
- ```
89
-
90
- ---
91
-
92
- ## CLI reference
93
-
94
- ```bash
95
- # Sync all projects
96
- .venv/bin/python github_sync_agent.py
97
-
98
- # Sync a single project
99
- .venv/bin/python github_sync_agent.py --project Agents
100
-
101
- # Preview without making any changes
102
- .venv/bin/python github_sync_agent.py --dry-run
103
-
104
- # Show status of all projects (git, remote, changes, GitHub)
105
- .venv/bin/python github_sync_agent.py --status
106
- ```
107
-
108
- ---
109
-
110
- ## Systemd
111
-
112
- ```bash
113
- # Trigger immediately
114
- systemctl --user start github-sync.service
115
-
116
- # Check next scheduled run
117
- systemctl --user list-timers github-sync.timer
118
-
119
- # View live logs
120
- journalctl --user -u github-sync.service -f
121
-
122
- # Disable daily timer
123
- systemctl --user disable --now github-sync.timer
124
- ```
125
-
126
- ---
127
-
128
- ## Prerequisites
129
-
130
- - `git` installed
131
- - `gh` installed and authenticated (`gh auth status`)
132
- - SSH key added to GitHub (`gh ssh-key list`)
@@ -1,113 +0,0 @@
1
- # GitHub Sync Agent
2
-
3
- Automatically syncs every project under `/home/yuval/projects` to GitHub (`github.com/yuvalavni`).
4
-
5
- For each project it will:
6
- 1. `git init` if not already a repo
7
- 2. Create the GitHub repo if it doesn't exist yet
8
- 3. Ensure the remote uses SSH
9
- 4. Stage + commit any uncommitted changes
10
- 5. Push to `origin`
11
-
12
- Runs daily at **02:00** via a systemd user timer, and on-demand via CLI.
13
-
14
- ---
15
-
16
- ## Directory layout
17
-
18
- ```
19
- agents/github-sync/
20
- ├── github_sync_agent.py # Main script
21
- ├── config.yaml # GitHub user, projects root, schedule, exclusions
22
- ├── requirements.txt
23
- ├── install.sh # One-time setup
24
- ├── systemd/
25
- │ ├── github-sync.service
26
- │ └── github-sync.timer
27
- └── logs/
28
- └── github-sync.log
29
- ```
30
-
31
- ---
32
-
33
- ## Quick start
34
-
35
- ```bash
36
- cd /home/yuval/projects/Agents/agents/github-sync
37
-
38
- # 1. Install (once)
39
- bash install.sh
40
-
41
- # 2. Dry run
42
- .venv/bin/python github_sync_agent.py --dry-run
43
-
44
- # 3. Sync for real
45
- .venv/bin/python github_sync_agent.py
46
- ```
47
-
48
- ---
49
-
50
- ## Configuration (`config.yaml`)
51
-
52
- | Key | Default | Description |
53
- |-----|---------|-------------|
54
- | `github_user` | `yuvalavni` | GitHub username |
55
- | `projects_root` | `/home/yuval/projects` | Scans all subdirectories here |
56
- | `schedule_time` | `02:00` | Daily run time |
57
- | `default_visibility` | `private` | `private` or `public` for new repos |
58
- | `auto_commit_message` | `chore: auto-sync` | Commit message for auto-commits |
59
- | `exclude` | `[]` | Directory names to skip |
60
- | `log_file` | `logs/github-sync.log` | Log file path |
61
- | `log_level` | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` |
62
-
63
- ### Excluding a project
64
-
65
- ```yaml
66
- exclude:
67
- - SomePrivateProject
68
- - TempExperiment
69
- ```
70
-
71
- ---
72
-
73
- ## CLI reference
74
-
75
- ```bash
76
- # Sync all projects
77
- .venv/bin/python github_sync_agent.py
78
-
79
- # Sync a single project
80
- .venv/bin/python github_sync_agent.py --project Agents
81
-
82
- # Preview without making any changes
83
- .venv/bin/python github_sync_agent.py --dry-run
84
-
85
- # Show status of all projects (git, remote, changes, GitHub)
86
- .venv/bin/python github_sync_agent.py --status
87
- ```
88
-
89
- ---
90
-
91
- ## Systemd
92
-
93
- ```bash
94
- # Trigger immediately
95
- systemctl --user start github-sync.service
96
-
97
- # Check next scheduled run
98
- systemctl --user list-timers github-sync.timer
99
-
100
- # View live logs
101
- journalctl --user -u github-sync.service -f
102
-
103
- # Disable daily timer
104
- systemctl --user disable --now github-sync.timer
105
- ```
106
-
107
- ---
108
-
109
- ## Prerequisites
110
-
111
- - `git` installed
112
- - `gh` installed and authenticated (`gh auth status`)
113
- - SSH key added to GitHub (`gh ssh-key list`)
@@ -1 +0,0 @@
1
- __version__ = "0.1.0"
@@ -1,132 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: github-sync-agent
3
- Version: 0.1.0
4
- Summary: Sync all your local projects to GitHub automatically
5
- Author: yuvalavni
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/yuvalavni/Agents
8
- Project-URL: Repository, https://github.com/yuvalavni/Agents
9
- Keywords: github,git,sync,backup,automation,cli
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Operating System :: POSIX :: Linux
13
- Classifier: Environment :: Console
14
- Classifier: Topic :: Software Development :: Version Control :: Git
15
- Requires-Python: >=3.10
16
- Description-Content-Type: text/markdown
17
- Requires-Dist: pyyaml>=6.0
18
- Requires-Dist: click>=8.0
19
-
20
- # GitHub Sync Agent
21
-
22
- Automatically syncs every project under `/home/yuval/projects` to GitHub (`github.com/yuvalavni`).
23
-
24
- For each project it will:
25
- 1. `git init` if not already a repo
26
- 2. Create the GitHub repo if it doesn't exist yet
27
- 3. Ensure the remote uses SSH
28
- 4. Stage + commit any uncommitted changes
29
- 5. Push to `origin`
30
-
31
- Runs daily at **02:00** via a systemd user timer, and on-demand via CLI.
32
-
33
- ---
34
-
35
- ## Directory layout
36
-
37
- ```
38
- agents/github-sync/
39
- ├── github_sync_agent.py # Main script
40
- ├── config.yaml # GitHub user, projects root, schedule, exclusions
41
- ├── requirements.txt
42
- ├── install.sh # One-time setup
43
- ├── systemd/
44
- │ ├── github-sync.service
45
- │ └── github-sync.timer
46
- └── logs/
47
- └── github-sync.log
48
- ```
49
-
50
- ---
51
-
52
- ## Quick start
53
-
54
- ```bash
55
- cd /home/yuval/projects/Agents/agents/github-sync
56
-
57
- # 1. Install (once)
58
- bash install.sh
59
-
60
- # 2. Dry run
61
- .venv/bin/python github_sync_agent.py --dry-run
62
-
63
- # 3. Sync for real
64
- .venv/bin/python github_sync_agent.py
65
- ```
66
-
67
- ---
68
-
69
- ## Configuration (`config.yaml`)
70
-
71
- | Key | Default | Description |
72
- |-----|---------|-------------|
73
- | `github_user` | `yuvalavni` | GitHub username |
74
- | `projects_root` | `/home/yuval/projects` | Scans all subdirectories here |
75
- | `schedule_time` | `02:00` | Daily run time |
76
- | `default_visibility` | `private` | `private` or `public` for new repos |
77
- | `auto_commit_message` | `chore: auto-sync` | Commit message for auto-commits |
78
- | `exclude` | `[]` | Directory names to skip |
79
- | `log_file` | `logs/github-sync.log` | Log file path |
80
- | `log_level` | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` |
81
-
82
- ### Excluding a project
83
-
84
- ```yaml
85
- exclude:
86
- - SomePrivateProject
87
- - TempExperiment
88
- ```
89
-
90
- ---
91
-
92
- ## CLI reference
93
-
94
- ```bash
95
- # Sync all projects
96
- .venv/bin/python github_sync_agent.py
97
-
98
- # Sync a single project
99
- .venv/bin/python github_sync_agent.py --project Agents
100
-
101
- # Preview without making any changes
102
- .venv/bin/python github_sync_agent.py --dry-run
103
-
104
- # Show status of all projects (git, remote, changes, GitHub)
105
- .venv/bin/python github_sync_agent.py --status
106
- ```
107
-
108
- ---
109
-
110
- ## Systemd
111
-
112
- ```bash
113
- # Trigger immediately
114
- systemctl --user start github-sync.service
115
-
116
- # Check next scheduled run
117
- systemctl --user list-timers github-sync.timer
118
-
119
- # View live logs
120
- journalctl --user -u github-sync.service -f
121
-
122
- # Disable daily timer
123
- systemctl --user disable --now github-sync.timer
124
- ```
125
-
126
- ---
127
-
128
- ## Prerequisites
129
-
130
- - `git` installed
131
- - `gh` installed and authenticated (`gh auth status`)
132
- - SSH key added to GitHub (`gh ssh-key list`)