feat: expand data model to password manager comparable#8
Merged
danpasecinic merged 19 commits intomainfrom Jan 28, 2026
Merged
Conversation
Comprehensive design for expanding zault from basic credential store to full password manager with: - 9 item types (login, card, identity, SSH key, etc.) - Hybrid custom fields system - Folders and tags organization - Full-text fuzzy search - Automatic password history - Favorites and recents - Attachments support Based on research of 1Password SDK and Bitwarden data models.
…fiData, LicenseData
- Removed v2 naming, directly replaced serializer.zig - Full serialize/deserialize for all 9 item types - Roundtrip tests passing
- Vault now stores Items instead of Entries - Renamed addEntry/getEntry/deleteEntry to addItem/getItem/deleteItem - Updated error types: EntryNotFound -> ItemNotFound, EntryAlreadyExists -> ItemAlreadyExists - CLI commands updated to work with new 9-type Item system - TOTP is now embedded in LoginData.totp instead of separate entry type - Passkeys are now embedded in LoginData.passkeys instead of separate entry type - List command shows all 9 item types with appropriate info
- Delete entry.zig which had the old 3-type system (password, totp, passkey) - Update main.zig to remove entry import and add item/uuid/serializer to tests - New Item-based system with 9 types is now the only data model
- Add proper errdefer cleanup in all deserialization functions - Secure zero sensitive data (passwords, keys, SSN, etc.) on errors - Fix inconsistent null handling for CardBrand enum (return error instead of silent null) - Bump vault version from 1 to 2 for new item-based format
Avoids confusing vault.items.items pattern by renaming to vault.item_list.items which reads more naturally.
- Add secureZeroAndFree for non-optional sensitive data - Add secureFree for optional sensitive data (zero then free) - Add freeOptional for optional non-sensitive data - Refactor item.zig deinit functions to use new helpers - Refactor serializer.zig errdefer blocks to use new helpers - Reduces code duplication by 76 lines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the CLI command implementation to consistently use the term "item" instead of "entry" throughout the codebase, and updates the logic to support a broader set of item types. The changes affect the add, delete, get, list, passkey, and totp commands, aligning them with a more flexible vault model and improving clarity for users. The most important changes are grouped below.
Terminology and API Updates:
add.zig,delete.zig,get.zig,list.zig,passkey.zig,totp.zig). Vault API calls such asaddEntry,getEntry, anddeleteEntryare nowaddItem,getItem, anddeleteItemrespectively, with error types and messages updated to match. [1] [2] [3] [4] [5] [6]Expanded Item Type Handling:
listandgetcommands now support a wider range of item types (login, card, note, identity, ssh_key, api_credential, database, wifi, license), displaying relevant information for each type. The output formatting and switch logic have been updated to accommodate these changes. [1] [2]Passkey Command Improvements:
TOTP Command Consistency:
User-Facing Message Improvements:
These changes modernize the CLI codebase, improve clarity for users, and prepare the vault for supporting more complex item types.