# @salesforce/templates

> Salesforce JS library for templates

Latest version **66.17.2** (published 2026-10-13) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @salesforce/templates
pnpm add @salesforce/templates
yarn add @salesforce/templates
bun add @salesforce/templates
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support; large bundle.

## Facts

| | |
|---|---|
| Version | 66.17.2 |
| Published | 2026-10-13 |
| First published | 2020-08-18 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=22.0.0 |
| Dependencies | 8 |
| Unpacked size | 14.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 92 |
| Author | Salesforce |
| Maintainers | ire-npm-team-user, jimjag, salesforce-releases, jasonschroeder-sfdc, mobify, lwc-admin, salesforce-admin |

## Links

- npm: https://www.npmjs.com/package/@salesforce/templates
- Repository: https://github.com/forcedotcom/salesforcedx-templates
- Issues: https://github.com/forcedotcom/salesforcedx-templates/issues
- npm.io page: https://npm.io/package/@salesforce/templates

## Dependencies (8)

- [ejs](https://npm.io/package/ejs.md) ^3.1.10
- [got](https://npm.io/package/got.md) ^11.8.6
- [tar](https://npm.io/package/tar.md) ^7.5.22
- [tslib](https://npm.io/package/tslib.md) ^2.8.1
- [hpagent](https://npm.io/package/hpagent.md) ^1.2.0
- [mime-types](https://npm.io/package/mime-types.md) ^3.0.2
- [proxy-from-env](https://npm.io/package/proxy-from-env.md) ^1.1.0
- [@salesforce/kit](https://npm.io/package/@salesforce/kit.md) ^4.0.0

## Recent versions

- 66.17.2 (latest) — 2026-10-13
- 66.17.0-beta.3 (beta) — 2026-10-01
- 66.17.1 — 2026-10-13
- 66.17.0 — 2026-10-13
- 66.16.4 — 2026-10-07
- 66.16.3 — 2026-10-02
- 66.16.2 — 2026-10-01
- 66.17.0-beta.2 — 2026-09-30
- 66.17.0-beta.0 — 2026-09-29
- 66.16.0 — 2026-09-11
- 66.15.0 — 2026-09-09
- 66.14.0 — 2026-09-03
- 66.13.9 — 2026-08-20
- 66.13.8 — 2026-08-17
- 66.13.7 — 2026-08-14
- … 179 more at https://npm.io/package/@salesforce/templates/versions

## README

# salesforcedx-templates

[![Known Vulnerabilities](https://snyk.io/test/github/forcedotcom/salesforcedx-templates/badge.svg)](https://snyk.io/test/github/forcedotcom/salesforcedx-templates)
[![License](https://img.shields.io/npm/l/salesforcedx-templates.svg)](https://github.com/forcedotcom/salesforcedx-templates/blob/master/package.json)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

## Introduction

This repository provides:

- [@salesforce/templates](https://www.npmjs.com/package/@salesforce/templates) to support the library and [Salesforce VS Code extensions](https://github.com/forcedotcom/salesforcedx-vscode/).

### Consumer build requirements (e.g. salesforcedx-vscode)

Repos that **bundle** `@salesforce/templates` (e.g. with esbuild) and use a templates manifest must:

1. **Copy built-in templates into the bundle output** before the bundle step that runs `generateTemplatesManifest`. The published package includes templates at `lib/templates`. You can copy from that path, or use the exported path:
   - `getBuiltinTemplatesPath` (returns the resolved path to `lib/templates` when not on the web platform; `undefined` on web).
2. **Wireit / task order**: Ensure the script that populates `dist/templates` (or your equivalent) runs **before** the `vscode:bundle` (or similar) task. Otherwise the bundle step will fail with `ENOENT: no such file or directory, scandir '.../dist/templates'`.

Template paths inside the package are kept short (via placeholders in `lib/templates`) so they stay within Windows path limits used by `pack:verify`.

## Getting Started

If you're interested in contributing, take a look at the [CONTRIBUTING](CONTRIBUTING.md) guide.

If you're interested in building the library locally, take a look at the development [doc](contributing/developing.md).

You can find more information about commands that the related [plugin](https://github.com/salesforcecli/plugin-templates) provides in the [commands](COMMANDS.md) doc.

## Bump DEFAULT_API_VERSION

`DEFAULT_API_VERSION` is maintained in `src/utils/constants.ts`. Please bump the value every time there is a major release.

---
_Source: https://npm.io/package/@salesforce/templates · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
