{"id":28403482,"url":"https://github.com/srerickson/ocfl-index","last_synced_at":"2026-04-29T09:33:46.174Z","repository":{"id":47479643,"uuid":"516134474","full_name":"srerickson/ocfl-index","owner":"srerickson","description":"An API for OCFL repositories","archived":true,"fork":false,"pushed_at":"2023-11-06T21:54:04.000Z","size":411,"stargazers_count":7,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-27T08:42:27.625Z","etag":null,"topics":["connect-go","golang","grpc","ocfl"],"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/srerickson.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":"2022-07-20T21:06:06.000Z","updated_at":"2023-11-08T01:59:55.000Z","dependencies_parsed_at":"2023-11-07T03:43:34.406Z","dependency_job_id":null,"html_url":"https://github.com/srerickson/ocfl-index","commit_stats":{"total_commits":66,"total_committers":2,"mean_commits":33.0,"dds":"0.19696969696969702","last_synced_commit":"9c41fef05f58bf1c86d7fe18ad8ed12a1e5baa59"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/srerickson/ocfl-index","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srerickson%2Focfl-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srerickson%2Focfl-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srerickson%2Focfl-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srerickson%2Focfl-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srerickson","download_url":"https://codeload.github.com/srerickson/ocfl-index/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srerickson%2Focfl-index/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32420153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["connect-go","golang","grpc","ocfl"],"created_at":"2025-06-01T18:00:44.674Z","updated_at":"2026-04-29T09:33:46.141Z","avatar_url":"https://github.com/srerickson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **Note**\n\u003e This repo is for reference only. The code is no longer maintained. Work has moved to [https://github.com/srerickson/chaparral/](https://github.com/srerickson/chaparral/).\n\n# ocfl-index\n\n`ocfl-index` provides a lightweight http/gRPC-based API for indexing and accessing the contents of [OCFL-based repositories](https://ocfl.io). It can serve content from OCFL storage roots on the local file system or in the cloud (S3, Azure, and GCS). The index is currently stored in an sqlite3 database, however additional database backends may be implemented in the future.\n\nThis project is currently in a *pre-release* development phase. It should not be used in production settings and breaking changes to the API are likely.\n\nThis repository includes a command line client, `ox`, as well as protocol buffer schemata and service definitions that can be used to auto-generate client libraries for a variety of programming languages.\n\n## Usage Example\n\n### Configure and Start the Server\n```sh\n# s3 credentials\n$ export AWS_ACCESS_KEY_ID= ... \n$ export AWS_SECRET_ACCESS_KEY=...\n$ export AWS_REGION=...\n$ export AWS_S3_ENDPOINT=\"http://localhost:9000\" # for non-aws S3 endpoint\n\n$ export OCFL_INDEX_BACKEND=\"s3\"                # storage backend type: \"fs\", \"s3\", or \"azure\"\n$ export OCFL_INDEX_BUCKET=\"ocfl\"               # cloud bucket (for s3, azure)\n$ export OCFL_INDEX_STOREDIR=\"public-data\"      # path/prefix to storage root\n$ export OCFL_INDEX_SQLITE=\"public-data.sqlite\" # local path to index file\n\n# start the server (see hack/startup_podman for container deployment example)\n$ ocfl-index server\n```\n\nAlternatively, you can start the server with docker/podman:\n\n```sh\n# create volume for index data\nvolume=\"ocfl-index-data\"\nif ! $(podman volume exists $volume); then\n    echo \"creating volume: $volume\"\n    podman volume create \"$volume\"\nfi\n\npodman run --rm -it \\\n    -e AZURE_STORAGE_ACCOUNT=\"$AZURE_STORAGE_ACCOUNT\" \\\n    -e AZURE_STORAGE_KEY=\"$AZURE_STORAGE_KEY\" \\\n    -e OCFL_INDEX_BACKEND=\"azure\" \\\n    -e OCFL_INDEX_BUCKET=\"ocfl\" \\\n    -e OCFL_INDEX_STOREDIR=\"public-data\" \\\n    -e OCFL_INDEX_SQLITE=\"/data/public-data.sqlite\" \\\n    -v ocfl-index-data:/data \\\n    -p 8080:8080 \\\n    docker.io/srerickson/ocfl-index:latest\n```\n\n### Using the `ox` cli\n\n```sh\n# set server endpoint (default is \"http://localhost:8080\")\n$ export OCFL_INDEX=\"https://myindex\"\n\n# build the index \n# the command returns immediately but the indexing process may take a while\n$ ox reindex\n\n# index status\n$ ox status\n\u003e OCFL spec: 1.1\n\u003e storage root description: Demo Data Collections\n\u003e indexed inventories: 8\n\n# list objects\n$ ox ls\n\u003e 990041176260203776 v1 2022-10-10 21:30\n\u003e 990046797110203776 v1 2022-10-11 22:35\n\u003e ...\n\n# list contents of an object \n$ ox ls 990041176260203776 \n\u003e [a1139d44] gazetteer.zip \n\u003e [f2fb20b2] meta.json\n\u003e ...\n\n# you can also reindex the object if it hasn't been\n$ ox ls --reindex 990041176260203776\n\u003e [a1139d44] gazetteer.zip \n\u003e [f2fb20b2] meta.json\n\u003e ...\n\n# save object locally\n$ ox export 990041176260203776 outdir\n\u003e downloading files ...\n\n```\n\nSee the `clients` directory for gRPC client examples.\n\n## API Documentation\n\nThe `ocfl-index` gRPC service definition is distributed using [buf.build](https://buf.build/srerickson/ocfl/docs/main:ocfl.v1#ocfl.v1.IndexService).\n\n## Development\n\n```sh\n# sqlc is used to generate code for sqlite queries\ngo install github.com/kyleconroy/sqlc/cmd/sqlc@latest\n\n# buf is used for grpc code generation\ngo install github.com/bufbuild/buf/cmd/buf@latest\ngo install github.com/bufbuild/connect-go/cmd/protoc-gen-connect-go@latest\ngo install google.golang.org/protobuf/cmd/protoc-gen-go@latest\n```\n\nTo regenerate gRPC stubs:\n\n```sh\nbuf generate api\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrerickson%2Focfl-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrerickson%2Focfl-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrerickson%2Focfl-index/lists"}