packages/amplication-cli/README.md
Amplication CLI
<!-- toc --> <!-- tocstop -->$ npm install -g @amplication/cli
$ amp COMMAND
running command...
$ amp (-v|--version|version)
@amplication/cli/0.13.0 darwin-arm64 node-v16.14.0
$ amp --help [COMMAND]
USAGE
$ amp COMMAND
...
Generate a token on Amplication server UI and use the token with the following command:
$ amp auth TOKEN
By default, Amplication CLI works with the hosted version on https://app.amplication.com. In case you want to use the CLI with another Amplication version, you can use the config:set command
$ amp config:set AMP_SERVER_URL http://localhost:3000
amp auth TOKENamp configamp config:get PROPERTYamp config:set PROPERTY VALUEamp config:unset PROPERTYamp entitiesamp entities:create DISPLAYNAMEamp entities:fieldsamp entities:fields:create DISPLAYNAMEamp entities:fields:updateamp entities:infoamp entities:updateamp help [COMMAND]amp resourcesamp resources:commitamp resources:create NAME [DESCRIPTION]amp resources:currentamp resources:infoamp resources:updateamp auth TOKENauthenticate using token generated on amplication server UI
USAGE
$ amp auth TOKEN
See code: src/commands/auth.ts
amp configlist all supported properties
USAGE
$ amp config
EXAMPLE
amp config
See code: src/commands/config/index.ts
amp config:get PROPERTYget a property value
USAGE
$ amp config:get PROPERTY
ARGUMENTS
PROPERTY name of property
EXAMPLES
amp config:get AMP_CURRENT_RESOURCE
amp config:get AMP_SERVER_URL
amp config:get AMP_OUTPUT_FORMAT
See code: src/commands/config/get.ts
amp config:set PROPERTY VALUEset a property value
USAGE
$ amp config:set PROPERTY VALUE
ARGUMENTS
PROPERTY name of property
VALUE value of property
EXAMPLES
amp config:set AMP_CURRENT_RESOURCE ckm1w4vy857869go3nsw4mk2ay
amp config:set AMP_SERVER_URL https://app.amplication.com
amp config:set AMP_OUTPUT_FORMAT styledJSON
See code: src/commands/config/set.ts
amp config:unset PROPERTYunset a property value
USAGE
$ amp config:unset PROPERTY
ARGUMENTS
PROPERTY name of property
EXAMPLE
amp config:unset AMP_CURRENT_RESOURCE
See code: src/commands/config/unset.ts
amp entitieslist entities for a resource
USAGE
$ amp entities
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-r, --resource=resource resource to run command against
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp entities
amp entities -r ckm1w4vy857869go3nsw4mk2ay
amp entities --format=table
See code: src/commands/entities/index.ts
amp entities:create DISPLAYNAMEcreate an entity
USAGE
$ amp entities:create DISPLAYNAME
ARGUMENTS
DISPLAYNAME display name of entity to create
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-r, --resource=resource resource to run command against
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--description=description description of the entity
--filter=filter filter property by partial string matching, ex: name=foo
--name=name name of the entity
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--pluralDisplayName=pluralDisplayName plural display name of the entity
--set-current set the newly created entity as the current entity
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp entities:create Customer --set-current
amp entities:create Customer -r ckm1w4vy857869go3nsw4mk2ay
amp entities:create Customer
See code: src/commands/entities/create.ts
amp entities:fieldslist fields for an entity
USAGE
$ amp entities:fields
OPTIONS
-e, --entity=entity (required) ID of the entity
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp entities:fields
amp entities:fields -e ckm1wl4ru58969go3n3mt2zkg2
amp entities:fields --format=table
See code: src/commands/entities/fields/index.ts
amp entities:fields:create DISPLAYNAMEcreate a field
USAGE
$ amp entities:fields:create DISPLAYNAME
ARGUMENTS
DISPLAYNAME display name of field to create
OPTIONS
-e, --entity=entity (required) ID of the entity
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--set-current set the newly created field as the current field
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp entities:fields:create "Start Date" --set-current
amp entities:fields:create "Start Date" -e ckm1wl4ru58969go3n3mt2zkg2
amp entities:fields:create "Start Date"
See code: src/commands/entities/fields/create.ts
amp entities:fields:updateupdate a field
USAGE
$ amp entities:fields:update
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-i, --field=field (required) ID of the field
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--description=description set the description of the field
--displayName=displayName set the display name of the field
--filter=filter filter property by partial string matching, ex: name=foo
--name=name set the name of the field
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--[no-]required set the field as required, or not
--[no-]searchable set the field as searchable, or not
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp entities:fields:update --name="my new field name"
amp entities:fields:update -f ckm1xt4mm63197go3nt8n2py80 --name "my new field name"
amp entities:fields:update --required
amp entities:fields:update --no-required
See code: src/commands/entities/fields/update.ts
amp entities:infoshow detailed information for an entity
USAGE
$ amp entities:info
OPTIONS
-e, --entity=entity (required) ID of the entity
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp entities:info
amp entities:info -e ckm1wl4ru58969go3n3mt2zkg2
See code: src/commands/entities/info.ts
amp entities:updateupdate an entity
USAGE
$ amp entities:update
OPTIONS
-e, --entity=entity (required) ID of the entity
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--description=description description of the entity
--displayName=displayName display name of the entity
--filter=filter filter property by partial string matching, ex: name=foo
--name=name name of the entity
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--pluralDisplayName=pluralDisplayName plural display name of the entity
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp entities:update --name="my new entity name"
amp entities:update -e ckm1wl4ru58969go3n3mt2zkg2 --name "my new entity name" --description "my new entity
description"
See code: src/commands/entities/update.ts
amp help [COMMAND]display help for amp
USAGE
$ amp help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
amp resourceslist all resources
USAGE
$ amp resources
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp resources
amp resources --format=table
amp resources --format=table --columns=id,name
See code: src/commands/resources/index.ts
amp resources:commitcommit the pending changes in the resource
USAGE
$ amp resources:commit
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-r, --resource=resource resource to run command against
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--message=message (required) commit message
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLE
amp resources:commit --message "adding customer entity"
See code: src/commands/resources/commit.ts
amp resources:create NAME [DESCRIPTION]create a new resource
USAGE
$ amp resources:create NAME [DESCRIPTION]
ARGUMENTS
NAME name of resource to create
DESCRIPTION description of resource to create
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--set-current set the newly created resource as the current resource
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLE
amp resources:create "my cool resource" "my resource description" --set-current
See code: src/commands/resources/create.ts
amp resources:currentset the current resource
USAGE
$ amp resources:current
OPTIONS
-a, --resource=resource (required) ID of the resource
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLE
amp resources:current -r ckm1w4vy857869go3nsw4mk2ay
See code: src/commands/resources/current.ts
amp resources:infoshow detailed information for a resource
USAGE
$ amp resources:info
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-r, --resource=resource resource to run command against
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp resources:info
amp resources:info -r ckm1w4vy857869go3nsw4mk2ay
See code: src/commands/resources/info.ts
amp resources:updateupdate a resource
USAGE
$ amp resources:update
OPTIONS
-f, --format=JSON|styledJSON|table [default: JSON] The format in which to render the output
-r, --resource=resource resource to run command against
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--description=description description of the resource
--filter=filter filter property by partial string matching, ex: name=foo
--name=name name of the resource
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
amp resources:update --name="my new name"
amp resources:update -r ckm1w4vy857869go3nsw4mk2ay --name "my new name"
amp resources:update --name "my new name" --description "my new description"
See code: src/commands/resources/update.ts
<!-- commandsstop -->