def remember_password(ctx, forget, clear_all):
    """
    Manage local password storage.

    Store your YubiKeys password on this computer to avoid having to enter it
    on each use, or delete stored passwords.
    """
    controller = ctx.obj['controller']
    settings = ctx.obj['settings']
    keys = settings.setdefault('keys', {})
    if clear_all:
        del settings['keys']
        settings.write()
        click.echo('All passwords have been cleared.')
    elif forget:
        if controller.id in keys:
            del keys[controller.id]
            settings.write()
        click.echo('Password forgotten.')
    else:
        ensure_validated(ctx, remember=True)
Manage local password storage.

    Store your YubiKeys password on this computer to avoid having to enter it
    on each use, or delete stored passwords.