> For the complete documentation index, see [llms.txt](https://ispectra.gitbook.io/mutamad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ispectra.gitbook.io/mutamad/reference/commands.md). Agents can also search and read this documentation through its [MCP server](https://ispectra.gitbook.io/mutamad/~gitbook/mcp).

# Commands

The commands you will use to install, check, extend and maintain a Mutamad site.

## Project template (DDEV)

| Command                                                   | Does                                                         |
| --------------------------------------------------------- | ------------------------------------------------------------ |
| `ddev install-mutamad`                                    | Installs in Arabic, with English, then runs `mutamad-verify` |
| `ddev install-mutamad --lang=en`                          | Installs in English, with Arabic                             |
| `ddev install-mutamad --quiet`                            | Hides the installer's progress                               |
| `ddev mutamad-verify`                                     | Checks every control on the running site                     |
| `ddev storybook init \| start \| gen \| build \| disable` | Component development (development sites only)               |

{% hint style="warning" %}
`install-mutamad` replaces the site's database. On a site with content, take a snapshot first (`ddev snapshot`) and confirm which site you are on (`ddev drush status`).
{% endhint %}

## Without DDEV

```bash
vendor/bin/drush site:install mutamad --locale=ar --account-name=webmaster --site-name="My entity" --yes
MUTAMAD_URL=https://www.example.gov.sa bash .ddev/commands/web/mutamad-verify
```

## Applying recipes

```bash
# A recipe project (installed into recipes/)
drush recipe ../recipes/mutamad_events

# A module that carries its recipe
drush recipe modules/contrib/mutamad_multilingual
drush recipe modules/contrib/mutamad_search/recipe
drush recipe modules/contrib/mutamad_ai
drush recipe modules/contrib/mutamad_ai/figma

# Then
drush cache:rebuild
```

Recipe paths are relative to the web root.

## Maintenance

| Command                                     | Does                                                     |
| ------------------------------------------- | -------------------------------------------------------- |
| `composer update "drupal/mutamad*" -W`      | Updates Mutamad's projects                               |
| `drush updatedb`                            | Runs database updates                                    |
| `drush cron`                                | Runs scheduled tasks (the server does this every minute) |
| `drush watchdog:show --format=csv`          | Exports the database log                                 |
| `drush locale:check && drush locale:update` | Fetches new translations                                 |
| `drush user:login`                          | A one-time login link                                    |
| `drush user:unblock <name>`                 | Unblocks an account                                      |

## Theme

```bash
# Your own theme from Mutamad's starterkit
php web/core/scripts/drupal generate-theme my_entity_theme \
  --starterkit mutamad_theme --path themes/custom
```

## Development

| Command                | Does                                                                        |
| ---------------------- | --------------------------------------------------------------------------- |
| `composer quality`     | PHP\_CodeSniffer (Drupal standards), PHPStan (level 6) and `composer audit` |
| `ddev install-mutamad` | One full install, with every check                                          |
| `ddev mutamad-verify`  | Every control on the running site                                           |
