代码解释器 code-explain 解决你对代码疑惑的地方

207 天前
 xiaoxuan6

注意需要依赖 php >= 8.1, Go 版本在文章末尾可直接运行二进制文件

解决平时代码中比较疑惑的地方,支持 windows 、linux 、darwin.

github:https://github.com/xiaoxuan6/code-explain

Requirements

Installation

Composer

composer global require james.xue/code-explain

直接下载 code-explain 可执行文件

curl 'https://mirror.ghproxy.com/https://raw.githubusercontent.com/xiaoxuan6/code-explain/main/builds/code-explain' -o code-explain --progress-bar
chmod +x code-explain

Help

$ ./code-explain -h
Description:
  What does it mean to explain the code.

Usage:
  explain [options] [--] [<code>]

Arguments:
  code                    The code to explain

Options:
  -C, --is-use-clipboard  Use clipboard to get the code to explain
  -h, --help              Display help for the given command. When no command is given display help for the explain command
  -q, --quiet             Do not output any message
  -V, --version           Display this application version
      --ansi|--no-ansi    Force (or disable --no-ansi) ANSI output
  -n, --no-interaction    Do not ask any interactive question
      --env[=ENV]         The environment the command should run under
  -v|vv|vvv, --verbose    Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Go 版本

https://github.com/xiaoxuan6/tools

tools c -h
NAME:
   tools code - 人工智能来解释您不理解的任何代码的工具

USAGE:
   tools code [command options] [arguments...]

OPTIONS:
   --help, -h  show help
399 次点击
所在节点    程序员
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1029118

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX