{"id":13721794,"url":"https://github.com/Narigo/keepass-diff","last_synced_at":"2025-05-07T14:30:53.580Z","repository":{"id":38375323,"uuid":"153025342","full_name":"Narigo/keepass-diff","owner":"Narigo","description":"A CLI-tool to diff Keepass (.kdbx) files. Useful, if syncing with Dropbox or NextCloud and getting multiple files due to conflicts.","archived":false,"fork":false,"pushed_at":"2024-08-17T20:39:32.000Z","size":9986,"stargazers_count":326,"open_issues_count":23,"forks_count":29,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-02T15:59:27.856Z","etag":null,"topics":["cli-app","diff","keepass","rust"],"latest_commit_sha":null,"homepage":"https://keepass-diff.narigo.dev/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Narigo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-14T22:37:02.000Z","updated_at":"2025-04-28T04:39:49.000Z","dependencies_parsed_at":"2022-07-12T01:47:27.638Z","dependency_job_id":"de380f83-4043-4259-9011-75195bb0877d","html_url":"https://github.com/Narigo/keepass-diff","commit_stats":{"total_commits":149,"total_committers":8,"mean_commits":18.625,"dds":0.5302013422818792,"last_synced_commit":"e23e8d60d2ca81e9fb37ff48f1962f5b384f9646"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narigo%2Fkeepass-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narigo%2Fkeepass-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narigo%2Fkeepass-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narigo%2Fkeepass-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Narigo","download_url":"https://codeload.github.com/Narigo/keepass-diff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895492,"owners_count":21821169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-app","diff","keepass","rust"],"created_at":"2024-08-03T01:01:21.486Z","updated_at":"2025-05-07T14:30:48.569Z","avatar_url":"https://github.com/Narigo.png","language":"Rust","readme":"\u003cp align=\"center\" style=\"text-align: center;\"\u003e\n  \u003cimg src=\"keepass-diff.svg\" alt=\"keepass-diff\" /\u003e\n\u003c/p\u003e\n\nThis CLI-tool diffs two Keepass (.kdbx) files and prints their differences.\n\n## Installation\n\nThe main installation method is through Rust.\n\n```\nRUSTFLAGS=\"-C target-cpu=native\" cargo install keepass-diff\n```\n\nThe `RUSTFLAGS` variable will significantly boost performance. See\n[installation note in keepass-rs](https://github.com/sseemayer/keepass-rs#installation).\n\n### Alternative installation and usage using a container\n\nIf you don't have the Rust toolchain installed, there is an alternative installation method using containers. There are two installation steps necessary to be able to run `keepass-diff` in your current working directory with a simple command:\n\n1. Build the container\n2. Set up an alias for simple usage\n\nThe following commands assume `docker` for building and running the container, but it should be possible to replace it with `podman` and maybe other engines. Please check whether the options are available.\n\nTo build the container, run:\n\n```\ndocker build -f Containerfile.install -t \"keepass-diff:custom-local\" .\n```\n\nTo get the correct alias for your machine to use, run:\n\n```\nalias keepass-diff='docker run -it --rm -v \"$(pwd)\":/app:ro \"keepass-diff:custom-local\"'\n```\n\nThe `alias` command can be copy and pasted into your `.bashrc` or `.zshrc` file. This will make sure to have keepass-diff available whenever you start a new terminal session. Either start a new shell or run the command in the current terminal once to make it available right away.\n\nWith the alias being set up, `keepass-diff` should be available. Try running:\n\n```\nkeepass-diff --help\n```\n\n**Note:** Keep in mind that the alias is set up in a way to allow the current working directory being mounted into the container. That means you're able to access files from this directory, but you won't be able to access files through an absolute path or using `../` from your host machine.\n\n## Usage\n\n```\nkeepass-diff \u003cfile-a\u003e \u003cfile-b\u003e\n```\n\nThe CLI will ask for the password for both files individually.\n\n![Example Screencast](screencast.gif)\n\n### Providing passwords\n\nYou can also provide one or both passwords on the command line (please be aware\nthat this will expose them to other users logged on to the system):\n\n```\nkeepass-diff \u003cfile-a\u003e \u003cfile-b\u003e --password-a \u003cpassword-a\u003e --password-b \u003cpassword-b\u003e\n```\n\nIf the files have the same password, you can use the `--passwords \u003cpassword\u003e`\nflag. Be aware this has the same problem as above:\n\n```\nkeepass-diff \u003cfile-a\u003e \u003cfile-b\u003e --passwords \u003cpassword\u003e\n```\n\nTo avoid exposing the password, use `--same-password` instead. The CLI will ask\nyou to type it once for both files.\n\n```\nkeepass-diff \u003cfile-a\u003e \u003cfile-b\u003e --same-password\n```\n\n### Providing keyfiles\n\n```\nkeepass-diff \u003cfile-a\u003e \u003cfile-b\u003e --keyfile-a \u003ckeyfile-a\u003e --keyfile-b \u003ckeyfile-b\u003e\n```\n\nIf one of these flags is provided, it will use the keyfile for authentication.\nIt will still ask for a password, if the password flags are not provided.\n\n### Disabling color output for scripts\n\nIf you want to pipe the output of the command into another file or script, you\nmay want to disable the terminal colors. You can do so with the `--no-color` or\n`-C` option.\n\n### Obfuscate passwords in output\n\n`keepass-diff` usually shows changed passwords. If you need it to obfuscate\nthese protected fields, use `--mask-passwords` (or `-m`) to show `***` instead\nof the real passwords. Be aware that the output can show a changed line without\nactual visible changes in the output then.\n\n`--help` yields:\n\n```\nThis CLI-tool reads two Keepass (.kdbx) files and prints their differences.\n\nUsage: keepass-diff [OPTIONS] \u003cINPUT-A\u003e \u003cINPUT-B\u003e\n\nArguments:\n  \u003cINPUT-A\u003e  Sets the first file\n  \u003cINPUT-B\u003e  Sets the second file\n\nOptions:\n  -C, --no-color                 Disables color output\n  -v, --verbose                  Enables verbose output\n  -m, --mask-passwords           Enables verbose output\n      --password-a \u003cpassword-a\u003e  Sets the password for the first file (will be asked for if omitted)\n      --password-b \u003cpassword-b\u003e  Sets the password for the second file (will be asked for if omitted)\n      --passwords \u003cpasswords\u003e    Sets the password for both files (if it's the same for both files)\n      --same-password            Asks for password only once, and tries to open both files with it\n      --no-password-a            Sets no password for the first file (and will not ask for it)\n      --no-password-b            Sets no password for the second file (and will not ask for it)\n      --no-passwords             Sets no password for both files (and will not ask for both files)\n      --keyfile-a \u003ckeyfile-a\u003e    Sets the key file for the first file\n      --keyfile-b \u003ckeyfile-b\u003e    Sets the key file for the second file\n      --keyfiles \u003ckeyfiles\u003e      Sets the same key file for both files (keyfile-a and keyfile-b would take\n                                 precedence if set as well)\n  -h, --help                     Print help\n  -V, --version                  Print version\n```\n\n## Used libraries:\n\n- [clap](https://clap.rs/) to read command line arguments\n- [rpassword](https://github.com/conradkdotcom/rpassword) to read the passwords.\n- [keepass](https://github.com/sseemayer/keepass-rs) to read `.kdbx` files.\n- [termcolor](https://github.com/BurntSushi/termcolor) to print with colors.\n\n## Contributing\n\nCare to help? I'm pretty new to Rust, so if anyone likes to help or teach me\ncool stuff, please feel free to\n[reach out to me on X](https://twitter.com/NarigoDF),\n[my GitHub profile](https://github.com/Narigo),\n[my website](https://narigo.dev/) or by\n[opening an issue in the keepass-diff repository](https://github.com/Narigo/keepass-diff/issues/new).\n\nIn general, I'm trying to avoid breaking changes with this tool. If you think an\noption should be added or made to a default, this can be discussed in an issue.\nI would prefer adding an option first and collect multiple of these changes\nbefore releasing a new major version with breaking changes.\n\n### Testing\n\nThere are unit tests (`cargo test`) and end-to-end tests (`./run-tests.sh`).\nBoth test suites help find regressions in the code and should be checked before\nsending a pull request.\n\nPassword for the Keepass demo files: `demopass`.\n\n`test_file.kdbx` is locked without password and keyfile `keyfile.key`.\n`test2_file.kdbx` is locked with `demopass` and the keyfile `keyfile.key`.\n\nA small bash script for running tests is `run-tests.sh`. It will run a few tests\nto see if the outputs is correct. Best run as\n`RUSTFLAGS=\"-C target-cpu=native\" ./run-tests.sh` for improved performance.\n\n### Building docs\n\nIt needs to have the `cargo-script` command installed first:\n\n```\ncargo install cargo-script\n```\n\nThen, run `cargo script docs_build.rs` to update the `docs/index.html` from the\ncurrent `README.md` file.\n","funding_links":[],"categories":["Clients","Rust"],"sub_categories":["Other clients"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNarigo%2Fkeepass-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNarigo%2Fkeepass-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNarigo%2Fkeepass-diff/lists"}