Checking a project

aarshi status reads your project and reports what is missing or wrong. It is a read-only check: it never changes a file, so you can run it as often as you like. aarshi check is a shorter alias that gives the same report.

Reading the report

The report has one section per subject, in this order: config, i18n, pages, sections, components and dependencies. A subject with nothing to report shows a ✓. Otherwise its findings are listed underneath:

error
Something is broken or missing. The report counts it, and the exit code is 1.
todo
Something is unfinished, such as an empty translation. The report counts it, but the exit code stays 0.

The last line gives the verdict on the whole project: ✓ project is conformant, ✓ project is conformant (N to do), or error: N errors, M to do.

Exit codes

CodeMeaning
0No error. Todos alone still give 0.
1At least one error was found.
2The project cannot be read: aarshi.toml is missing, unreadable or invalid. The message goes to stderr, and nothing goes to stdout.

The exit code is useful in scripts and continuous integration: a non-zero code stops the pipeline.

Options

--dimension <name>
Shows only some subjects. Repeat the flag or separate names with commas: --dimension config,i18n. The filter only changes the display: the exit code and the summary still cover the whole project, and a line tells you how many findings are hidden.
--errors-only
Hides the todo lines. The verdict and the exit code do not change.
--json
Prints a single JSON document instead of the report, for other tools. It has a format_version field (currently 1), a global summary, and the list of findings with their rule, severity and location. On exit code 2, nothing is printed on stdout.

The subjects

SubjectWhat it checks
configThe base files and folders, aarshi.toml, Tailwind wiring, and the options matching the files.
i18nThe dictionaries: the same keys in every language, empty values, duplicates, languages declared in the config files.
pagesThat each route has a view, that each view has a route, and that the sitemap lists the pages.
sectionsThat each section is imported and used in its view, and that its keys exist.
componentsThe imports of your components, and that each icon has its component.
dependenciesThat the packages your code imports are declared in package.json, and that the lockfile matches package_manager.

Each subject lists the exact rules it runs in the CONVENTIONS.md file of the repository.