> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanamobile.com/llms.txt
> Use this file to discover all available pages before exploring further.

# solana-mobile templates

> Manage template repositories.

export const FooterDisclaimer = () => {
  return <p className="not-prose mt-16 text-center text-xs text-gray-500 dark:text-gray-400">
      Code samples on this page are subject to the{" "}
      <a className="underline underline-offset-2" href="https://www.apache.org/licenses/LICENSE-2.0">
        Apache 2.0 license
      </a>
      .
    </p>;
};

Maintain a template repository like [solana-mobile/templates](https://github.com/solana-mobile/templates) — the source of the templates used by [`create`](/cli/create). You only need this command if you author or maintain templates.

## templates check

Check that generated template artifacts are up to date:

<CodeGroup>
  ```bash npm theme={null}
  npx solana-mobile@latest templates check
  ```

  ```bash pnpm theme={null}
  pnpm dlx solana-mobile@latest templates check
  ```

  ```bash bun theme={null}
  bunx solana-mobile@latest templates check
  ```
</CodeGroup>

## templates generate

Generate template artifacts:

<CodeGroup>
  ```bash npm theme={null}
  npx solana-mobile@latest templates generate
  ```

  ```bash pnpm theme={null}
  pnpm dlx solana-mobile@latest templates generate
  ```

  ```bash bun theme={null}
  bunx solana-mobile@latest templates generate
  ```
</CodeGroup>

## templates sync

Sync git-tracked templates to another template repository:

<CodeGroup>
  ```bash npm theme={null}
  npx solana-mobile@latest templates sync ../my-templates
  ```

  ```bash pnpm theme={null}
  pnpm dlx solana-mobile@latest templates sync ../my-templates
  ```

  ```bash bun theme={null}
  bunx solana-mobile@latest templates sync ../my-templates
  ```
</CodeGroup>

| Option      | Description                                                                                  |
| ----------- | -------------------------------------------------------------------------------------------- |
| `--dry-run` | Show what would change without writing                                                       |
| `--force`   | Sync even if the target has uncommitted changes — synced files may be overwritten or removed |

All subcommands accept `--root <path>` to point at a template repository other than the current directory.

<FooterDisclaimer />
