Skip to content

analyze ​

Reports what the project actually uses: components, the font registry, and how far each translation has got.

bash
npm run smart-admin -- analyze
npm run analyze
OptionWhat it does
--localesPrint the locale section only.

There is no --help on this command; it runs instead.

The real output ​


Analyzing project...

Components (excluding shared/components/ui — shadcn-managed)
  Total:    99
  ✓ Used:    99
  ✗ Unused:  0

Fonts registered
  Total:  18
  - latin: 13
  - arabic: 5
  Registry entries are what the user CAN pick at runtime, so "unused"
  doesn't cleanly apply. Trim the array directly if you want a smaller
  font picker.
Locales
  Base: en (5744 keys)

  ar             100% keys  complete
      identical to en: 15 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)
  de             100% keys  complete
      identical to en: 267 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)
  en (base)      100% keys  complete
  es             100% keys  complete
      identical to en: 115 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)
  fr             100% keys  complete
      identical to en: 273 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)
  id             100% keys  complete
      identical to en: 193 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)
  it             100% keys  complete
      identical to en: 147 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)
  pt             100% keys  complete
      identical to en: 148 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)
  tr             100% keys  complete
      identical to en: 61 value(s) — untranslated, or a cognate ("CRM", "Kanban", "Profil"…)


Bundle-size impact requires `npm run build` with rollup-plugin-visualizer
(not part of this CLI) — analyze reports surface area, not bytes.

Those are the figures for the template as it ships.

The three sections ​

Components ​

Every component under src/ except shared/components/ui/, which is shadcn-managed and regenerable — counting those would report churn you did not write.

A component is "used" when something imports it. Generate a module, decide against it, and this is what tells you what is left behind.

Fonts ​

The registry's size and its split by script. It deliberately does not report unused fonts. A registry entry is something a reader can pick at runtime, so "unused" does not cleanly apply — nothing imports Poppins until someone chooses it in Settings. Trim the array in fontRegistry.ts if you want a shorter picker.

Locales ​

Key coverage against the base, and then the number worth looking at: how many values are still identical to the base. Full key coverage is easy — add-locale gives it to you on the first run by copying the base's words. It is the identical count that says how much translation is actually left.

The output says so itself: an identical value is either untranslated or a cognate. "CRM" is the same word in every language on the list, and so is "Kanban", so the number is a starting point rather than a defect count.

What it does not do ​

Bundle size. That needs a real build with rollup-plugin-visualizer, which is not part of this CLI. analyze reports surface area, not bytes, and says so at the end rather than leaving you to wonder.