Commands
Every command asks for the values it needs when they are not given as arguments. Flags let you skip the questions, and --yes accepts the defaults.
aarshi setup
Creates a Next.js project in a new folder. aarshi setup . uses the current folder instead.
It asks for the languages (checkboxes among fr, en, es, ja, ko and de), the default language, the site URL, the package manager, the UI components and the icons. Each question has a flag:
| Flag | Skips the question about |
|---|---|
--languages fr,en,ja | the languages |
--default-language ja | the default language |
--site-url https://example.com | the site URL |
--npm, --pnpm, --yarn, --bun | the package manager |
--ui shadcn or --ui base-ui | the UI components |
--icons lucide or --icons none | the icon library |
--agent-feedback, --cache-components | the options (off unless given) |
--yes, -y | every question: the defaults are used |
The answers are saved in aarshi.toml.
aarshi add, step by step
Type aarshi add with no argument, inside the project folder. You do not need to remember any flag: aarshi asks each question in turn.
- What do you want to add? A menu offers Section, Page or Custom component. Move with the arrow keys and press Enter.
- If you chose Section, aarshi asks for the section name. Only lowercase letters, digits and dashes are allowed: an invalid name is refused and you are asked again. Then it asks in which page the section goes. The menu lists the pages found in
views/; its first entry, + Create a new page, creates a page instead. - If you chose Page, aarshi asks for the page name, then creates its view, its route and its sitemap entry.
- If you chose Custom component, aarshi asks for the name and creates a starter file in
components/custom/. - aarshi prints a success message. The new files are already connected to the rest of the project; only the texts remain to write, in the dictionaries.
For a section, aarshi does three things: it creates views/<page>/sections/<section>.tsx, it adds the section to the view, and it adds a title key to every dictionary (for example "about.team.title").
aarshi add -s team about adds a section, aarshi add -p about a page, aarshi add -c badge a component. Leave a name out and aarshi asks for it.
| Command | What it adds | Files it creates or changes |
|---|---|---|
aarshi add -s <section> <page> | a section in a page | views/<page>/sections/, the view, the dictionaries |
aarshi add -p <page> | a page | views/<page>/, app/[locale]/<page>/, app/sitemap.ts, the dictionaries |
aarshi add -c <name> | a custom component | components/custom/<name>.tsx |
If the page given to add -s does not exist, aarshi reports it and asks whether to create it (y/n).
aarshi add-lang
aarshi add-lang de
Adds a language to an existing project. Without a code, aarshi asks for it. It creates the dictionary lib/i18n/dictionaries/de.ts with empty values, and updates the language list of lib/i18n/config.ts, lib/i18n/index.ts and aarshi.toml. Fill in the empty values: until then, aarshi status reports them as todo.
aarshi icons
aarshi icons
aarshi icons --all
Put .svg files in components/icons/, then run the command. It lists them with checkboxes, and each selected file becomes a React component next to it. --all converts every file without asking. An existing component is never overwritten.
Attributes become their React names (class becomes className), inline styles become objects, and simple values become Tailwind classes: width and height become size-*, fill="currentColor" becomes fill-current.
aarshi docs
aarshi docs
Opens this documentation in your browser. The pages are included in the aarshi program and written to a temporary folder each time, so they always match your version of aarshi. The page opens in French when your system language starts with fr, in English otherwise.
aarshi remove and aarshi restore
aarshi remove
aarshi remove --all --yes
aarshi restore
aarshi remove lists what aarshi added to the project (pages, sections and custom components) and removes the ones you pick, with checkboxes. --all selects everything, and --yes skips the confirmation. The home page is never offered: / needs it. A section of a removed page goes with the page.
Before removing anything, aarshi copies every file it is about to change into .aarshi/removed/. aarshi restore copies them back and forgets the removal, so the project files return to their state before remove. Only the last removal can be restored. Files you changed since the removal are overwritten.
.aarshi/ out of git. aarshi adds it to .gitignore when the project has one.
aarshi status
Reads the project and reports what is missing or wrong. It changes nothing. See Checking a project.