mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
[wiki/libmutton] Add config file info to developer guide
This commit is contained in:
@@ -6,7 +6,7 @@ libmutton was designed to be usable as a library for building other compatible p
|
||||
All functionality in the `backend` and `sync` packages are designed to be used in other implementations.
|
||||
|
||||
## Build Tags
|
||||
Custom build tags can be (and sometimes must be) used to achieve desired results.
|
||||
Custom build tags can (and sometimes must) be used to achieve desired results.
|
||||
|
||||
These are as follows:
|
||||
- `returnOnExit`: If making an interactive interface (GUI/TUI/interactive CLI), you probably need to use this build tag. Without it, your entire program will exit after any given operation is completed. This behavior is only desired for non-interactive CLI implementations, such as MUTN. Currently, errors will result in the program exiting **even with this build tag**. This may be changed in the future (under evaluation).
|
||||
@@ -14,6 +14,31 @@ These are as follows:
|
||||
- `termux`: Allows creating a Linux binary that can interact with the Termux clipboard (for Android)
|
||||
|
||||
## Required Arguments
|
||||
libmutton-based password managers should accept at least one specific required argument, as well as another recommended one:
|
||||
libmutton-based password manager clients should accept at least one specific required argument, as well as another recommended one:
|
||||
- `clipclear`: This argument is required for correct functionality. In order to clear the clipboard on a timer, libmutton-based password managers call another instance of their executable with the `clipclear` argument (e.g. `mutn clipclear`) with the intended clipboard contents provided via STDIN. If after 30 seconds the clipboard contents have not changed, they are cleared. Please accept a `clipclear` argument that is processed before the launch of any interactive interface. All this argument needs to do is call `backend.ClipClearArgument()`.
|
||||
- `init`: This argument is optional, but recommended for CLI interfaces. Some error messages request the user to use the `init` argument to fix configuration issues. If the argument does not exist, this may confuse the user.
|
||||
- `init`: This argument is optional, but recommended for CLI interfaces. Some error messages request the user to use the `init` argument to fix configuration issues. If the argument does not exist, this may confuse the user.
|
||||
|
||||
## Configuration
|
||||
libmutton-based password manager clients should all share the same INI configuration file.
|
||||
|
||||
On UNIX-like systems, this is located at `~/.config/libmutton/libmutton.ini`. On Windows, it is located at `~\AppData\Local\libmutton\config\libmutton.ini`.
|
||||
|
||||
### Base `libmutton.ini` Layout
|
||||
The current base layout of `libmutton.ini` will change leading up to release v1.0.0. As of right now, the specification is as follows:
|
||||
```
|
||||
[LIBMUTTON]
|
||||
gpgID = <gpg key id>
|
||||
sshUser = <remote user>
|
||||
sshIP = <remote ip>
|
||||
sshPort = <remote ssh port>
|
||||
sshKey = <ssh private key identity file path>
|
||||
sshKeyProtected = <true/false>
|
||||
sshEntryRoot = <remote entry root>
|
||||
sshIsWindows = <true/false>
|
||||
```
|
||||
If creating a third-party client that requires extra configuration to be stored, please use the same file and create a new INI section for your application-specific configuration, e.g.:
|
||||
```
|
||||
[THIRD-PARTY-CLIENT-NAME]
|
||||
configKey = <value>
|
||||
```
|
||||
This ensures that a user can use multiple client applications with the same configuration while avoiding conflicts.
|
||||
|
||||
Reference in New Issue
Block a user