{"id":34116895,"url":"https://github.com/guycipher/erk","last_synced_at":"2026-03-10T18:07:36.105Z","repository":{"id":262567010,"uuid":"887665719","full_name":"guycipher/erk","owner":"guycipher","description":"Merkle tree of provided directory or file.  Hashes files contents, outputs file contents hashes","archived":false,"fork":false,"pushed_at":"2024-11-13T05:09:28.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-03T08:50:03.964Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guycipher.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}},"created_at":"2024-11-13T04:21:53.000Z","updated_at":"2025-05-20T13:28:28.000Z","dependencies_parsed_at":"2024-11-13T05:25:14.867Z","dependency_job_id":"ad455711-f412-42fb-9fc0-398253c000af","html_url":"https://github.com/guycipher/erk","commit_stats":null,"previous_names":["guycipher/erk"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/guycipher/erk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guycipher%2Ferk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guycipher%2Ferk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guycipher%2Ferk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guycipher%2Ferk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guycipher","download_url":"https://codeload.github.com/guycipher/erk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guycipher%2Ferk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30346562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-12-14T20:21:59.755Z","updated_at":"2026-03-10T18:07:36.094Z","avatar_url":"https://github.com/guycipher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":" ## erk\n erk provides functionality to compute the Merkle root and generate a detailed Merkle tree for files within a directory or a single file. It uses the xxHash algorithm(provided by github.com/cespare/xxhash/v2) for hashing file contents.\n\n ### features\n - hash individual files or all files within a directory.\n - construct a Merkle tree from the hashed file data.\n - retrieve the Merkle root of the constructed tree.\n - print the Merkle tree in a human-readable format.\n\n ### basic example\n ```go\n package main\n\n import (\n     \"fmt\"\n     \"log\"\n     \"github.com/guycipher/erk\"\n )\n\n func main() {\n     // Create a new Erk instance\n     e, err := erk.New(\"path/to/directory/or/file\", true) // Set to false if input is a file\n     if err != nil {\n        log.Fatalf(\"Failed to create Erk instance: %v\", err)\n     }\n\n     // Build the Merkle tree\n     root := e.BuildTree()\n\n     // Get the Merkle root\n     merkleRoot := erk.GetMerkleRoot(root)\n     fmt.Printf(\"Merkle Root: %x\\n\", merkleRoot)\n\n     // Print the Merkle tree\n     tree := erk.PrintTreeBytes(root, 0)\n }\n ```\n\n ### example tree output\n ```\n 2e8acb4bccf85227\n     test_dir/f1.txt: 0a75a91375b27d44\n     test_dir/f2.txt: 19a1d238fce6124f\n ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguycipher%2Ferk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguycipher%2Ferk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguycipher%2Ferk/lists"}