实用的命令行工具
Table of Contents
工欲善其事,必先利其器。介绍一些比较实用的命令行工具以及技巧。
asciinema
Record and share your terminal sessions, an awesome terminal recording tool:
# installation
brew install asciinema
# usage
asciinema rec
Offical website: asciinema
brew
The missing package manager for macOS:
# installation
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# usage
brew install <package_name>
Notice: For Mac(Unix) only
git-open
Open the corresponding remote repository in your default browser conveniently when you under a local git repository:
# installation
npm i -g git-open
# usage
git-open
http-server
Start a local server on your computer, subcommands -c
means no cache and -1
means the expire time is -1
:
# installation
npm i -g http-server
# usage
http-server -c-1
open
Open current directory or open a file with default application:
# usage for Mac(Unix)
open <dir or file>
# usage for Linux
xdg-open <dir or file>
Notice: The above commands are pre-installed
say
Maybe you will use it when you confuse what a word’s pronunciation:
say <word>
Notice: Pre-installed and for Mac(Unix) only
terminal-translate
Translate words and sentences using terminal conveniently:
# installation
npm i -g terminal-translate
# usage
tl <word or sentence>
未完待续…