{"id":41585491,"url":"https://github.com/jackchuka/gh-md","last_synced_at":"2026-03-15T17:01:00.009Z","repository":{"id":334348058,"uuid":"1139929493","full_name":"jackchuka/gh-md","owner":"jackchuka","description":"GitHub issues and PRs as local markdown files you can actually edit","archived":false,"fork":false,"pushed_at":"2026-01-24T07:57:11.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-24T17:46:09.770Z","etag":null,"topics":["developer-tools","gh-extension","github-cli","markdown"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackchuka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-22T15:50:56.000Z","updated_at":"2026-01-24T12:12:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jackchuka/gh-md","commit_stats":null,"previous_names":["jackchuka/gh-md"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jackchuka/gh-md","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fgh-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fgh-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fgh-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fgh-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackchuka","download_url":"https://codeload.github.com/jackchuka/gh-md/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fgh-md/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28941930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T11:39:38.044Z","status":"ssl_error","status_checked_at":"2026-01-31T11:39:27.765Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","gh-extension","github-cli","markdown"],"created_at":"2026-01-24T09:03:21.340Z","updated_at":"2026-01-31T12:03:16.937Z","avatar_url":"https://github.com/jackchuka.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-md\n\n[![Test](https://github.com/jackchuka/gh-md/workflows/Test/badge.svg)](https://github.com/jackchuka/gh-md/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jackchuka/gh-md)](https://goreportcard.com/report/github.com/jackchuka/gh-md)\n\nA GitHub CLI extension that syncs GitHub Issues, Pull Requests, and Discussions to local markdown files with bidirectional support.\n\n## Features\n\n- **Smart context detection** - Commands auto-detect your git repo and branch\n- **Pull** GitHub data as markdown files with YAML frontmatter\n- **Push** local changes back to GitHub (title, body, state, comments)\n- **Browse** local files interactively with FZF and CEL filtering\n- **Prune** delete closed/merged items to keep your workspace clean\n- **Conflict detection** prevents overwriting newer remote changes\n- **AI-friendly** format ideal for use with coding assistants and local tools\n\n## Installation\n\n```bash\ngh extension install jackchuka/gh-md\n```\n\nRequires [GitHub CLI](https://cli.github.com/) with authentication (`gh auth login`).\n\n## Quickstart\n\n```bash\n# Pull issues from a repo\ngh md pull owner/repo --issues\n\n# Browse and select a file\ngh md\n\n# Edit in your editor, then push changes\ngh md push ~/.gh-md/owner/repo/issues/123.md\n```\n\n## Smart Context Detection\n\nWhen run inside a git repository, commands automatically detect your repo and branch:\n\n| Command       | On feature branch with PR | On main/master       | Outside git repo      |\n| ------------- | ------------------------- | -------------------- | --------------------- |\n| `gh md`       | FZF pre-filtered to PR    | FZF filtered to repo | Show all items        |\n| `gh md pull`  | Pull that PR with reviews | Pull all repo items  | Requires `owner/repo` |\n| `gh md push`  | FZF filtered to repo      | FZF filtered to repo | Requires file path    |\n| `gh md prune` | Prune current repo        | Prune current repo   | Prune all repos       |\n\n```bash\n# Inside a git repo on a feature branch with an open PR:\ngh md pull    # Pulls your PR with all review comments\ngh md         # Opens FZF pre-filtered to your PR\ngh md push    # Opens FZF to select file from current repo\ngh md prune   # Prunes closed items from current repo\n```\n\n## Usage\n\n### Browse (default)\n\nInteractively browse local files with [FZF](https://github.com/junegunn/fzf).\n\nWhen run inside a git repo, FZF is pre-filtered to your current repo (or PR if on a feature branch). Clear the query to see all items.\n\n```bash\n# Smart: pre-filtered to current repo/PR\ngh md\n\n# Browse within a specific repository\ngh md owner/repo\n\n# Filter by type\ngh md --issues\ngh md --prs\ngh md --discussions\n\n# Filter by status\ngh md --new          # Items updated since last pull\ngh md --assigned     # Items assigned to you\n\n# Advanced filtering with CEL expressions\ngh md --filter 'state == \"open\"'\ngh md --filter 'labels.exists(l, l == \"bug\")'\ngh md --filter 'created \u003e now - duration(\"168h\")'  # Last 7 days\n\n# Non-interactive list mode\ngh md --list\ngh md --list --format=json    # Output as JSON\ngh md --list --format=yaml    # Output as YAML\n```\n\n**Actions after selection:**\n\n- Open in `$EDITOR`\n- Push changes to GitHub\n- View in browser\n- Copy file path\n- Pull fresh from GitHub\n\nRequires [FZF](https://github.com/junegunn/fzf) to be installed (`brew install fzf`).\n\n### Pull\n\nFetch GitHub data and save as local markdown files. Uses incremental sync by default.\n\nWhen run without arguments inside a git repo:\n\n- On a feature branch with PR: pulls that PR with all review comments\n- On main/master: pulls all items for the current repository\n\n```bash\n# Smart: pull based on git context\ngh md pull\n\n# Pull all issues, PRs, and discussions from a repository\ngh md pull owner/repo\n\n# Pull only issues\ngh md pull owner/repo --issues\n\n# Pull only pull requests\ngh md pull owner/repo --prs\n\n# Pull only discussions\ngh md pull owner/repo --discussions\n\n# Limit the number of items\ngh md pull owner/repo --issues --limit 10\n\n# Pull only open items\ngh md pull owner/repo --open-only\n\n# Force full sync (ignore last sync timestamp)\ngh md pull owner/repo --full\n\n# Pull a specific item by URL\ngh md pull https://github.com/owner/repo/issues/123\n\n# Pull all previously synced repositories\ngh md pull --all\n```\n\n### Push\n\nPush local markdown changes back to GitHub.\n\nWhen run without arguments inside a git repo, opens FZF to select a file from the current repo.\n\n```bash\n# Smart: FZF selector for current repo\ngh md push\n\n# Push changes from a local file\ngh md push owner/repo/issues/123.md\n\n# Preview changes without pushing\ngh md push --dry-run owner/repo/issues/123.md\n\n# Force push even if remote has newer changes\ngh md push --force owner/repo/issues/123.md\n```\n\n**What you can push:**\n\n- Title and body changes\n- State changes (open/closed)\n- New comments\n- Edited comments\n\n### Prune\n\nDelete local files for closed issues and merged/closed PRs.\n\nWhen run inside a git repo, defaults to pruning only the current repository.\n\n```bash\n# Smart: prune current repo (dry-run)\ngh md prune\n\n# Actually delete files\ngh md prune --confirm\n\n# Prune a specific repository\ngh md prune owner/repo --confirm\n\n# Output as JSON or YAML\ngh md prune --format=json\ngh md prune --format=yaml\n```\n\n### Repos\n\nList all repositories that have been synced with gh-md.\n\n```bash\n# List all managed repositories\ngh md repos\n\n# Output as JSON or YAML\ngh md repos --format=json\ngh md repos --format=yaml\n```\n\n## File Format\n\nFiles are stored as markdown with YAML frontmatter:\n\n```markdown\n---\nid: I_abc123\nurl: https://github.com/owner/repo/issues/123\nnumber: 123\nowner: owner\nrepo: repo\ntitle: Example Issue\nstate: open\nlabels: [bug, help wanted]\nassignees: [octocat]\ncreated: 2026-01-01T00:00:00Z\nupdated: 2026-01-24T12:00:00Z\nlast_pulled: 2026-01-24T12:30:00Z\n---\n\n\u003c!-- gh-md:content --\u003e\n\n# Example Issue\n\nIssue body content here.\n\n\u003c!-- /gh-md:content --\u003e\n\n---\n\n\u003c!-- gh-md:comment\nid: IC_def456\nauthor: octocat\ncreated: 2026-01-02T00:00:00Z\n--\u003e\n\n### @octocat (2026-01-02)\n\nThis is a comment.\n\n\u003c!-- /gh-md:comment --\u003e\n\n\u003c!-- gh-md:new-comment --\u003e\n\nAdd new comments here.\n\n\u003c!-- /gh-md:new-comment --\u003e\n```\n\n## Storage Location\n\nFiles are stored in `~/.gh-md/` by default:\n\n```\n~/.gh-md/\n  owner/\n    repo/\n      issues/\n        123.md\n      pulls/\n        456.md\n      discussions/\n        789.md\n```\n\nOverride with the `GH_MD_ROOT` environment variable:\n\n```bash\nexport GH_MD_ROOT=/path/to/custom/directory\n```\n\n## Use Cases\n\n- **AI Assistants**: Provide context from GitHub issues and PRs to coding assistants\n- **Offline Access**: Browse and edit GitHub content without internet\n- **Bulk Editing**: Make changes to multiple items locally, then push\n- **Backup**: Keep local copies of important discussions\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackchuka%2Fgh-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackchuka%2Fgh-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackchuka%2Fgh-md/lists"}