The CLI tool for learning commands from your terminal
kmdr
provides command explanations for hundreds of programs including git
, docker
, kubectl
,npm
, go
and more straight forward programs such as those built into bash
. See the full list at https://app.kmdr.sh/program.
You will need to install the kmdr program and sign-in to begin using kmdr on the CLI.
npm
or yarn
npm
npm install kmdr --global
yarn
yarn global add kmdr
Run the command kmdr
to check if it was correctly installed on your system.
$ kmdr
Usage: kmdr [options] [command]
The CLI tool for learning commands from your terminal
Learn more at https://kmdr.sh/
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
explain|e Explain a shell command
info|i Display system-wide information
login|l [email] Log in to kmdr
logout Log out from kmdr
settings|s Adjust options and preferences
version|v Print current version and check for newer release
Add the line below to your .bashrc
or .zshrc
if using zsh
export PATH="$(yarn global bin):$PATH"
kmdr login
Once kmdr-cli
is installed on your system, enter kmdr explain
to return a prompt for entering the command you would like explained.
When the Enter your command:
prompt is returned, enter the command you would like explained and hit the Enter
key.
kmdr
will return syntax highlighting to assist you in differentiating parts of the command followed by the explanation of each of these parts.
An example explanation of git commit -am "Initial commit"
can be seen below.
$ kmdr explain
✔ Enter your command · git commit -am "Initial Commit"
git commit -am "Initial Commit"
DEFINITIONS
git
The stupid content tracker
commit
Record changes to the repository
-a, --all
Tell the command to automatically stage files that have been modified and deleted
-m, --message "Initial Commit"
Use the given <msg> as the commit message
$ kmdr explain
? Enter your command: npm install kmdr@latest --global
npm install kmdr@latest --global
DEFINITIONS
npm
Package manager for the Node JavaScript platform
install
Install a package
kmdr@latest
The CLI tool for learning commands from your terminal
-g, --global
Install the package globally rather than locally
$ kmdr explain
? Enter your command: rsync -anv file1 file2
rsync -anv file1 file2
DEFINITIONS
rsync
A fast, versatile, remote (and local) file-copying tool
-a, --archive
This is equivalent to -rlptgoD.
-n, --dry-run
This makes rsync perform a trial run that doesn’t make any changes
(and produces mostly the same output as a real run).
-v, --verbose
This option increases the amount of information you are given during
the transfer.
$ kmdr explain
? Enter your command: ls -alh > contents.txt
ls -alh > contents.txt
DEFINITIONS
ls
List directory contents
-a, --all
Do not ignore entries starting with .
-l
Use a long listing format
-h, --human-readable
With -l and/or -s, print human readable sizes (e.g., 1K 234M 2G)
> contents.txt
Redirect stdout to contents.txt.
$ kmdr explain
? Enter your command: dmesg | grep 'usb' > output.log 2>error.log
dmesg | grep 'usb' > output.log 2> error.log
DEFINITIONS
dmesg
Print or control the kernel ring buffer
|
A pipe serves the sdout of the previous command as input (stdin) to the next one
grep
Print lines matching a pattern
> output.log
Redirect stdout to output.log.
2> error.log
Redirect stderr to error.log.
So what is the reason for signing in? why should it be included in CLI readme?
We add new programs every day! See the full list here: https://app.kmdr.sh/program.
大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 —kmdr,让你解锁 Linux 学习新姿势。
修改为淘宝源 ➜ /Users/liuzhiwei> sudo npm install kmdr@latest --global --registry=http://registry.npm.taobao.org Password: /usr/local/bin/kmdr -> /usr/local/lib/node_modules/kmdr/dist/bin.js + kmdr@0.4.3 a
问题内容: 我经常不得不调试编写的Java代码,以便有一个接口和该接口的一个实现。 例如,将有一个接口Foo,其中有一个名为FooImpl的实现。在下面的代码中,如果我按住ctrl键单击doThings,则当我实际要转到FooImpl.java来查看实现时,它将跳至Foo.java。 当我结束界面时,必须使用ctrl-shift-r打开FooImpl。如果我可以按一下ctrl- alt并单击doT
问题内容: 首先,我不是要在这里发动战争。我非常了解Jersey,但是很少使用httpclient。 jersey-client和Apache的httpclient之间的主要区别是什么?在哪些方面比另一方面更好?哪里有比较好的图表?较大的文件(例如2048 MB)中,哪一个效果更好? 非常感谢您的评论! 问题答案: 这两件事可能不应该直接比较。Jersey是REST客户端,具有完整的JAX-RS实
问题内容: 我的应用程序中有两个表。左表就像一个列表。单击左表将打开一个右表,其中包含基于我单击左表的字段的值。 现在的问题是,如果我在右表中编辑一个单元格,而不按Enter键并单击左表中的新项目,则所有表中的特定单元格都处于可编辑模式。以及所有表格的单元格值。 我该如何解决这个问题? 问题答案: 不能完全肯定,我明白你的感受VS你所期望的,但表的默认行为是有点出乎意料的是,当焦点转到表外的某个地
问题内容: 如何使用google-api-java-client解析用户Google日历中事件的开始和结束时间? 从Google代码安装此示例android项目后,我可以进入Google日历并解析一些信息(例如所有日历,事件名称,发布时间和摘要),但是我无法终生获取事件的开始和结束时间。 我对代码的理解是这样的。 在主要活动类(CalendarAndroidSample.java)内,这是获取我每
问题内容: 我正在为小型LibGDX驱动的游戏编写服务器端代码,偶然发现了一个问题。每次尝试使用任何方法时,都会遇到。 显然这是因为我没有实现ApplicationListener,所以LibGDX尚未初始化。 有没有办法以无头/ CLI方式初始化LibGDX?我需要能够在服务器端加载TiledMap对象。 com.esotericsoftware.kryonet.Server $ 1.recei
问题内容: 我们正在尝试将声音集成到我们的一个项目中,我的团队成员没有收到此错误,而是在两台不同的机器上收到了此错误。 堆栈跟踪: 码: 我们从domainController调用此类 有谁知道如何解决此异常?我尝试重新安装编辑器软件(Eclipse),但无济于事。 预先感谢分配。 编辑 我们只是尝试切换声音文件。我们尝试使用较小的文件运行它。现在可以使用,但是一旦切换回较大的.wav文件(10