https://github.com/commercelayer/commercelayer-cli-plugin-tags
https://github.com/commercelayer/commercelayer-cli-plugin-tags
commercelayer
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/commercelayer/commercelayer-cli-plugin-tags
- Owner: commercelayer
- License: mit
- Created: 2023-07-07T13:52:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-05T15:30:06.000Z (6 months ago)
- Last Synced: 2025-12-09T01:54:01.057Z (6 months ago)
- Topics: commercelayer
- Language: TypeScript
- Homepage:
- Size: 1.11 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @commercelayer/cli-plugin-tags
Commerce Layer CLI Tags plugin
[](https://oclif.io)
[](https://npmjs.org/package/@commercelayer/cli-plugin-tags)
[](https://npmjs.org/package/@commercelayer/cli-plugin-tags)
[](https://github.com/@commercelayer/cli-plugin-tags/blob/master/package.json)
* [Usage](#usage)
* [Commands](#commands)
## Usage
```sh-session
commercelayer COMMAND
commercelayer [COMMAND] (--help | -h) for detailed information about plugin commands.
```
## Commands
* [`commercelayer tags [ID]`](#commercelayer-tags-id)
* [`commercelayer tags:add`](#commercelayer-tagsadd)
* [`commercelayer tags:count ID_NAME`](#commercelayer-tagscount-id_name)
* [`commercelayer tags:create`](#commercelayer-tagscreate)
* [`commercelayer tags:delete`](#commercelayer-tagsdelete)
* [`commercelayer tags:details ID_NAME`](#commercelayer-tagsdetails-id_name)
* [`commercelayer tags:list`](#commercelayer-tagslist)
* [`commercelayer tags:remove`](#commercelayer-tagsremove)
* [`commercelayer tags:types`](#commercelayer-tagstypes)
* [`commercelayer tags:update ID_NAME`](#commercelayer-tagsupdate-id_name)
* [`commercelayer tags:which ID_NAME`](#commercelayer-tagswhich-id_name)
### `commercelayer tags [ID]`
List all the created tags or show details of a single tag.
```sh-session
USAGE
$ commercelayer tags [ID] [-A | -l ]
ARGUMENTS
ID unique id of the tag to be retrieved
FLAGS
-A, --all show all tags instead of first 25 only
-l, --limit= limit number of tags in output
DESCRIPTION
list all the created tags or show details of a single tag
```
_See code: [src/commands/tags/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/index.ts)_
### `commercelayer tags:add`
Add one or more tags to a set of resources.
```sh-session
USAGE
$ commercelayer tags:add -n ... -t -i ... [-C ] [-v]
FLAGS
-C, --create= create tags if doesn't exist
-i, --id=... (required) the IDs of the resources to tag
-n, --name=... (required) the tag name
-t, --type= (required) the type of the resource to tag
-v, --verbose show details of the tag process
DESCRIPTION
add one or more tags to a set of resources
ALIASES
$ commercelayer tag
EXAMPLES
$ commercelayer tags:add -t -n -i
$ cl tag -t customers -i aBcDeFghIL mnOPqRstUV -n groupA
```
_See code: [src/commands/tags/add.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/add.ts)_
### `commercelayer tags:count ID_NAME`
Count resources tagged with a specific tag.
```sh-session
USAGE
$ commercelayer tags:count ID_NAME [-t | -z]
ARGUMENTS
ID_NAME unique id or name of the tag
FLAGS
-t, --type= the type of the tagged resources
-z, --zero show also resources without tags
DESCRIPTION
count resources tagged with a specific tag
EXAMPLES
$ commercelayer tags:count
$ cl tags:count -t
```
_See code: [src/commands/tags/count.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/count.ts)_
### `commercelayer tags:create`
Create one or more new tags.
```sh-session
USAGE
$ commercelayer tags:create -n ...
FLAGS
-n, --name=... (required) the tag name
DESCRIPTION
create one or more new tags
EXAMPLES
$ commercelayer tags:create -n
$ cl tags:create -n flag1 flag2 flag3
```
_See code: [src/commands/tags/create.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/create.ts)_
### `commercelayer tags:delete`
Delete one or more existing tags.
```sh-session
USAGE
$ commercelayer tags:delete -n ...
FLAGS
-n, --name=... (required) the tag name
DESCRIPTION
delete one or more existing tags
EXAMPLES
$ commercelayer tags:delete -n
$ cl tags:delete -n flag1 flag2 flag3
```
_See code: [src/commands/tags/delete.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/delete.ts)_
### `commercelayer tags:details ID_NAME`
Show the details of an existing tag.
```sh-session
USAGE
$ commercelayer tags:details ID_NAME
ARGUMENTS
ID_NAME unique id or name of the tag
DESCRIPTION
show the details of an existing tag
EXAMPLES
$ commercelayer tags:details
```
_See code: [src/commands/tags/details.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/details.ts)_
### `commercelayer tags:list`
List all the created tags.
```sh-session
USAGE
$ commercelayer tags:list [-A | -l ]
FLAGS
-A, --all show all tags instead of first 25 only
-l, --limit= limit number of tags in output
DESCRIPTION
list all the created tags
EXAMPLES
$ commercelayer tags
$ cl tags:list -A
```
_See code: [src/commands/tags/list.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/list.ts)_
### `commercelayer tags:remove`
Remove one or more tags to a set of resources.
```sh-session
USAGE
$ commercelayer tags:remove -n ... -t -i ... [-v]
FLAGS
-i, --id=... (required) the IDs of th eresources to tag
-n, --name=... (required) the tag name
-t, --type= (required) the type of the resource to tag
-v, --verbose show details of the tag process
DESCRIPTION
remove one or more tags to a set of resources
EXAMPLES
$ commercelayer tags:remove -t -n -i
$ cl tags:rm -t customers -i aBcDeFghIL mnOPqRstUV -n groupA
```
_See code: [src/commands/tags/remove.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/remove.ts)_
### `commercelayer tags:types`
Show online documentation for supported resources.
```sh-session
USAGE
$ commercelayer tags:types [-O]
FLAGS
-O, --open open online documentation page
DESCRIPTION
show online documentation for supported resources
EXAMPLES
$ commercelayer tags:types
```
_See code: [src/commands/tags/types.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/types.ts)_
### `commercelayer tags:update ID_NAME`
Update an existing tag.
```sh-session
USAGE
$ commercelayer tags:update ID_NAME -n
ARGUMENTS
ID_NAME unique id or name of the tag
FLAGS
-n, --name= (required) the new tag name
DESCRIPTION
update an existing tag
EXAMPLES
$ commercelayer tags:update -n
```
_See code: [src/commands/tags/update.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/update.ts)_
### `commercelayer tags:which ID_NAME`
Show all the resources with this tag.
```sh-session
USAGE
$ commercelayer tags:which ID_NAME -t [-A | -l ]
ARGUMENTS
ID_NAME unique id or name of the tag
FLAGS
-A, --all show all resources instead of first 25 only
-l, --limit= limit number of resources in output
-t, --type= (required) the type of the tagged resources
DESCRIPTION
show all the resources with this tag
EXAMPLES
$ commercelayer tags:which -t
$ cl tags:which groupA -t customers -A
```
_See code: [src/commands/tags/which.ts](https://github.com/commercelayer/commercelayer-cli-plugin-tags/blob/main/src/commands/tags/which.ts)_