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
| Code | Meaning |
|---|---|
0 | No error. Todos alone still give 0. |
1 | At least one error was found. |
2 | The 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
todolines. 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_versionfield (currently1), a globalsummary, and the list of findings with their rule, severity and location. On exit code2, nothing is printed on stdout.
The subjects
| Subject | What it checks |
|---|---|
config | The base files and folders, aarshi.toml, Tailwind wiring, and the options matching the files. |
i18n | The dictionaries: the same keys in every language, empty values, duplicates, languages declared in the config files. |
pages | That each route has a view, that each view has a route, and that the sitemap lists the pages. |
sections | That each section is imported and used in its view, and that its keys exist. |
components | The imports of your components, and that each icon has its component. |
dependencies | That 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.