## What is Gopass and Gopass UI?
> [Gopass](https://github.com/gopasspw/gopass) is a rewrite of the pass password manager in Go with the aim of making it cross-platform and adding additional features – (Taken from Github)
`Gopass UI` is wrapping `gopass` from your command line. It makes your life easier by providing a graphical user interface to search and manage your secrets. It looks like this:
In addition there is a search window that can be opened with `(cmd || ctrl) + shift + p`.
## How can I use it?
For most platforms just [download the latest packaged application](https://github.com/codecentric/gopass-ui/releases/latest) from our releases and install it. We provide binaries for MacOS, Windows and Linux (deb, RPM, snap, AppImage, Gentoo). For more details see [supported platforms and packages](docs/platforms-and-packages.md).
Of course, you need to have [Gopass](https://github.com/gopasspw/gopass) up and running. We also recommend to use a dialog-based PIN-entry-tool for typing in GPG passphrases like [pinentry-mac for MacOS](https://formulae.brew.sh/formula/pinentry-mac) instead of using the default terminal-based.
### Platform notice
We'll only test the MacOS builds and **are not able to offer support for Linux and Windows releases**. We are happy to review your pull requests addressing any of such issues.
## Issues and Contribution
Feel free to report any usage issue. We are very keen about your feedback and appreciate any help.
You'd like to help us developing Gopass UI? Awesome! We are looking forward to your pull requests, issues and participation in discussion.
## Development
See how to get started in our [development documentation](docs/development.md).
================================================
FILE: docs/development.md
================================================
## Development
### Clone and install dependencies
First, clone the repository and navigate inside:
```bash
git clone https://github.com/codecentric/gopass-ui.git && cd gopass-ui/
```
Then, install the dependencies:
```bash
nvm use # make sure that nvm is installed on your machine and it installs the requested Node version
npm install
```
### Development
The app is divided into one main process and two renderer processes. One renderer process is for the global search window, the other one for the main explorer window.
All processes have to be started **simultaneously** in different console tabs:
```bash
# don't forget nvm use && npm install from the previous section ;-)
# run this in a pane for powering the main process (the "backend")
npm run start-main-dev
# run this in a pane for the renderer of the main/explorer window
npm run start-renderer-explorer-dev
# run this in a pane for the renderer of the search window
npm run start-renderer-search-dev
```
This will start the application with hot-reloading so you can instantly start developing and see the changes in the open application.
### Testing
We use Jest for tests. Currently the project contains (too less) unit and integration tests. Unit tests should have no dependency to the local machine except the Node environment we're setting up. Integration tests can also involve system binaries like Gopass, GPG and so on – you got the point ;-)
Run them with `npm test` and `npm run test:integration`.
### Linting
This project contains `prettier` and `tslint`. **TLDR:** Prettier assists during development. Tslint is ran in a Husky pre-commit hook together with unit tests and in Github actions (see `.github/workflows/`).
**Prettier** is more aggressive because it is designed opinionated. It will find and correct more . The only options we decide on are to be found in `.prettierrc`. We use Prettier to enforce and apply code style during development process. Right after saving an edited file it will correct code style mistakes! In VSCode this comes with the Prettier extension already. In JetBrains IntelliJ IDEA/Webstorm [this can be easily configured](https://prettier.io/docs/en/webstorm.html). On the CLI, feel free to use `npm run prettier:check` and `npm run prettier:write`.
**Tslint** is used to check the code style baseline before commiting staged code and while running CI. Feel free to use the scripts `npm run lint` for linting and `npm run lint:fix` for fixing simple issues automatically to make code comply to the baseline style.
### Production packaging
We use [Electron builder](https://www.electron.build/) to build and package the application. See how we use it to package all targeted platforms and formats in [our release docs](./releasing.md).
Packaging will create all results in `releases` folder.
================================================
FILE: docs/platforms-and-packages.md
================================================
## Supported Platforms
Gopass-ui is available for the following platforms:
* MacOS (.dmg)
* Windows (.exe)
* Linux, see next section
### Linux Packages
For Linux the following packages are provided:
* .deb (download [here](https://github.com/codecentric/gopass-ui/releases/latest))
* .rpm (download [here](https://github.com/codecentric/gopass-ui/releases/latest))
* .snap (download [here](https://github.com/codecentric/gopass-ui/releases/latest))
* .pacman (download [here](https://github.com/codecentric/gopass-ui/releases/latest))
* .AppImage (download [here](https://github.com/codecentric/gopass-ui/releases/latest))
* Gentoo: `emerge app-admin/gopass-ui` ([gentoo overlay](https://gitlab.awesome-it.de/overlays/awesome), thanks [@danielcb](https://github.com/danielcb))
================================================
FILE: docs/releasing.md
================================================
## Releasing and Publishing Gopass UI
This documents the steps it needs to release and publish a new version of Gopass UI to Github.
### In the codebase
1. Let's check if code style and tests are okay: `npm run release:check`. If there are issues, fix them first.
2. Increment the version number in `package.json` and do `npm i` to reflect it within `package-lock.json`.
3. Build the releases for your local platform to verify everything is working: `npm run release`. This takes a while. If successful, the binaries were built in `release/`
4. Build the releases for [all supported platforms and packages](./platforms-and-packages.md): `npm run release:full`
5. As we know that everything worked, commit and push the version change
### Draft and public release on Github
1. [Draft a new release](https://github.com/codecentric/gopass-ui/releases/new)
2. Choose the created Git tag.
3. Write a precise but catchy release title. Maybe something about the core topics of this release etc.
4. Describe this release in detail. What features were added or changed? Were bugs fixed? New platforms supported?
5. Attach all binaries for this release from the `release/` directory.
6. Publish and spread the word! 🎉🎉🎉
================================================
FILE: mocks/fileMock.js
================================================
module.exports = 'test-file-stub'
================================================
FILE: mocks/styleMock.js
================================================
module.exports = {}
================================================
FILE: package.json
================================================
{
"name": "gopass-ui",
"version": "0.8.0",
"description": "Awesome UI for the gopass CLI – a password manager for your daily business",
"main": "./dist/main.js",
"scripts": {
"build-main": "cross-env NODE_ENV=production webpack --config webpack.main.prod.config.js",
"build-renderer-search": "cross-env NODE_ENV=production webpack --config webpack.renderer.search.prod.config.js",
"build-renderer-explorer": "cross-env NODE_ENV=production webpack --config webpack.renderer.explorer.prod.config.js",
"build": "npm run build-main && npm run build-renderer-explorer && npm run build-renderer-search",
"start-renderer-search-dev": "NODE_OPTIONS=\"--max-old-space-size=2048\" webpack-dev-server --config webpack.renderer.search.dev.config.js",
"start-renderer-explorer-dev": "NODE_OPTIONS=\"--max-old-space-size=2048\" webpack-dev-server --config webpack.renderer.explorer.dev.config.js",
"start-main-dev": "webpack --config webpack.main.config.js && electron ./dist/main.js",
"prestart": "npm run build",
"start": "electron .",
"prettier:check": "prettier --check '{src,test,mocks}/**/*.{ts,tsx,js,jsx}'",
"prettier:write": "prettier --write '{src,test,mocks}/**/*.{ts,tsx,js,jsx}'",
"lint": "tslint '{src,test,mocks}/**/*.{ts,tsx,js,jsx}' --project ./tsconfig.json",
"lint:fix": "tslint '{src,test,mocks}/**/*.{ts,tsx}' --project ./tsconfig.json --fix",
"test": "npm run test:unit",
"test:unit": "jest --testRegex '\\.test\\.tsx?$'",
"test:unit:watch": "jest --testRegex '\\.test\\.tsx?$' --watch",
"test:integration": "jest --testRegex '\\.itest\\.ts$'",
"release:check": "npm run lint && npm test",
"release": "npm run release:check && npm run build && electron-builder --publish onTag",
"release:full": "npm run release:check && npm run build && electron-builder --mac dmg --win --linux deb rpm snap AppImage pacman",
"postinstall": "electron-builder install-app-deps"
},
"jest": {
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "\\.?test\\.tsx?$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json",
"node"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "{WAITING_TEXTS[waitingTextIndex % WAITING_TEXTS.length]}
During the environment test you might be asked for your GPG passphrase. Please unlock your GPG keypair by entering it.
{searchShortcut.replace(/\+/g, ' + ')}
It seems you don't have passwords in your stores yet. A secret is considered a password if it contains words such as: password, pw, pass, secret, key or similar.
) } if (status.inProgress && status.passwordsCollected > 0) { const progressPercentage = Math.round((status.passwordsCollected / status.totalPasswords) * 100) return ( <>Your passwords are currently being collected and analysed, please wait until ready... {progressPercentage}%
Something went wrong here: {status.error.message}
} } private renderOverallPasswordHealth(overallPasswordHealth: PasswordHealthSummary, improvablePasswordsAmount: number) { return ({ const value = parseInt(event.target.value, 10) Settings.updateUserSettings({ secretValueLength: value }) }} max='200' />
You could improve {failedRules.length} characteristica of this password.
Good job! This secret satisfies all basic criteria for a potentially good password.
)} > ) const PasswordRatingComponent = ({ secretValue }: PasswordRatingComponentProps) => { const { health, failedRules } = PasswordRater.ratePassword(secretValue) return (