· 188 words · 1 min
工欲善其事,必先利其器。介绍一些比较实用的命令行工具以及技巧。
Record and share your terminal sessions, an awesome terminal recording tool:
# installation
brew install asciinema
# usage
asciinema rec
Offical website: asciinema
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
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
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 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
Maybe you will use it when you confuse what a word’s pronunciation:
say <word>
Notice: Pre-installed and for Mac(Unix) only
Translate words and sentences using terminal conveniently:
# installation
npm i -g terminal-translate
# usage
tl <word or sentence>
未完待续…