{"id":28144847,"url":"https://github.com/marvin1099/bitwardenautofiller","last_synced_at":"2025-05-14T22:14:11.730Z","repository":{"id":268128396,"uuid":"861043035","full_name":"marvin1099/BitwardenAutofiller","owner":"marvin1099","description":"This Bitwarden autofill script automates the process of filling in login credentials on desktop applications. It leverages Bitwarden's CLI to retrieve and input usernames, passwords, and 2FA codes into non-browser apps, solving the browser-only limitation of Bitwarden's native autofill feature.","archived":false,"fork":false,"pushed_at":"2025-01-20T19:28:21.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T20:29:35.613Z","etag":null,"topics":["autofill","automation","bitwarden","cli","client","cross-platform","daemon","encryption","python","software"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marvin1099.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":"2024-09-21T21:02:25.000Z","updated_at":"2025-01-20T19:28:24.000Z","dependencies_parsed_at":"2024-12-14T15:20:48.861Z","dependency_job_id":"10508052-6572-46d9-9d00-94e630d9c267","html_url":"https://github.com/marvin1099/BitwardenAutofiller","commit_stats":null,"previous_names":["marvin1099/bitwardenautofiller"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin1099%2FBitwardenAutofiller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin1099%2FBitwardenAutofiller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin1099%2FBitwardenAutofiller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marvin1099%2FBitwardenAutofiller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marvin1099","download_url":"https://codeload.github.com/marvin1099/BitwardenAutofiller/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235701,"owners_count":22036966,"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":["autofill","automation","bitwarden","cli","client","cross-platform","daemon","encryption","python","software"],"created_at":"2025-05-14T22:13:26.111Z","updated_at":"2025-05-14T22:14:11.699Z","avatar_url":"https://github.com/marvin1099.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitwarden Autofill Script\n\nThis Bitwarden autofill script automates the process of filling in login credentials on desktop applications.  \nIt leverages Bitwarden's CLI to retrieve and input usernames, passwords, and TOTP codes into non-browser apps,  \nsolving the browser-only limitation of Bitwarden's native autofill feature.  \nThe project now includes a GUI version that makes it easier to run the autofiller if you don't know the terminal.\n\n## Features\n\n- Automatically fills usernames, passwords, and TOTP codes into non-browser apps.\n- Supports customizable fill actions and sequences.\n- Operates in both daemon and client modes.\n- Offers additional security options with encryption for communication.\n- The GUI Provides a user-friendly interface to manage input options, configure settings, and control the daemon/client.\n\n## Security\n\nEncryption is implemented to ensure that sensitive data, such as passwords and communication between client and daemon, is securely handled:\n\n- **Encryption for Communication**: All communication between the client and the daemon is encrypted using `AES-256`. The encryption passphrase is derived from a combination of:\n  - A **hardcoded password**\n  - An **optional user-specified password** that can be set using the `--encryption` flag\n  - A **salt**, which is stored in a hardcoded file location.\n  \n- **Passphrase Hashing**: The passphrase generated from the above components is hashed using `SHA-256`,  \n  and the resulting hash is used as the key for AES-256 encryption.\n\n- **Encrypted Command Caching**: Commands sent to the Bitwarden autofill runner are cached in an encrypted format,  \n  which helps protect against memory-based attacks. Even if an attacker gains access to the cache,  \n  the commands remain encrypted and unusable without the correct passphrase.\n\nThis ensures that data at rest and in transit is protected, minimizing the risk of sensitive information leakage.\n\n## Downloads\n\nYou can download the [latest binary releases from here](https://codeberg.org/marvin1099/BitwardenAutofiller/releases).  \nBoth GUI and CLI versions can be downloaded there.  \nAfter downloading the binary, **continue reading at the [Usage](#usage) section** to understand how to run the script.\n\nIf you want to build the project from source or run it directly in a development environment,  \n**continue reading** for the setup instructions.\n\n## Installation (For Running From Source)\n\n1. **Clone the repository:**\n   Git is need for this step, make shure you install it and add it to your PATH.  \n   ```bash\n   git clone https://codeberg.org/marvin1099/BitwardenAutofiller.git\n   cd BitwardenAutofiller\n   ```\n\n2. **Create a virtual environment (Linux users):**\n   This step can be skipped on Windows. On Linux run the following in a bash console:  \n   ```bash\n   python -m venv .venv\n   source .venv/bin/activate\n   ```\n\n3. **Install required dependencies:**\n   ```bash\n   # for cli\n   pip install .\n   # for gui (can be skipped if you dont need the gui)\n   pip install .[gui]\n   ```\n\n4. **Bitwarden CLI:**\n   Ensure the Bitwarden CLI (`bw`) is installed and accessible in your system's PATH.  \n   You can also provide a custom path for the `bw` cli tool, if you don't want it in your PATH.  \n   You can download and install it from the [official Bitwarden CLI page](https://bitwarden.com/help/article/cli/).\n\n5. **Continue reading at the [Usage](#usage) section** to understand how to run the script.  \n   **Otherwise continue reading** for building from source.  \n\n### Building From Source\n\n1. **Clone the repository (if not already done):**\n   Git is need for this step, make shure you install it and add it to your PATH.  \n   ```bash\n   git clone https://codeberg.org/marvin1099/BitwardenAutofiller.git\n   cd BitwardenAutofiller\n   ```\n   Run this `in PowerShell on Windows` or `a bash console on Linux`.\n\n2. **Build the binary:**\n   - On **Windows**, run:\n     ```powershell\n     powershell -NoProfile -ExecutionPolicy Bypass -File build.ps1\n     ```\n   - On **Linux**, run:\n     ```bash\n     ./build.sh\n     ```\n   (Note: The `.venv` creation is automatic during the Linux build.)\n\n3. The binary files will be located in the `dist` folder.  \n\n## Usage\n\nIf running the script from source use following command:\n```bash\npython bitwardenautofiller.py\n```\nAnd use the following if you want the gui instead:\n```bash\npython bwautofillergui.py\n```\n\nOtherwise if you use binarys run / dobble click the file:  \n- `BitwardenAutofillerWindowsCLI.exe` on Windows (for the CLI)\n- `BitwardenAutofillerWindowsGUI.exe` on Windows (for the GUI)\n- `BitwardenAutofillerLinuxCLI` on Linux (for the CLI)\n- `BitwardenAutofillerLinuxGUI` on Linux (for the GUI)\n\n#### IMPORTANT\nTo make autofill work, you must add the program name as a URL entry in the app entry.  \nSo if you have a browser autofill account for your app you just add the URL there.  \nOtherwise you add the URL to a new entry and input your username and password as usual.  \nFor example, if your application is called `steam`,  \nyou should add `pcprocess://steam` as a URL in the Bitwarden GUI app under your steam account entry.  \nAlways use the format `pcprocess://\u003capp_name\u003e` for applications you want to autofill.\n\n**ALSO** the password and mail arguments are manly for the gui.  \nIt is more secure if you do not add the mail and password the cli.  \nInstead running the script in a terminal will automatically ask you for the password.  \nThis is more secure then using the cli arguments.  \nIn the gui the cli is imported so no arguments ever leave the app.  \nTherefore the gui is secure too. \n\n### Command-line Arguments\n\nThe script supports the following command-line options for flexible usage:\n\n- `-s, --serverurl`: URL that Bitwarden uses (set once; will be saved).\n- `-cf, --certfile`: Path to the certificate file (if Bitwarden is self-signed).\n- `-l, --logout`: Logout from Bitwarden (fixes sync issues, relogin needed).\n- `-p, --password`: Bitwarden vault password (only use if needed; the automatic input field is safer).\n- `-m, --mail`: Bitwarden vault email.\n- `-e, --encryption`: Additional password for encryption.\n- `-d, --daemonmode`: Start in daemon mode only.\n- `-c, --clientmode`: Start in client mode only.\n- `-nm, --nomode`: Do not start the daemon or client (for testing argument setup).\n- `-bw, --bitwardenclipath`: Path to Bitwarden CLI (default is 'bw').\n- `-n, --noblocking`: Non-blocking/non-interactive mode.\n- `-t, --daemontimeout`: Set the daemon connection timeout.\n- `-sf, --saltfolder`: Create the saltfiles in a subfolder in /tmp  \n    (usefull for file sync, when daemon and client are on 2 PCs).\n- `-ip, --localip`: Local IP address for the daemon server (default is '127.0.0.1').\n- `-lp, --localport`: Local port for the daemon server (default is '64756').\n- `-f, --fillactions`: Set custom fill actions for autofill  \n    (Default: `C14724635`, a sequence of actions: 1 = user, 2 = pass, 3 = totp, 4 = type, 5 = copy,  \n    6 = newline, 7 = tab, A = next account, B = previous account, C = first account, D = last account).\n- `-x, --closedaemon`: Send a close signal to the daemon.\n- `-y, --sync`: Sync the Bitwarden vault.\n- `-r, --raise`: raises errors instead of exiting (used for the gui)\n- `-cli`: CAN ONLY BE USED WITH THE GUI, will bypass the GUI and make the GUI like the CLI.\n\nFor more details, run:\n```bash\npython bitwardenautofiller.py -h\n```\nIf you have the GUI version it sould be easy enoght to understand.  \nbut if not you can bypass the gui as mentioned to run cli stiuff with the gui binary.  \nfor that you would run the command:\n```bash\npython bwautofillergui.py -cli -h\n```\nThis would then display the cli help.\n\nTo run the CLI binary versions with arguments open a terminal and run:  \n- `\"BWAutofillerWindowsCLI.exe\" -h` on Windows.  \n- `\"BWAutofillerLinuxCLI\" -h` on Linux.  \n\nIf you use the GUI you probably wont need to use the cli.  \nJust dobble click / run:\n- `\"BWAutofillerWindowsGUI.exe\"` on Windows.  \n- `\"BWAutofillerLinuxGUI\"` on Linux.  \n\nThe full filepaths will be needed, if you are in the terminal and not at the script directory.  \neg. `\"/home/user/Apps/Autofiller/BWAutofillerLinuxCLI\" -h` this is just an example of course.  \nYou need to enter your path of the autofiller.\n\n### Cli Examples\n\nTo start the script in daemon mode with a certfile and with a custom additional communication password:\n```bash\npython bitwardenautofiller.py -d -cf /path/to/cert/file.cer -e ComplexPassword\n```\nThe same communication password would also need to be set for the client.\n\nTo start the script in client mode with the sync command and a additional custom communication password (daemon needs to run):\n```bash\npython bitwardenautofiller.py -c -e ComplexPassword\n```\n\nTo use a custom Installation path of Bitwarden you would use:\n```bash\npython bitwardenautofiller.py -bw /path/to/bw\n```\nIn here there is no info on daemon or clientmode.  \nIn this case daemon will be used if it isn't running, otherwise the client will run.\n\nTo start the script in client mode (daemon must already be running) with a custom fill action sequence:\n```bash\npython bitwardenautofiller.py -c -f C14724635\n```\nOn Linux add `sleep 1; ` in front to wait 1 second before checking for the active app.  \nOn PowerShell Windows add `Start-Sleep -Seconds 1; ` in front for the same behavior.  \nThis will fill in the login information (username, password, and copy the TOTP code),  \nand it will hit tab after the username and enter after the password.\n\nThe daemon can be closed with the client by sending:\n```bash\npython bitwardenautofiller.py -c -x\n```\n\nIf you use a binary you just replace `python bitwardenautofiller.py` with the path to your binary.\n\n### Network usage\nIf you want, you can use the daemon on a other pc of your network.  \nFor that you want to fist setup a SMB share or something like it.  \nYou want to do this on the pc that runs the the daemon.  \nThis pc will never have to type anything, as the client will do that.  \nSo you can have this on a server without a GUI.  \nYou want to share the \"/tmp/Bitwarden+Cli-Autofiller+Script-Directory\" folder.\n\nNext go to the client pc (the one where you like to autofill).  \nThere mount the share to \"/tmp/Bitwarden+Cli-Autofiller+Script-Directory\".  \nBy doing this (or a variation of this) the salt files are now the same on both PCs.\n\nNext on the server run:\n```bash\npython bitwardenautofiller.py -n -d -sf -t -1 -cf CERTFILE -s SERVERURL  -p PASSWORD -m MAIL \n```\nNot all of this is needed but lets break it down:\n- `-n`: disables all inputs, for a server this is useful. \n- `-d`: runs daemonmode.\n- `-sf`: enables the saltfile subfolder \"/Bitwarden+Cli-Autofiller+Script-Directory\".\n- `-t` `-1`: disables timeout, also useful on a server.\n- `-cf` `CERTFILE`: set the certfile (only needed for self-signed Bitwarden).\n- `-s` `SERVERURL`: set the server URL (if you use your own server, only needs to be set once).\n- `-p` `PASSWORD`: set the vault password.\n- `-m` `MAIL`: set the vault mail.\n\nReplace uppercase words with the correct info for you.\n\nOn the client run:\n```bash\npython bitwardenautofiller.py -c -sf -ip LOCALIP -lp LOCALPORT\n```\nThis will then autofill the active app.  \nAdd `sleep 1; ` in front to wait 1 second before cheking for the active app.  \nOn PowerShell Windows add `Start-Sleep -Seconds 1; ` in front for the same behavior.  \nLet's also break down the command:\n- `-c`: runs clientmode.\n- `-sf`: enables the saltfile subfolder \"/Bitwarden+Cli-Autofiller+Script-Directory\".\n- `-ip` `LOCALIP`: set the daemon IP.\n- `-lp` `LOCALPORT`: set the daemon port.\n\nReplace uppercase words with the correct info for you.\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.  \nPlease do so on the [main repo on codeberg.org](https://codeberg.org/marvin1099/BitwardenAutofiller) if possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvin1099%2Fbitwardenautofiller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarvin1099%2Fbitwardenautofiller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvin1099%2Fbitwardenautofiller/lists"}