Files
SeedPass/src/seedpass/cli/fingerprint.py
T
google-labs-jules[bot]andPR0M3TH3AN 8e33f9c5e1 Fix formatting, linting, and logic errors from codebase scan
- Apply black formatting to 17 files.
- Fix F821 undefined name errors in:
  - src/main.py: Add missing `queue` import.
  - src/seedpass/core/encryption.py: Fix `JSONDecodeError` reference.
  - src/utils/__init__.py: Fix exception variable scope in fallback code.
  - src/utils/key_derivation.py: Add `TYPE_CHECKING` imports.
  - src/seedpass/core/config_manager.py: Add `TYPE_CHECKING` imports.
- Initialize torch environment and TODO file.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 18:09:48 +00:00

40 lines
1.2 KiB
Python

from __future__ import annotations
import typer
from .common import _get_services, ProfileRemoveRequest, ProfileSwitchRequest
app = typer.Typer(help="Manage seed profiles")
@app.command("list")
def fingerprint_list(ctx: typer.Context) -> None:
"""List available seed profiles."""
_vault, profile_service, _sync = _get_services(ctx)
for fp in profile_service.list_profiles():
typer.echo(fp)
@app.command("add")
def fingerprint_add(ctx: typer.Context) -> None:
"""Create a new seed profile."""
_vault, profile_service, _sync = _get_services(ctx)
profile_service.add_profile()
@app.command("remove")
def fingerprint_remove(ctx: typer.Context, fingerprint: str) -> None:
"""Remove a seed profile."""
_vault, profile_service, _sync = _get_services(ctx)
profile_service.remove_profile(ProfileRemoveRequest(fingerprint=fingerprint))
@app.command("switch")
def fingerprint_switch(ctx: typer.Context, fingerprint: str) -> None:
"""Switch to another seed profile."""
_vault, profile_service, _sync = _get_services(ctx)
password = typer.prompt("Master password", hide_input=True)
profile_service.switch_profile(
ProfileSwitchRequest(fingerprint=fingerprint, password=password)
)