issue-folder-sync
Keep the issues in a GitHub repository and a folder on your computer in step, both ways. Each issue becomes a folder with a Markdown file you can edit in any editor. Edits, new folders, ticked boxes, dropped-in files and moved folders go back to GitHub. Put the folder inside Google Drive, Dropbox or OneDrive and your issues are on every device too.
my-folder/
_SYNC-STATUS.md when the last run was and what it did; read this first
Open/<issue title>/ open issues with no milestone
Milestones/<milestone>/<title>/ open issues in a milestone
Closed/<issue title>/ closed issues
issue.md "# <title>", a blank line, then the issue's text
tasks.md the issue's sub-issues as tick boxes (only when it has some)
attachments/ files attached to the issue
.issue.json which issue this folder is; do not edit or copy it
Install
pip install issue-folder-sync
Python 3.9 or newer. It needs only requests. On macOS and Linux, also install keyring so the token can be kept in
the system's password store: pip install "issue-folder-sync[keyring]".
On Windows the token goes in Windows Credential Manager, with no extra package.
Set up
- Make a fine-grained personal access token on GitHub (Settings → Developer settings → Fine-grained tokens),
for this one repository, with Issues: Read and write and Contents: Read and write. Contents is used only
for attachments; without it, set
attachmentstofalse(see Settings). - Run:
issue-folder-sync init --repo owner/name --root "~/Issues"
issue-folder-sync sync # the first run only copies down; nothing is sent to GitHub
issue-folder-sync sync # from now on, both ways
issue-folder-sync schedule --minutes 5 # Windows: a scheduled task. Elsewhere: prints a crontab line
init asks you to paste the token. To read it from a password manager instead, give a command that prints it:
--token-command "op read op://Private/GitHub/token". Add --keep-command to run that command every time instead
of saving the token at all.
For several repositories, give each its own profile: issue-folder-sync --profile work init ..., then
issue-folder-sync --profile work sync.
Commands
| Command | What it does |
|---|---|
init |
set the repository, the folder and the token; checks the token works before keeping it |
sync |
run now, both ways |
sync --dry-run |
say what it would send to GitHub; change nothing anywhere |
sync --pull-only |
copy GitHub down only; send nothing |
sync --allow-many |
lift the changes-per-run safety limit, for one run |
status |
the folder, whether a token was found, the last run, anything that needs you |
config / config --set KEY=VALUE / config --unset KEY |
show or change settings |
schedule / unschedule |
run by itself every few minutes |
What goes which way
| Change made in the folder | What happens on GitHub |
|---|---|
Edit issue.md (the # line is the title) |
the issue's title and text are updated |
Tick, untick or rename a line in tasks.md |
the sub-issue is closed, reopened or renamed |
Add a line - [ ] what to do to tasks.md |
a new sub-issue |
Drop a file into attachments/ |
the file is put in the repository under attachments/ and linked from a comment |
New folder with an issue.md (or a loose .md file) in Open/ or Milestones/<m>/ |
a new issue, in that milestone (made if new) |
Move a folder to Closed/, another milestone or another group |
the issue is closed, reopened, moved or relabelled to match |
Everything on GitHub (text, titles, labels, milestones, sub-issues, attachments, closing) comes down every run.
Safety
- Never deletes an issue, a comment or a file on GitHub. A folder deleted locally is made again; a deleted
attachment stays deleted locally and is listed in
_SYNC-STATUS.md. - Both sides changed the same issue: GitHub's version goes in
issue.md, and the local version is kept beside it asissue.conflict-<time>.md. Nothing is lost; merge by hand and delete the conflict file. - Quiet time: a file changed in the last 45 seconds is left for the next run, because it may still be being typed or synced.
- At most 25 changes are sent per run. More than that is treated as a mistake and waits until you run
sync --allow-many. - The first run in a folder only copies down.
- A new folder whose title matches an open issue is not sent, because it is probably a copy.
- Issues with a label in
skip_labelsare never copied down. Use this for anything that may hold a password.
Settings
Kept per profile in ~/.issue-folder-sync/<profile>/config.json, with the state, the log and the last report.
Change them with issue-folder-sync config --set KEY=VALUE (the value is JSON or plain text).
| Setting | Default | Meaning |
|---|---|---|
repo, root |
— | the repository (owner/name) and the folder |
ignore_issues |
[] |
issue numbers never synced, such as a pinned control issue |
skip_labels |
[] |
issues with any of these labels are never copied down |
group_labels |
{} |
a top level of folders by label, such as {"work": "Work", "home": "Home"}. Moving a folder between them changes the label |
ungrouped_folder |
Unsorted |
where issues with none of the group labels go |
open_folder, closed_folder, milestones_folder |
Open, Closed, Milestones |
folder names |
issue_file, tasks_file, meta_file, attachments_folder |
issue.md, tasks.md, .issue.json, attachments |
file names |
status_file, status_title |
_SYNC-STATUS.md, Sync status |
the status page |
new_issue_labels |
[] |
labels put on issues made from new local folders |
attachments |
true |
sync attachments (needs Contents permission) |
attachments_repo_dir |
attachments |
where uploaded files go in the repository |
attachment_marker |
issue-folder-sync-attachment |
the hidden marker on attachment comments |
max_writes_per_run, quiet_seconds, max_attachment_mb |
25, 45, 25 |
the safety limits |
token_command |
none | a command that prints the token, run when no token is saved |
preset |
none | ready-made settings; see below |
Presets
notes: the Kaiju Notes app, which keeps notes as issues. It uses Work/Personal/Unsorted groups,
Notes/Archived folders and note.md, and it skips issue #1 and the secret-check label. It also hides the
parts of a note that the app maintains itself.
Use it with init --preset notes.
Use it from Python
from pathlib import Path
from issue_folder_sync import GitHub, Sync, settings
cfg = settings.build({"repo": "owner/name", "root": "/path/to/folder", "skip_labels": ["private"]})
gh = GitHub(cfg["repo"], token, dry=False)
report = Sync(cfg, gh, home=Path("~/.my-sync").expanduser()).run()
print(report["pushed"], report["pulled"], report["needs_you"])
home holds this computer's state for that folder; use one per folder.
Develop
pip install -e ".[test]"
pytest
The tests run against a pretend GitHub kept in memory, with no network and no token.
Metadata
Release files for issue-folder-sync 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| issue_folder_sync-0.1.0.tar.gz | 30.2 kB | Without provenance | Details for issue_folder_sync-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| issue_folder_sync-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for issue_folder_sync-0.1.0-py3-none-any.whl |
Total release size: 57.5 kB
Release files / issue_folder_sync-0.1.0.tar.gz
| Download URL | issue_folder_sync-0.1.0.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbda59c97baa0347ff3c791494526accb117b1e63eb73d9e8b4e5db40cb4ffcb
|
|
BLAKE2b-256 checksum How to use checksums |
88f518b29063e00cd9989fd3df21039de4e640e64bfdcd2c8686b5e9edcb9934
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Release files / issue_folder_sync-0.1.0-py3-none-any.whl
| Download URL | issue_folder_sync-0.1.0-py3-none-any.whl |
|---|---|
| Size | 27.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9dad5d4e9a8c8547f474d11d28bd6cf4b3045b669a9454c15cd619ed9421141e
|
|
BLAKE2b-256 checksum How to use checksums |
18bc16eea7f0a1bd2ba906a7a7daa89eed8efc8c2517b3cd2542fb4796a8b8f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Security for issue-folder-sync 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.