A script that finds available custom license plates through the California DMV's online system. This is the codebase corrsponding to this blog post on finding available California license plates.
- Clone the repository:
git clone https://github.com/yourusername/CA-DMV-Plate-Finder.git
cd CA-DMV-Plate-Finder- Install dependencies:
bun installbun run find-platesOr directly:
bun src/index.tsThe application supports two methods for providing plates to check:
Create a plates.txt file in the project root with one plate per line:
ABC123
TESLA1
GITHUB
CODING
The application will automatically detect and stream plates from this file.
If no plates.txt file exists, the application will generate 3-character combinations. You can modify the getNextPlate() generator in src/index.ts to customize the generation pattern:
import { combinationsWithReplacement } from "combinatorial-generators";
async function* getNextPlate(): AsyncGenerator<string> {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for (const combo of combinationsWithReplacement(chars, 3)) {
yield combo.join("");
}
}