Skip to content
CAI
Software that uses CAICheck a score

railsmechanic/nanoid

65.6

Adequate · 15 November 2026

484

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 66 (-0.3)
  • Rubric changed (rubric-2026.11.1 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 100 → 96 (-4.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 54 → 54 (+0.0)
  • Readiness 69 → 69 (+0.0)
  • Security 100 → 100 (+0.0)

New (2)

  • Edited copy of a member (10 corresponding lines) (lib/nanoid/non_secure.ex)
  • Edited copy of a member (4 corresponding lines) (lib/nanoid/non_secure.ex)

Written by cca.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 15 November 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.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.73+preprod-52de90b74216.