{"id":13507181,"url":"https://github.com/duailibe/cuid","last_synced_at":"2026-02-21T03:03:18.531Z","repository":{"id":31403748,"uuid":"34967005","full_name":"duailibe/cuid","owner":"duailibe","description":"Collision-resistant ids, in Elixir","archived":false,"fork":false,"pushed_at":"2017-07-03T09:55:25.000Z","size":196,"stargazers_count":55,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-24T13:58:37.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/duailibe.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}},"created_at":"2015-05-02T23:37:09.000Z","updated_at":"2024-07-23T04:33:11.000Z","dependencies_parsed_at":"2022-08-29T11:21:45.908Z","dependency_job_id":null,"html_url":"https://github.com/duailibe/cuid","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/duailibe/cuid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duailibe%2Fcuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duailibe%2Fcuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duailibe%2Fcuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duailibe%2Fcuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duailibe","download_url":"https://codeload.github.com/duailibe/cuid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duailibe%2Fcuid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-08-01T02:00:26.236Z","updated_at":"2026-02-21T03:03:18.514Z","avatar_url":"https://github.com/duailibe.png","language":"Elixir","funding_links":[],"categories":["Algorithms and Data structures","Elixir"],"sub_categories":[],"readme":"cuid\n====\n\nCollision-resistant ids optimized for horizontal scaling and sequential lookup performance,\nwritten in Elixir.\n\nFor full rationale behind CUIDs refer to the [main project site](http://usecuid.org).\n\n\n### Usage\n\nAdd Cuid as a dependency in your `mix.exs` file:\n\n```elixir\ndefp deps do:\n    [{:cuid, \"~\u003e 0.1.0\"}]\nend\n```\n\nRun `mix deps.get` to fetch and compile Cuid. It works as a process\n\n```elixir\n{:ok, pid} = Cuid.start_link\nCuid.generate(pid)  # =\u003e ch72gsb320000udocl363eofy\n```\n\nEach CUID is made by the following groups: `c - h72gsb32 - 0000 - udoc - l363eofy`\n\n* `c` identifies this as a cuid, and allows you to use it in html entity ids. The fixed value helps keep the ids sequential.\n* `h72gsb32` is a timestamp\n* `0000` is a counter\n* `udoc` is a fingerprint. The first two characters are based on the process ID and the next two are based on the hostname. This is the same method used in the [Node implementation](https://github.com/ericelliott/cuid/blob/master/src/node-fingerprint.js)\n* `l363eofy` random (uses `:random.uniform`)\n\n\n### TODOs\n\n* Optimize (it takes 15s to run 200000 generations in my MBP)\n\n\n### Credit\n\n* Lucas Duailibe\n* Eric Elliott (author of [original JavaScript version](http://github.com/ericelliott/cuid))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduailibe%2Fcuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduailibe%2Fcuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduailibe%2Fcuid/lists"}