---
schema_version: "1"
id: c1627e06f4ec9770f43a757b79303f6337f1dceae3f461c10b679d16641edb47
title: Create a Template with the Command Line Interface
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_wave_templates/guides/task/bi-templatesdev-create-object-cli.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/guide/bi-templatesdev-create-object-cli.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 53fdcc8ef2682c5882bf9a6f4dda602ecb80c12b4d09b13ca03b7cde7fb84c47
products:
  - Analytics Templates Developer Guide
  - analytics
---

# Create a Template with the Command Line Interface

Use `analytics template` commands to create templates with the Salesforce Analytics Command Line Interface (CLI). You can also use the CLI to manage existing templates.

1.  Get a list of available apps. In the CLI, enter the command `sf analytics app list`. The command returns a list of all apps in your org.

    ```nolang
    >>sf analytics app list

    NAME        LABEL       FOLDERID            STATUS           TEMPLATESOURCEID
    ──────────  ──────────  ───────────  ──────
    MyNewApp  MyNewTemplate  00l0S000000MmGQQA0  newstatus
    SharedApp1  Shared App  00l0S000000Mm9tQAC  completedstatus  0Nk0S0000008OJDSA2
    SharedApp   Shared App  00l0S000000EEVUQA4  newstatus        0Nk0S0000008OJDSA2
    ```

2.  Look for your source app. If you haven’t already identified its folderID, find it in the response to the `list` command.

3.  Create the template. Enter the command `analytics template create`. Here’s syntax for the command.

    `analytics template create -f folderid [-u username --apiversion api_version --json --loglevel log_level]`

    |               |                                                                                                                                                      |
    | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
    | _folderid_    | Required. The ID of the source app to use when creating the template. You can use `analytics:app:list`to see information about the apps on your org. |
    | _username_    | The user name or alias of the target org. If not specified, CRM Analytics uses the default org.                                                      |
    | _api_version_ | The API version to use for this command.                                                                                                             |
    | `--json`      | Use this flag to specify format the output as JSON.                                                                                                  |
    | `--loglevel`  | Specify the log level for this command. Allowed values are `trace`, `debug`, `info`, `warn`, `error`, and `fatal`                                    |

    The command returns something like the following: `Successfully created analytics template [0Nk0S0000008OJNSA2]`

    The WaveTemplate object and all its files are on your scratch org. Next, retrieve the object by pulling the files to your local workstation for editing.

**See Also**

- [Salesforce Analytics Plugin CLI Command Reference: template Commands](https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_cli_reference.meta/bi_dev_guide_cli_reference/bi_cli_reference_analytics_template_unified.htm)
