swift5.0 Platform License

茶壶 (Teapot)

Teapot 是一个用 Swift 编写的命令行工具。
当文件被修改时,它可以为每个文件执行你的 shell 命令。

要求

Swift 5.0 或更高版本。并且需要在 macOS 上运行。

安装

使用 mint。

$ mint install bannzai/Teapot

用法

首先,Teapot 需要一个名为 teapot.yml 的配置文件。 Teapot 可以通过 $ teapot setup 在当前目录下准备 teapot.yml

$ teapot setup
🍵 Teapot setup completion. You can edit ./teapot.yml 🍵

这将生成以下文件

source:
- build/*
- Sources/*.*
- Sources/Teapot/*.*
ignore:
- ".git"
- ".gitignore"
- tests/*
execute: 
- ls -la __FILE__
- echo $HOME

接下来,Teapot 可以根据 teapot.yml 的配置,在文件被修改时为每个文件执行你的 shell 命令。

$ teapot start
🍵 Teapot start 🍵

例如,当你编辑某些文件时,teapot 会显示 $ ls -la 对已更改文件的执行结果。

许可证

Teapot 在 MIT 许可证下发布。 有关详细信息,请参阅 LICENSE

Header logo 根据 CC BY-NC 4.0 许可证发布。 原始设计者为 noainoue