---
title: "How to Automatically Create a JIRA Project Using the JIRA CLI"
canonical: "https://support.appfire.com/space/SUPPORT/89139638/How%20to%20Automatically%20Create%20a%20JIRA%20Project%20Using%20the%20JIRA%20CLI"
format: markdown
---
> Macro (div)
> 
> ### On this page
> 
> > Macro (toc)

> Macro (include)

# Recipe overview

<span style="color: #333333">This recipe provides step-by-step instructions on how to create a JIRA project and associate existing schemes to it using the </span>[<span style="color: #333333">JIRA Command Line Utility (CLI)</span>](https://marketplace.atlassian.com/plugins/org.swift.jira.cli)<span style="color: #333333"> add-on. </span><span style="color: #333333">This allows a JIRA Administrator to quickly, consistently and flawlessly create new projects when requested by your users, especially after you have created your project templates</span><span style="color: #333333"> to standardize your organization's use for JIRA.</span>

<span style="color: #333333">You will need JIRA Administrator permissions to your JIRA instance in order to complete this recipe.</span>

:info:<span style="color: #333333"> It will take you approximately 5 minutes to complete this recipe.</span>

:warning:<span style="color: #333333"> </span><span style="color: #333333">Note that this recipe is currently optimized for JIRA 6.4. Stay tuned for another version optimized for JIRA 7.</span>

# Recipe level

> Macro (table-plus)
> 
> ![image](media://233793e8-2e72-40bb-99a5-f71a75aa6887)

# Ingredients

> Macro (table-plus)
> 
> |  |  |
> | --- | --- |
> | ![image](media://aa776cb9-90ac-4dc3-8a23-72debe3eea04) | [JIRA](https://bobswift.atlassian.net/wiki/spaces/recipes/pages/108233015/JIRA+Recipes) |
> | ![image](media://5ff0d401-f492-4147-a485-0417765e6c74) | [JIRA Command Line Interface (CLI)](https://bobswift.atlassian.net/wiki/spaces/recipes/pages/108232826/JIRA+Command+Line+Interface+%28CLI%29+Recipes)<br>> Macro (legacy-content)<br>> Macro (legacy-content) |

# Preparation

- Install the latest [downloadable JIRA CLI Client](https://appfire.atlassian.net/wiki/spaces/info/pages/86081659) on your computer.
- If you have not done so already, follow all of the CLI installation instructions for [JIRA](https://appfire.atlassian.net/wiki/spaces/JCLI/pages/70782392) <u>including the steps marked optional</u>.
- Open a  [command window](https://appfire.atlassian.net/wiki/spaces/SUPPORT/pages/89141112) you'll use to execute CLI commands.

# Steps

> Macro (table-plus)
> 
> |  |  |  |
> | --- | --- | --- |
> | [step1](#HowtoAutomaticallyCreateaJIRAProjectUsingtheJIRACLI-step1) | ## Create Example Schemes<br>> Macro (legacy-content)<br>In this step, you will be creating a JIRA project using the Create Project wizard. This ensures you have a full set of schemes that can be used later on when creating a new project via the JIRA CLI.  In real life, you'd create (or identify a pre-existing) project and schemes on which you want to base future projects.<br>In your JIRA instance, do the following:<br>1. From the **Projects** menu, choose **Create Project** to begin the Create Project wizard.
>   1. On the first screen, choose **Simple Issue Tracking** and click **Next**.
>   2. The second screen shows you the Issue Types the project will use. Click **Select**.
>   3. On the final screen, specify the values shown on the right and then click **Submit**. The Create Project window is closed and the new project is created.
> 2. Click the Cog icon
>   and choose **Projects** to go into the Project List administration screen.
> 3. Click the **Recipe Testing** link in the Name column to view your new project's Summary screen. It should look like the screenshot shown to the right. Each scheme associated with this project is highlighted with an arrow and is also listed below. | > Macro (anchor)
> 
> **Project values, input on final screen of the Create Project wizard:**<br>> Macro (nested-table)<br>**Project Summary page:**<br>![image](media://eb567578-b638-456d-8f78-3011e6354e2e) |
> | --- |
> | [step2](#HowtoAutomaticallyCreateaJIRAProjectUsingtheJIRACLI-step2) | ## Create JIRA CLI command<br>> Macro (legacy-content)<br>In this step, you will form the command line that will invoke the JIRA CLI to create the project.<br>The command is shown to the right.<br>1. `jira` indicates to invoke the JIRA CLI client.
> 2. `The ``createProject `[action](https://appfire.atlassian.net/wiki/display/HCLI/Reference) indicates you want to create a new JIRA project. This action uses the following parameters:
>   1. `--project` identifies the project key you want to use for the new project. This should be a 2-10 character string that conforms to any [naming standards](https://confluence.atlassian.com/display/JIRA/Changing+the+Project+Key+Format) you may have established.
>   2. `--name` indicates the name of the new project.
>   3. `--lead` indicates the userid of the user who will be the project lead of the new project.
>   4. `--defaultAssignee` indicates who will be the default Assignee on newly created issues for the new project. Allowable values are "PROJECT_LEAD", "PROJECT_DEFAULT", "COMPONENT_LEAD" or "UNASSIGNED." You can supply a value of "UNASSIGNED" or omit this parameter entirely to indicate that the default Assignee should be "Unassigned."
>   5. `--issueTypeScheme` indicates the name or id of the Issue Type Scheme to associate to the new project. In this recipe, you'll set it to use the one used by the RECIPE project you created in Step 1.
>   6. `--issueTypeScreenScheme` indicates the name or id of the Issue Type Screen Scheme to associate to the new project. In this recipe, you'll set it to use the one used by the RECIPE project you created in Step 1.
>   7. `--workflowScheme` indicates the name or id of the Workflow Scheme to associate to the new project. In this recipe, you'll set it to use the one used by the RECIPE project you created in Step 1.<br>> ℹ️ **Using Default Schemes**
> > ℹ️ 
> > ℹ️ You may have noticed that the example command line does not contain the --fieldConfiguration, --notificationScheme or --permissionScheme parameters. When any of these are omitted, JIRA CLI associates the new project to the corresponding default scheme.<br>> ℹ️ **Using the Lookup Parameter**
> > ℹ️ 
> > ℹ️ If you add the `--lookup` parameter to the example command shown, then `--lead` can be specified as a *partial* userid and the system will do a search for that user.
> > ℹ️ 
> > ℹ️ As long as the search finds a single user matching that partial string, that user can be set as the project lead. Otherwise, an error will occur. | > Macro (anchor)
> 
> **Example command:**<br>```plaintext
> jira --action createProject --project "projectkey" --name "projectname" --lead "joe" --defaultAssignee "UNASSIGNED" --issueTypeScheme "RECIPE: Simple Issue Tracking Issue Type Scheme" --issueTypeScreenScheme "RECIPE: Simple Issue Tracking Issue Type Screen Scheme" --workflowScheme "RECIPE: Simple Issue Tracking Workflow Scheme"
> ``` |
> | --- |
> | [step3](#HowtoAutomaticallyCreateaJIRAProjectUsingtheJIRACLI-step3) | ## Execute JIRA CLI command<br>> Macro (legacy-content)<br>In your command window, type the command from the previous step and press Enter.<br>The command will run, showing the result of executing the createProject action.<br>To inspect the newly created project, click the Cog icon > Macro (inline-media-image)
> 
>  and choose **Projects** to go into the Project List administration screen. Then click the **projectname **link in the Name column to view your new project's Summary screen. It should look similar to the screenshot shown to the right.<br>That's it! With one command, you've created a JIRA project and saved yourself from having to complete many steps to do it! | > Macro (anchor)
> 
> **Example output:**<br>```plaintext
> Project 'projectname' created with key PROJECTKEY and id 10101.
> ```<br>**Project Summary page:**<br>![image](media://1fee773b-31cc-4a4c-a8da-6c94c3c26ef2) |

> Macro (include)