Skip to content

COG-6341 feat: Add --memory-only flag to cognee-cli forget - #4697

Open
goran-radonic wants to merge 1 commit into
devfrom
feature/cog-6341-add-memory-only-flag-to-cognee-cli-forget-local-api-url
Open

COG-6341 feat: Add --memory-only flag to cognee-cli forget#4697
goran-radonic wants to merge 1 commit into
devfrom
feature/cog-6341-add-memory-only-flag-to-cognee-cli-forget-local-api-url

Conversation

@goran-radonic

Copy link
Copy Markdown
Contributor

Description

Added --memory-only to cognee-cli forget, was missing even though the SDK already supports it (both locally and through --api-url). Also fixed --dataset getting silently dropped in --api-url mode (wrong arg name) and made --everything --memory-only error instead of just doing a full wipe.

Acceptance Criteria

  • --memory-only reaches forget() locally and via --api-url
  • --dataset works again in --api-url mode
  • --everything --memory-only errors instead of wiping everything

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Bug fix (non-breaking change that fixes an issue)

Screenshots

CLI only, no UI. 164 passed.

Pre-submission Checklist

  • All new and existing tests pass
  • I have added tests that prove my fix is effective or that my feature works
  • My code follows the project's coding standards and style guidelines
  • I have tested my changes thoroughly before submitting this PR
  • This PR contains minimal changes necessary to address the issue/feature
  • I have searched existing PRs to ensure this change hasn't been submitted already
  • I have linked any relevant issues in the description
  • My commits have clear and descriptive messages

DCO Affirmation

I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.

cognee.forget() and CogneeApiClient.forget() both accept a memory_only
parameter, but cognee-cli forget never exposed it in either the local
argparse configuration or the --api-url remote-dispatch path, making
memory-only forget entirely unreachable from the CLI. Adds the flag to
both paths.

Also fixes an unrelated bug found in the same function: --api-url
forget dispatch read args.dataset_name, a field the CLI parser never
sets (its flag is --dataset), silently dropping --dataset in that
mode. And adds a guard for --everything --memory-only, which
previously silently ignored --memory-only and did a full destructive
wipe instead (--everything has no confirmation prompt).

Split out of #4694 per reviewer feedback that PR bundled unrelated
concerns; extracted as its own change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant