thoughtworks / talisman

Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious — such as tokens, passwords, and private keys.
https://thoughtworks.github.io/talisman/
MIT License
1.9k stars 243 forks source link

docs: introducing homebrew installation #410

Closed jjangga0214 closed 8 months ago

jjangga0214 commented 1 year ago

Hi! Would you introduce an installation process with homebrew/linuxbrew on docs? I think it'd be helpful to many people. Thanks :)

tinamthomas commented 1 year ago

Talisman installation through homebrew was addressed here https://github.com/thoughtworks/talisman/issues/51. But we still need to update the readme.

exageraldo commented 1 year ago

In my team we have some people who have installed Talisman as a global template and others who have installed it via homebrew.

We're using pre-commit and the configuration that worked for us in both cases was:

https://github.com/thoughtworks/talisman#1-pre-commit-linuxunix

-   repo: local
    hooks:
    -   id: talisman-precommit
        name: talisman
        entry: bash -c 'if [! talisman --version &> /dev/null];then talisman --githook pre-commit; elif [ -n "${TALISMAN_HOME:-}" ]; then ${TALISMAN_HOME}/talisman_hook_script pre-commit; else echo "TALISMAN does not exist. Consider installing from https://github.com/thoughtworks/talisman . If you already have talisman installed, please ensure TALISMAN_HOME variable is set to where talisman_hook_script resides, for example, TALISMAN_HOME=${HOME}/.talisman/bin"; fi'
        language: system
        pass_filenames: false
        types: [text]
        verbose: true