Installation
Azure DevOps
-
Visit the Tuyen CLI Task page on Azure Marketplace.
-
Click Get it free and add it to your organization.
-
Include the Tuyen CLI task in your pipeline:
steps: - task: TuyenCli@1
-
Verify the installation by running:
steps: - script: tuyen -h
GitHub
-
Add the Tuyen CLI action to your workflow:
steps: - uses: tuyen-at-work/tuyen-cli-action@master
-
Verify the installation by running:
steps: - run: tuyen -h
Local Installation
MacOS and Linux
Linux users — The
unzip
package is required to install Tuyen CLI. Usesudo apt install unzip
to installunzip
package. Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Useuname -r
to check Kernel version.
curl -fsSL https://cli.tuyen.blog/install.sh | bash # for macOS, Linux, and WSL
Windows
To install, paste this into a terminal:
powershell -c "irm cli.tuyen.blog/install.ps1 | iex"
tuyen command
Usage
tuyen [OPTIONS] <COMMAND>
Commands
format
Format a file. Support JSON, XML formats.
ping
Keep a server alive by sending a request continuously.
Aliases: poll
, polling
.
guid
Generate new GUID.
url
URL commands.
list-files
List files.
prune
Prune folder, remove bin, obj, node_modules, etc.
password
Generate a random password.
swa
Azure Static Web App commands.
log
Log commands.
font
Font manipulation commands.
image
Image commands.
git
Git commands.
math
Math commands.
npm
Npm commands.
takeown
Takeown command.
build
Build command.
clone
Git clone command.
get-branch
Get the remote branch.
Aliases: getbranch
.
clear-branch
Clear the branch.
Aliases: clearbranch
.
reset
Git reset command.
release
Git release command.
rebase
Git rebase command.
hosts
Hosts commands.
Aliases: host
.
os
Linux commands.
dev
Dev commands.
epi
Epi commands.
github
GitHub commands.
Aliases: gh
.
download
Download.
help
Print this message or the help of the given subcommand(s).
Options
-r, --root <ROOT>
Directory to use as root of project.
Default: .
--pause
Pause the program after execution.
Aliases: wait
.
--pause-if-error
Pause the program after execution if an error occurs.
Aliases: wait-if-error
.
--proxy <PROXY>
Proxy server to use.
--no-print
Do not print output.
--verbose
Verbose output.
-h, --help
Print help.
-V, --version
Print version.
tuyen password command
Generate a random password.
Usage
tuyen password [OPTIONS]
Options
-l, --length <LENGTH>
Password length, if not provided, a random length between 18 and 22.
-c, --count <COUNT>
Number of password instances to generate.
Default: 1
.
-h, --help
Print help.
tuyen guid command
Generate new GUID.
Usage
tuyen guid [OPTIONS]
Options
-s, --short
Omit the dash.
-h, --help
Print help.
tuyen clone command
Git clone command.
Usage
tuyen clone [OPTIONS] --repository <REPOSITORY> --branch <BRANCH>
Options
-r, --repository <REPOSITORY>
Repository.
Aliases: repo
, url
.
-b, --branch <BRANCH>
Branch.
-u, --username <USERNAME>
Username.
-e, --email <EMAIL>
Email.
-p, --password <PASSWORD>
Password.
-d, --directory <DIRECTORY>
Directory.
-h, --help
Print help.
tuyen clear-branch command
Clear the branch.
Usage
tuyen clear-branch [OPTIONS]
Options
-r, --remote <REMOTE>
Remote.
-h, --help
Print help.
tuyen get-branch command
Get the remote branch.
Usage
tuyen get-branch [OPTIONS] --branch-name <BRANCH_NAME>
Options
-b, --branch-name <BRANCH_NAME>
Branch name.
--hard
Hard reset.
-h, --help
Print help.
tuyen rebase command
Git rebase command.
Usage
tuyen rebase
Options
-h, --help
Print help.
tuyen release command
Git release command.
Usage
tuyen release [OPTIONS]
Options
-f, --force
Force push.
-h, --help
Print help.
tuyen reset command
Git reset command.
Usage
tuyen reset [OPTIONS]
Options
--hard
Force reset.
-h, --help
Print help.
tuyen git check-commit-message command
Check commit message.
Usage
tuyen git check-commit-message [OPTIONS] --commit-message-file <COMMIT_MESSAGE_FILE>
Options
-m, --commit-message-pattern <COMMIT_MESSAGE_PATTERN>
Commit message pattern.
-f, --commit-message-file <COMMIT_MESSAGE_FILE>
Commit message file.
-h, --help
Print help.
tuyen git check-pre-commit command
Check pre commit.
Usage
tuyen git check-pre-commit [OPTIONS]
Options
-x, --excluded-file <EXCLUDED_FILE>
Excluded file.
-h, --help
Print help.
tuyen git check-pre-push command
Check pre push.
Usage
tuyen git check-pre-push [OPTIONS]
Options
-b, --remote-branch-pattern <REMOTE_BRANCH_PATTERN>
Remote branch pattern.
-h, --help
Print help.
tuyen git set-user command
Set remote username.
Usage
tuyen git set-user --remote <REMOTE> --username <USERNAME> --email <EMAIL>
Options
-r, --remote <REMOTE>
Remote.
-u, --username <USERNAME>
Username.
-e, --email <EMAIL>
Username.
-h, --help
Print help.
tuyen git set-hooks command
Set hooks.
Usage
tuyen git set-hooks [OPTIONS]
Options
-b, --remote-branch-pattern <REMOTE_BRANCH_PATTERN>
Remote branch pattern.
-m, --commit-message-pattern <COMMIT_MESSAGE_PATTERN>
Commit message pattern.
-x, --excluded-file <EXCLUDED_FILE>
Excluded file.
-h, --help
Print help.
tuyen git stash-pop command
Stash pop.
Usage
tuyen git stash-pop
Options
-h, --help
Print help.
tuyen github patch command
Patch the workflow files.
Usage
tuyen github patch
Options
-h, --help
Print help.
tuyen prune command
Prune folder, remove bin, obj, node_modules, etc.
Usage
tuyen prune [OPTIONS]
Options
-x, --extreme
Also remove additional folders, i.e. modules.
Aliases: ex
.
-e, --extra-extension <EXTRA_EXTENSION>
Additional extensions to remove.
i.e. --ext log --ext bak.
i.e. -e log -e bak.
i.e. -e log,bak.
Aliases: ext
, extension
.
-h, --help
Print help.
tuyen takeown command
Takeown command.
Usage
tuyen takeown
Options
-h, --help
Print help.
tuyen os patch command
Patch the OS.
Usage
tuyen os patch
Options
-h, --help
Print help.
tuyen os tools command
Get tools.
Usage
tuyen os tools
Options
-h, --help
Print help.
tuyen list-files command
List files.
Usage
tuyen list-files --pattern <PATTERN>
Options
-p, --pattern <PATTERN>
The pattern to match, i.e. **/*.exe.
-h, --help
Print help.
tuyen npm update command
Get common dividers of 2 numbers.
Usage
tuyen npm update [OPTIONS] --mode <MODE> [PACKAGES]...
Arguments:.
[PACKAGES]... Packages to update.
Options
--mode <MODE>
Mode of update, wanted or latest.
--legacy-peer-deps
Legacy peer dependencies.
--dry-run
Dry run.
-h, --help
Print help.
tuyen hosts find command
Find a host entry.
Usage
tuyen hosts find [OPTIONS]
Options
-i, --ip <IP>
The IP address to find.
--hostname <HOSTNAME>
The hostname to find.
Aliases: host
.
-h, --help
Print help.
tuyen hosts get command
Usage
tuyen hosts get --hostname <HOSTNAME>
Options
--hostname <HOSTNAME>
The hostname to get the IP address for.
Aliases: host
.
-h, --help
Print help.
tuyen hosts list command
List all host entries.
Usage
tuyen hosts list
Options
-h, --help
Print help.
tuyen hosts remove command
Remove a host entry.
Usage
tuyen hosts remove --hostname <HOSTNAME>
Options
--hostname <HOSTNAME>
The hostname to remove.
Aliases: host
.
-h, --help
Print help.
tuyen hosts set command
Add a new host entry.
Usage
tuyen hosts set [OPTIONS] --hostname <HOSTNAME>
Options
-i, --ip <IP>
The IP address to set.
--hostname <HOSTNAME>
The hostname to set.
Aliases: host
.
-h, --help
Print help.
tuyen ping command
Keep a server alive by sending a request continuously.
Usage
tuyen ping [OPTIONS] --url <URL>
Options
-u, --url <URL>
The url to request.
-s, --sleep <SLEEP>
Delay between requests, in seconds.
Default: 10
.
--timeout <TIMEOUT>
Request timeout, in seconds.
Default: 600
.
-h, --help
Print help.
tuyen download command
Download.
Usage
tuyen download [OPTIONS] --input <INPUT>
Options
-i, --input <INPUT>
-o, --output <OUTPUT>
-h, --help
Print help.
tuyen url new command
New URL.
Usage
tuyen url new [OPTIONS]
Options
-l, --length <LENGTH>
URL length.
Default: 64
.
-c, --count <COUNT>
Number of URL instances.
Default: 1
.
-h, --help
Print help.
tuyen image webp command
Convert images to WebP format.
Note that this command requires a local installation of ImageMagick.
To install ImageMagick, visit https://imagemagick.org/script/download.php.
Usage
tuyen image webp
Options
-h, --help
Print help.
tuyen image create-icon-pack command
Create an icon pack from an SVG file.
Note that this command requires a local installation of ImageMagick.
To install ImageMagick, visit https://imagemagick.org/script/download.php.
Usage
tuyen image create-icon-pack [OPTIONS] --site-name <SITE_NAME> --site-short-name <SITE_SHORT_NAME> --description <DESCRIPTION> --theme-color <THEME_COLOR>
Options
-i, --input <INPUT>
Input SVG file path.
Default: favicon.svg
.
Aliases: src
.
-o, --output <OUTPUT>
Output icon folder.
Default: icons
.
Aliases: dest
.
--root-path <ROOT_PATH>
Root path.
--icons-path <ICONS_PATH>
Icons path.
--assets-path <ASSETS_PATH>
Assets path.
--manifest-path <MANIFEST_PATH>
Manifest path.
--browser-config-path <BROWSER_CONFIG_PATH>
Browser config path.
--site-name <SITE_NAME>
Site name.
--site-short-name <SITE_SHORT_NAME>
Site short name.
--description <DESCRIPTION>
Description.
--theme-color <THEME_COLOR>
Theme color.
--background-color <BACKGROUND_COLOR>
Background color.
--tile-color <TILE_COLOR>
Title color.
--maskable-shrink <MASKABLE_SHRINK>
Shink ratio for maskable icon.
--no-readme
Should omit the README file from output.
-h, --help
Print help.
tuyen log convert command
Convert log file from JSON format to text format.
Usage
tuyen log convert [OPTIONS]
Options
-o, --message-only
No timestamp in the output.
--remove <REMOVE>
Remove logs with specified message.
--regex
Apply regex to remove logs with specified message.
--reset
Clear previously set remove filters.
--global
Share remove filters for the future conversions.
--timezone <TIMEZONE>
The target timezone offset in hours.
-h, --help
Print help.
tuyen log clear-empty-lines command
Clear empty lines.
Usage
tuyen log clear-empty-lines
Options
-h, --help
Print help.
tuyen math common-dividers command
Get common dividers of 2 numbers.
Usage
tuyen math common-dividers --a <A> --b <B>
Options
-a, --a <A>
Number a.
-b, --b <B>
Number b.
-h, --help
Print help.
tuyen build command
Build command.
Usage
tuyen build [OPTIONS]
Options
--release
Use release profile.
--no-default-features
No default features.
Aliases: ndf
.
-c, --clean
Cleanup the project before building.
-h, --help
Print help.
tuyen dev doc command
Generate documentation command.
Usage
tuyen dev doc [OPTIONS] --program <PROGRAM>
Options
-p, --program <PROGRAM>
The program name.
--front-matter
Whether to generate the front matter.
--no-title
Whether to omit the title.
--hidden
Whether to hide the output file.
-c, --command <COMMAND>
List of subcommands to generate documentation for.
-h, --help
Print help.
tuyen epi license command
Copy Episerver License to project.
The license file is located at.
'%userprofile%/epi-license/%network%/License.config'.
Usage
tuyen epi license --network <NETWORK>
Options
-n, --network <NETWORK>
Network type, either 'LAN' or 'Wifi'.
-h, --help
Print help.
tuyen font subset command
Extract font subset.
Usage
tuyen font subset [OPTIONS]
Options
-i, --input <INPUT>
Input file path.
Aliases: src
.
-o, --output <OUTPUT>
Output file path.
Aliases: dest
.
-u, --unicodes <UNICODES>
Unicode ranges to include in the subset.
Examples: "U+0020-007F", "U+0020-007F,U+00A0-00FF,U+20AB".
Default includes Latin and Vietnamese characters.
-f, --flavor <FLAVOR>
Flavor of the output font.
Default: woff2
.
-l, --layout-features <LAYOUT_FEATURES>
Layout features to include in the subset.
Default: kern
.
-k, --keep-axes <KEEP_AXES>
Whether to keep the axes of the input font.
Default: false
.
Possible values: true
, false
.
-h, --help
Print help.
tuyen format command
Format a file. Support JSON, XML formats.
Usage
tuyen format [OPTIONS] --input <INPUT>
Options
-i, --input <INPUT>
Input path.
Aliases: src
.
-o, --output <OUTPUT>
Output path (by default overwrite the input file).
Aliases: dest
.
--json
Format json file.
--xml
Format xml file.
--xml-variant <XML_VARIANT>
XML version.
-h, --help
Print help.