m13v/ai-browser-profile-swift-light
Lightweight Swift library to extract browser profile data on macOS — zero external dependencies.
What it extracts
| Source | Data | Browser file | |--------|------|-------------| | Web Data | Autofill fields, addresses, credit cards | Web Data SQLite | | Login Data | Saved accounts, emails, usernames | Login Data SQLite | | History | Top tools/services by visit count | History SQLite | | Bookmarks | Bookmarked domains and services | Bookmarks JSON |
Supported browsers: Arc, Chrome, Brave, Edge.
Install
Swift Package Manager
dependencies: [
.package(url: "https://github.com/m13v/ai-browser-profile-swift-light.git", from: "0.1.0")
]Then add "BrowserProfileLight" to your target's dependencies.
Usage
Library
import BrowserProfileLight
// Extract from all detected browsers
let extractor = AutofillExtractor()
let profile = extractor.extractAll()
// Store in SQLite database (compatible with ai-browser-profile Python DB)
let db = try ProfileDatabase()
db.ingestProfile(profile)
// Generate formatted profile text
print(db.profileText())
// Search
let results = db.textSearch(query: "email")
let tagged = db.search(tags: ["identity", "payment"])CLI
swift run browser-profile-cli # print extracted profile
swift run browser-profile-cli --json # JSON output
swift run browser-profile-cli --db # extract and store in ~/ai-browser-profile/memories.db
swift run browser-profile-cli --profile # print profile from existing DB
swift run browser-profile-cli --search "email" # search existing DB
swift run browser-profile-cli --tags identity # search by tags
swift run browser-profile-cli --browsers arc chrome # filter browsersRequirements
- macOS 13+
- Swift 5.9+
- Full Disk Access (to read browser SQLite files)
Package Metadata
Repository: m13v/ai-browser-profile-swift-light
Default branch: main
README: README.md