Skip to content

Latest commit

Β 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

header

GitHub Stars GitHub Forks Watchers Branches Contributors Last commit Commits Open issues Closed issues Open PRs Closed PRs Merged PRs Release CI License

ensor is a fast, interactive CLI tool for detecting and redacting secrets from your codebase and managing environment variable configurations β€” ensuring leaked API keys, tokens, and credentials never make it into a commit, screenshot, or public release.

By default, ensor extracts discovered secrets into a .env file and substitutes them with customizable placeholders across your project, but also includes a versatile converter for .env, JSON, YAML, and TOML.


✨ Features

  • πŸ” Secret scanning & redaction β€” walks all files and directories and redacts secrets automatically
  • πŸ”„ Format conversion β€” convert between .env, JSON, YAML, TOML, and more
  • πŸ“ Smart skipping β€” dot-prefixed files like .env and .git/* are ignored by default
  • 🎨 Beautiful TUI β€” interactive prompts built with huh and bubbletea
  • ⚑ Zero config β€” no config files, no setup. Just run it.

🎬 Demo

Watch ensor in action:

ensor

πŸ“¦ Installation

mise

mise use github:pratyay360/ensor@latest

curl (automated install script)

curl -sSL https://raw.githubusercontent.com/Pratyay360/ensor/main/install.sh | sh

Go Install

go install github.com/Pratyay360/ensor@latest

Prebuilt Binaries & Packages

Download ready-to-run binaries or .deb, .rpm, and .apk packages from the Releases page for Linux, macOS, Windows, and FreeBSD.


πŸš€ Usage

1. Scan and Censor Secrets

Scan the current directory:

ensor

That's it. ensor walks all the files and directories in your project and redacts the secrets from them.

By default, ensor skips scanning any file or directory that starts with a trailing dot, like .env, .env.json, or .git/* β€” so your actual secret files stay untouched.

Run ensor --help to see all available options.

Convert env files

ensor convert converts between any format of env files. Convert .env, YAML, TOML, JSON, and more β€” interchangeably.

πŸ–₯️ Live demos

ensor in action

asciicast

ensor convert

asciicast


🀝 Contributing

Contributions are always welcome! Feel free to open an issue or submit a pull request.


πŸ“„ License

Licensed under the Apache-2.0 license.


πŸ’Ž Acknowledgements

Special thanks to these amazing open-source projects:

  • betterleaks β€” High-performance secret detection engine
  • huh β€” Interactive prompt and form toolkit
  • bubbletea β€” Terminal UI runtime
  • lipgloss β€” Style definitions for terminal applications

chart

Releases

Sponsor this project

Packages

Used by

Contributors

Languages