snips.sh

Contributing

Thank you for considering contributing to snips.sh! We welcome contributions from anyone, whether it’s a bug report, a feature request, code improvements, or documentation updates.

Issues and Questions

Please use Issues to report bugs and feature enhancements. For any questions, discussions or general feedback, please use the Discussions.

Local Development

To get started, you’ll need to have Go installed.

In addition, the libtensorflow shared objects for the C API need to be present on your system in order to use guesslang. Otherwise you’ll see a bunch of “cannot open shared object file” errors. There’s a utility script (script/install-libtensorflow) that will install it via brew for macOS or download from source for linux.

Once those dependencies are installed, you just need to:

go run main.go

To run it locally. There are some nice defaults for local development. To see all the available configuration options, run:

go run main.go -usage

Taking a look at the database.md and self-hosting.md documents may be useful too.

If you are working on the web UI, I recommend installing air so the application recompiles when the files change. Otherwise the assets won’t update while the binary is running.

Scripts

This repo follows scripts-to-rule-them-all, here’s a brief description of each:

script/atlas: locally installs atlas CLI

script/install-libtensorflow: installs libtensorflow shared objects for the C API (required for guesslang)

script/lint: locally installs golangci-lint and runs the linter

script/record-tape: runs vhs on docs/tapes/ to generate gifs for readme

script/schema-diff: using atlas, prints the difference of local schema with latest main schema

script/ssh-tmp: helper to run ssh with a new (temporary) public key, useful for testing new user access

script/test: runs go tests with gotestsum