https://github.com/hattya/aster
A command line tool to handle events on file system modifications
https://github.com/hattya/aster
command-line filesystem go notifications
Last synced: about 1 year ago
JSON representation
A command line tool to handle events on file system modifications
- Host: GitHub
- URL: https://github.com/hattya/aster
- Owner: hattya
- License: mit
- Created: 2014-08-09T09:15:39.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2025-04-05T05:40:31.000Z (about 1 year ago)
- Last Synced: 2025-04-05T06:26:28.122Z (about 1 year ago)
- Topics: command-line, filesystem, go, notifications
- Language: Go
- Size: 286 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
# Aster
Aster is a command line tool to handle events on file system modifications. It
is inspired by [Guard](https://guardgem.org/).
[](https://pkg.go.dev/github.com/hattya/aster)
[](https://github.com/hattya/aster/actions/workflows/ci.yml)
[](https://ci.appveyor.com/project/hattya/aster)
[](https://codecov.io/gh/hattya/aster)
## Installation
```console
$ go install github.com/hattya/aster/cmd/aster@latest
```
## Usage
```console
$ aster -g
```
### init
```console
$ aster init [...]
```
``aster init`` creates an Asterfile in the current directory if it does not
exist, and add specified template files to it.
Template files are located in:
- UNIX
`$XDG_CONFIG_HOME/aster/template/`
- macOS
`~/Library/Application Support/Aster/template/`
- Windows
`%APPDATA%\Aster\template\`
## Asterfile
Asterfile is evaluated as JavaScript by [otto](https://github.com/robertkrimen/otto).
```javascript
var go = require('language/go').go;
aster.watch(/.+\.go$/, function() {
// test
if (go.test('-v', '-covermode', 'atomic', '-coverprofile', 'cover.out', './...')) {
return;
}
// coverage report
go.tool.cover('-func', 'cover.out');
go.tool.cover('-html', 'cover.out', '-o', 'coverage.html');
// vet
if (go.vet('./...')) {
return;
}
});
```
## Reference
- [Global Objects](doc/global-objects.rst)
- [OS](doc/os.rst)
- [Language](doc/language.rst)
- [Go](doc/language/go.rst)
- [JavaScript](doc/language/javascript.rst)
- [Markdown](doc/language/markdown.rst)
- [Python](doc/language/python.rst)
- [reStructuredText](doc/language/restructuredtext.rst)
- [Vim script](doc/language/vimscript.rst)
## License
Aster is distributed under the terms of the MIT License.