> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/ii.-getting-started/10.-installing-spring-boot/10.2.-installing-the-spring-boot-cli/10.2.5.-command-line-completion.md).

# 10.2.5. 命令行实现

Spring Boot CLI启动脚本为[BASH](http://en.wikipedia.org/wiki/Bash_\(Unix_shell\))和[zsh](http://en.wikipedia.org/wiki/Zsh) shells提供完整的命令行实现。你可以在任何shell中source脚本（名称也是spring），或将它放到用户或系统范围内的bash初始化脚本里。在Debian系统中，系统级的脚本位于`/shell-completion/bash`下，当新的shell启动时该目录下的所有脚本都会被执行。如果想要手动运行脚本，假如你已经安装了SDKMAN，可以使用以下命令：

```
$ . ~/.sdkman/candidates/springboot/current/shell-completion/bash/spring
$ spring <HIT TAB HERE>
  grab  help  jar  run  test  version
```

**注**：如果你使用Homebrew或MacPorts安装Spring Boot CLI，命令行实现脚本会自动注册到你的shell。
