Create Application CLI

Description: Creates a new application with a specified key and optional display name. Additional details such as description, business criticality, maturity level, labels, and owners can be provided to further describe the application’s attributes. This command enables the creation of an application using file specs.

Command:

jf apptrust app-create <app-key> --project [command options]

Alias command: jf at ac

Command Options

Option

Required/Optional

Type

Description

<application-key>

required

string

The application key. Must be 2-64 lowercase alphanumeric characters, beginning with a letter (hyphens are supported). The key must be unique and immutable.

--project "<project-key>"

required

string

The key of the project associated with the application.

--application-name "<application-name>"

optional

string

The application display name. Must be a unique string within the scope of the project, 1-255 alphanumeric characters in length, including underscores, hyphens, and spaces.

If this option is not provided, the app-key is used as the application display name.

--desc "<description>"

optional

string

Free-text description of the application.

--business-criticality "<level>"

optional

string

A classification of how critical the application is for your business:

  • unspecified (default)
  • low
  • medium
  • high
  • critical

--maturity-level "<level>"

optional

string

The maturity level of the application:

  • unspecified
  • experimental
  • production
  • end_of_life

--labels "<key1>=<value1>; <key2>="value2>"

optional

array:string

Key-value pairs for labeling the application. Each key and value is free text, limited to 255 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics in between.

If provided, each label must have a key (mandatory), with the value being optional.

Sample labels: "tier" ; "frontend", "release" ; "canary", "AppGroup" ; "wordpress"

--user-owners "<user-owner1>; <user-owner2>"

optional

array:string

List of users defined in the project who own the application.

--group-owners "<group-owner1>; <group-owner2>"

optional

array:string

List of user groups defined in the project who own the application.

--spec "<path>"

optional

string

The path to a file spec to be used in place of inline command options. For more information, see Using File Specs.

--spec-vars "<key-value-pairs>"

optional

string

A list of variables in the form of "key1=value1;key2=value2;..." (wrapped by quotes) to be replaced in the file spec.

In the file spec, use the variables as follows: ${key1}

Example 1: Create a minimal application

This command creates a new application with the required unique app-key only.

jfrog apptrust app-create my-auth-service

Output:

Successfully created application 'my-auth-service'.

Example 2: Create an application with metadata and ownership

This command creates a new application, providing a display name, description, labels, and assigning both user and group owners.

jfrog apptrust app-create inventory-api \
  --display-name="Inventory Management API" \
  --desc="Handles stock and inventory data for all warehouses." \
  --labels="team=backend;language=go" \
  --user-owners="api-lead,dev-manager" \
  --group-owners="inventory-devs"

Output:

Successfully created application 'inventory-api'.

Example 3: Create a critical application with a signing key

This command creates a mission-critical application and associates a specific signing key to it.

jfrog apptrust app-create payment-gateway \
  --display-name="Global Payment Gateway" \
  --business-criticality="mission-critical" \
  --maturity-level="production"

Output:

Successfully created application 'payment-gateway'.

Example 4: Create an application using a spec file

This command creates an application whose definition is defined in a spec file.

jf at app-create green-pizza --spec /path/to/spec.json --spec-vars "PROJECT_KEY=catalina;APP_NAME=green-pizza"

Spec file example:

{
  "project_key": "${PROJECT_KEY}",
  "application_name": "${APP_NAME}",
  "description": "A comprehensive test application",
  "maturity_level": "production",
  "criticality": "high",
  "labels": {
    "environment"="production",
    "region"="us-east-1",
    "team"="devops"
  },
  "user_owners": [
    "john.doe",
    "jane.smith"
  ],
  "group_owners": [
    "devops-team",
    "security-team"
  ]
}