Open-source ATtiny85 firmware that turns a Digispark into a USB HID keyboard that automatically types a pre-configured password when plugged in.
attiny-pass-key is a tiny, single-sketch Arduino firmware for the Digispark / ATtiny85 microcontroller. It emulates a USB keyboard (USB HID) and types a password for you the moment the board is plugged into any computer — no drivers, no software, no manual typing. Think of it as a DIY USB password dongle or auto-typer built on cheap, widely available hardware.
- Why use attiny-pass-key?
- Purpose
- How It Works
- Features
- Tools Used
- Getting Started
- Build and Upload
- Releases
- Project Structure
- Keywords
Typing a password by hand can be a pain — especially when you don't have a keyboard connected directly to the device you want to access, or when you use a passphrase so long and complex that retyping it every time is a hassle. attiny-pass-key solves this by typing the password for you over USB.
This project is designed for the ATtiny microcontroller (specifically the Digispark / ATtiny85) to implement a passkey system. It acts as a USB keyboard device that automatically types a configured password when plugged in. This makes entering long passphrases effortless on machines where typing them is impractical — a convenience tool, not a security one.
Once plugged in, the device waits about a second, types the configured password followed by Enter into whatever window currently has focus, then blinks the on-board LED indefinitely.
- Automated Password Entry: Types a pre-configured password via USB HID the moment the board is plugged in.
- Plug-and-Play USB Keyboard: Enumerates as a standard USB HID keyboard — works on Windows, macOS, and Linux with no extra drivers or software.
- Compact Codebase: A single Arduino sketch optimized for the resource-constrained ATtiny85 microcontroller.
- Configurable Password: Set your password via an environment variable, injected into the firmware at compile time.
- Cheap, Accessible Hardware: Runs on the low-cost Digispark / ATtiny85 board.
- Arduino CLI: For building and uploading firmware.
- mise: For task management and tool versioning.
- ATtiny85 / Digispark: The target hardware platform.
- Digistump's
DigiKeyboardlibrary: USB HID functionality (vendored from the Digistump platform, referenced by path insketch.yaml).
- mise: This project uses
miseto manage dependencies and tasks. Install it by following the installation guide. - Hardware: A Digispark or ATtiny85 development board.
- Clone the repository:
git clone https://github.com/lmarqs/attiny-pass-key.git
cd attiny-pass-key- Install Tools:
Run
mise installto download the required version ofarduino-cliand other tools defined inmise.toml.
mise install- Initialize Environment: Run the setup task to configure the Arduino core and libraries.
mise run setupThis command will:
- Create a
.envfile from.env.exampleif it doesn't exist. - Update the Arduino core and library indexes.
- Configure Password:
Open the
.envfile and set your desired password in theATTINY_PASS_KEY_PASSWORDvariable.
ATTINY_PASS_KEY_PASSWORD="your_secure_password_here"This project uses mise tasks to simplify the build process.
- Compile the Firmware:
mise run arduino:compileThis compiles the sketch and injects the password from your .env file.
- Upload to Device:
mise run arduino:uploadConnect your Digispark/ATtiny85 when prompted (or within the 60-second timeout window typical for Micronucleus bootloaders).
- All-in-one (Optional):
mise run arduino:runRuns compile + upload + monitor in sequence.
Note: With
DigiKeyboard, the Digispark enumerates as an HID-only device (V-USB provides no CDC serial), somise run arduino:monitorwill typically find no serial port — this sketch produces no serial output.
Every push to main triggers a CI build that publishes a build-<sha> GitHub release with the build output. Release artifacts are compiled without a .env, so the firmware contains the default_password fallback — to embed your own password, build locally as described above.
attiny-pass-key.ino: The main Arduino sketch containing the logic.mise.toml: Configuration formise, defining tools and tasks (compile, upload, setup).arduino-cli.yaml: Configuration file forarduino-cli.sketch.yaml: Defines the board profile (FQBN) and platform dependencies..env: Stores sensitive configuration like the password (do not commit this file)..arduino/: Local sandboxed Arduino environment (platforms, tools, build output — gitignored), created by the setup and compile tasks.
ATtiny85, Digispark, USB HID keyboard, password typer, auto-type password, USB password dongle, Arduino firmware, ATtiny microcontroller, micronucleus bootloader, DigiKeyboard, arduino-cli, mise, embedded firmware, HID emulation, USB rubber ducky alternative, keystroke injection, AVR.
