MCPcopy
hub / github.com/gravityblast/fresh

github.com/gravityblast/fresh @main sqlite

repository ↗ · DeepWiki ↗
54 symbols 122 edges 16 files 3 documented · 6%
README

Fresh

Join the chat at https://gitter.im/pilu/fresh Build Status

Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file.

If the web framework you are using supports the Fresh runner, it will show build errors on your browser.

It currently works with Traffic, Martini and gocraft/web.

Installation

go install github.com/gravityblast/fresh@latest

Usage

cd /path/to/myapp

Start fresh:

fresh

Fresh will watch for file events, and every time you create/modify/delete a file it will build and restart the application. If go build returns an error, it will log it in the tmp folder.

Traffic already has a middleware that shows the content of that file if it is present. This middleware is automatically added if you run a Traffic web app in dev mode with Fresh. Check the _examples folder if you want to use it with Martini or Gocraft Web.

fresh uses ./runner.conf for configuration by default, but you may specify an alternative config filepath using -c:

fresh -c other_runner.conf

Here is a sample config file with the default settings:

root:              .
tmp_path:          ./tmp
build_name:        runner-build
build_log:         runner-build-errors.log
valid_ext:         .go, .tpl, .tmpl, .html
no_rebuild_ext:    .tpl, .tmpl, .html
ignored:           assets, tmp
build_delay:       600
colors:            1
log_color_main:    cyan
log_color_build:   yellow
log_color_runner:  green
log_color_watcher: magenta
log_color_app:

Author

More

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

fatal
called by 8
runner/logger.go
newLogFunc
called by 5
runner/logger.go
tmpPath
called by 5
runner/settings.go
configPath
called by 3
runner/settings.go
isIgnoredFolder
called by 2
runner/utils.go
isWatchedFile
called by 2
runner/utils.go
shouldRebuild
called by 2
runner/utils.go
root
called by 2
runner/settings.go

Shape

Function 49
Method 2
Struct 2
FuncType 1

Languages

Go100%

Modules by API surface

runner/settings.go13 symbols
runner/utils.go7 symbols
runner/start.go6 symbols
runner/logger.go5 symbols
runner/runnerutils/utils.go4 symbols
_examples/gocraft-web/main.go4 symbols
runner/utils_test.go3 symbols
runner/watcher.go2 symbols
_examples/traffic/main.go2 symbols
_examples/martini/main.go2 symbols
runner/runner.go1 symbols
runner/limit_windows.go1 symbols

For agents

$ claude mcp add fresh \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact