Skip to content
CAI
Software that uses CAICheck a score

railsmechanic/nanoid

67.6

Adequate · 18 September 2026

484

lines of production code

Elixir

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a Nanoid library for Elixir that generates unique identifiers using both cryptographically secure and non-secure methods. It supports custom alphabets with Unicode characters and allows configuration of default settings such as size and alphabet. The library provides a unified API for generation and includes comprehensive test coverage for its configuration and generation modules.

Behavioural changes

NanoID library refactored with configuration module and unified generation API

The NanoID library has been restructured to centralize default settings in a new \Nanoid.Configuration\ module and input validation in \Nanoid.Alphabet\. Both \Nanoid.Secure\ and \Nanoid.NonSecure\ generators now expose a unified \generate\_with/1\ function that accepts \:size\ and \:alphabet\ options, replacing the previous positional argument style which is now deprecated. This change improves consistency between secure and non-secure generation, supports multi-byte graphemes in custom alphabets, and allows defaults to be configured at compile time.

lib/nanoid · high confidence

Nanoid v3.0 release candidate with keyword-based API and Unicode support

The Nanoid library introduces a new keyword-based API (\generate\_with/1\, \generate\_non\_secure\_with/1\) replacing the previous positional-argument functions, which are now deprecated. This update adds Unicode-safe alphabet support, allowing multi-byte graphemes (like emojis or accented characters) to be used correctly. It also enforces stricter input validation, raising descriptive \ArgumentError\ exceptions for invalid alphabets or sizes instead of crashing with \FunctionClauseError\. The minimum Elixir version is bumped to 1.15, and the library no longer ships its own \config/config.exs\, requiring consumers to override defaults in their own application config and force-recompile the dependency.

(repo-wide) · high confidence

Refactored API to use keyword-list options and introduced non-secure generation

The Nanoid API has been restructured to use keyword-list options (e.g., \generate\_with(size: 16, alphabet: "...")\) instead of positional arguments, with the old positional methods marked as deprecated. Additionally, new non-secure generation functions (\generate\_non\_secure/0\, \generate\_non\_secure\_with/1\, etc.) have been added for scenarios where cryptographic strength is not required, delegating to a new \Nanoid.NonSecure\ module.

lib · high confidence

Removal of legacy Mix.Config configuration file

The \config/config.exs\ file, which previously used the \Mix.Config\ module, has been removed from the project. This change eliminates the legacy configuration mechanism, likely as part of a migration to a newer configuration system or to clean up deprecated build artifacts.

config · high confidence

Test coverage

Added test coverage for Nanoid configuration, alphabet handling, and ID generation; Expanded test coverage for Nanoid generation functions.

Dependencies

Upgrade to Elixir 1.15 and update documentation tooling

The project now requires Elixir 1.15 and upgrades the documentation tooling, replacing the older \ex\_doc\ and \earmark\ dependencies with \ex\_doc\ 0.40.3 and its modern \makeup\-based rendering stack (including \earmark\_parser\, \makeup\_elixir\, and \makeup\_erlang\). This change also adds the \:crypto\ application to the project's runtime dependencies and configures the documentation to use the README as the main landing page.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 68.

Lenses

  • Code Health 100
  • Architecture 69
  • Maturity 59
  • Readiness 67
  • Security 100

Changes since last survey

  • 77 commits — 72 feature/other, 5 fixes

By area

  • (root) — 50 commits
  • (repo) — 12 commits
  • lib/nanoid — 8 commits
  • lib/nanoid.ex — 3 commits
  • test/nanoid — 3 commits
  • .github/workflows — 1 commit

Notable commits

  • fix: Fix Elixir 1.11 xref warnings
  • fix: Fix default size
  • fix: Fixed issue #5 where ids with custom size are varying
  • fix: Merge pull request #18 from yordis/fix-docs-link
  • fix: chore: fix exdoc links to github
  • change: - Added configuration section in README - Minor changes to version 2.0.1
  • change: Add Elixir 1.11 to Travis tests
  • change: Add changes for rc.2
  • change: Add configuration module
  • change: Add minor improvements
  • change: Add note about changing configuration
  • change: Add the reason to run re-compile command
  • change: Add version 1.19
  • change: Added License file
  • change: Added elixir 1.10 and OTP 23.0
  • change: Added formater configuration
  • change: Added new test environments
  • change: Bump to v2.0.3
  • change: Bump version
  • change: Bump version to 2.0.5
  • …and 57 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

railsmechanic/nanoid was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 179fcffb0c7a920a659a5b55ea4a01c7297dd98f — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.