{"id":41840448,"url":"https://github.com/xh3b4sd/roghfs","last_synced_at":"2026-01-25T09:20:52.488Z","repository":{"id":311612135,"uuid":"1044249561","full_name":"xh3b4sd/roghfs","owner":"xh3b4sd","description":"read-only afero.Fs for remote Github repositories","archived":false,"fork":false,"pushed_at":"2025-12-29T11:20:54.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T00:19:47.591Z","etag":null,"topics":["afero","filesystem","github","remote-access"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/0xSplits/roghfs","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/xh3b4sd.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":".github/CODEOWNERS","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":"2025-08-25T12:02:24.000Z","updated_at":"2025-12-29T11:20:56.000Z","dependencies_parsed_at":"2025-08-25T15:19:59.807Z","dependency_job_id":"40ede584-93e9-4943-8503-cf0a10b39d76","html_url":"https://github.com/xh3b4sd/roghfs","commit_stats":null,"previous_names":["0xsplits/roghfs"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/xh3b4sd/roghfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xh3b4sd%2Froghfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xh3b4sd%2Froghfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xh3b4sd%2Froghfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xh3b4sd%2Froghfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xh3b4sd","download_url":"https://codeload.github.com/xh3b4sd/roghfs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xh3b4sd%2Froghfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28750872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T09:00:19.176Z","status":"ssl_error","status_checked_at":"2026-01-25T09:00:04.131Z","response_time":113,"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":["afero","filesystem","github","remote-access"],"created_at":"2026-01-25T09:20:52.386Z","updated_at":"2026-01-25T09:20:52.473Z","avatar_url":"https://github.com/xh3b4sd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# roghfs\n\nRoghfs stands for **R**ead-**O**nly **G**it**H**ub **F**ile **S**ystem. This is\nan [afero.Fs] implementation allowing efficient reads for file content of remote\nGithub repositories. The provided Github auth token may allow for accessing\nprivate repositories too. The original use case for this package came from\n[Kayron], our release operator.\n\n![Roghfs Overview](.github/assets/Roghfs-Overview.svg)\n\n### Usage\n\n[afero.Walk] takes a standard [filepath.WalkFunc], so that you can traverse any\nGithub repository as if it were located on your host machine. Note that this\nfile system implementation has been built with concurrency in mind, and basic\nsynchronization primitives are in place, though real concurrency under load has\nnot been tested at the time of writing. If you ever encounter any problems,\nplease create an issue or reach out otherwise.\n\n```go\n// https://github.com/0xSplits/kayron/commit/d2f2a18b998172039c6f2a325d4c83de20819e3e\n\ngfs := roghfs.New(roghfs.Config{\n\tBas: afero.NewMemMapFs(),\n\tGit: github.NewClient(nil).WithAuthToken(\"...\"),\n\tOwn: \"0xSplits\",\n\tRep: \"kayron\",\n\tRef: \"d2f2a18b998172039c6f2a325d4c83de20819e3e\",\n})\n\nerr := afero.Walk(gfs, \".\", func(pat string, fil fs.FileInfo, err error) error {\n  return nil\n})\n```\n\n### Development\n\nAll changes made need to comply with the `afero.Fs` interface first and\nforemost. There is an integration test configured to run in CI, which provides a\npretty good indicator for whether the package works as expected. It should be\nstraight forward to abstract the current implementation further in order to\ninject remote clients other than the current tightly coupled Github client, e.g.\nGitlab or Bitbucket etc.\n\n```go\ntype Fs interface {\n\t// Create creates a file in the filesystem, returning the file and an\n\t// error, if any happens.\n\tCreate(name string) (File, error)\n\n\t// Mkdir creates a directory in the filesystem, return an error if any\n\t// happens.\n\tMkdir(name string, perm os.FileMode) error\n\n\t// MkdirAll creates a directory path and all parents that does not exist\n\t// yet.\n\tMkdirAll(path string, perm os.FileMode) error\n\n\t// Open opens a file, returning it or an error, if any happens.\n\tOpen(name string) (File, error)\n\n\t// OpenFile opens a file using the given flags and the given mode.\n\tOpenFile(name string, flag int, perm os.FileMode) (File, error)\n\n\t// Remove removes a file identified by name, returning an error, if any\n\t// happens.\n\tRemove(name string) error\n\n\t// RemoveAll removes a directory path and any children it contains. It\n\t// does not fail if the path does not exist (return nil).\n\tRemoveAll(path string) error\n\n\t// Rename renames a file.\n\tRename(oldname, newname string) error\n\n\t// Stat returns a FileInfo describing the named file, or an error, if any\n\t// happens.\n\tStat(name string) (os.FileInfo, error)\n\n\t// The name of this FileSystem\n\tName() string\n\n\t// Chmod changes the mode of the named file to mode.\n\tChmod(name string, mode os.FileMode) error\n\n\t// Chown changes the uid and gid of the named file.\n\tChown(name string, uid, gid int) error\n\n\t// Chtimes changes the access and modification times of the named file\n\tChtimes(name string, atime time.Time, mtime time.Time) error\n}\n```\n\n[afero.Fs]: https://github.com/spf13/afero\n[afero.Walk]: https://pkg.go.dev/github.com/spf13/afero#Walk\n[filepath.WalkFunc]: https://pkg.go.dev/path/filepath#WalkFunc\n[Kayron]: https://github.com/0xSplits/kayron\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxh3b4sd%2Froghfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxh3b4sd%2Froghfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxh3b4sd%2Froghfs/lists"}