Git Product home page Git Product logo

safe's Introduction

Safe

Don't look at the credentials on the screen. - me, sometimes

Sharing one's terminal is a great way to explain, help, contribute. It's possible to display secrets inadvertently, cating a configuration file.

This simple binary helps to prevent this from happening.

Usage

Shell Mode

Running safe in shell mode opens up a new shell which will filter out all output.

E.g.

$ safe
$ cat config.yml
node-dev:
  hostname: mynode-dev.local
  username: node-user
  password: XXXXXXXXXXXXXXXX

Warning: Dynamic program might not work as expected. For instance, top, vim, nano will fail to run properly. This is due to the underlying parsing of the input.

Pipe Mode

Running safe in pipe mode reads from stdin and filter out the output to stdout.

E.g.

$ cat config.yml | safe
node-dev:
  hostname: mynode-dev.local
  username: node-user
  password: XXXXXXXXXXXXXXXX

Installation

Release

This is the prefered way.

Check the lastest release.

Note: If you use the macOs binary, they are not currently signed. You need to right-click and open first (ref).

Manual build

Currently you can git pull and run make.

Go Get

$ go get github.com/nobe4/safe/tree/master/cmd/safe

Note: This method doesn't embed version information in the binary, prefer the release.

Contribute

Feel free to open issues/PR.

Improvement ideas in no particular order:

  • Write tests
  • Support dynamic programs (vim, top, ...)
  • Add signal handler when terminal closes
  • Support windows
  • Improve logger formatting
  • Sign apple binary

License

MIT

safe's People

Contributors

nobe4 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.