From 89fc2ae9492a650846cb97441939a512f5dd298a Mon Sep 17 00:00:00 2001 From: Rizel Scarlett Date: Mon, 5 May 2025 19:57:10 -0400 Subject: [PATCH] docs: Removing sessions (#2438) --- .../docs/guides/goose-cli-commands.md | 28 +++++++++++++++++++ .../docs/guides/managing-goose-sessions.md | 4 +++ 2 files changed, 32 insertions(+) diff --git a/documentation/docs/guides/goose-cli-commands.md b/documentation/docs/guides/goose-cli-commands.md index 2b31578bda..581c583c4b 100644 --- a/documentation/docs/guides/goose-cli-commands.md +++ b/documentation/docs/guides/goose-cli-commands.md @@ -139,6 +139,34 @@ goose session list --verbose # List sessions in JSON format goose session list --format json ``` + +--- + +### session remove [options] + +Remove one or more saved sessions. + +**Options:** +- **`-i, --id `**: Remove a specific session by its ID +- **`-r, --regex `**: Remove sessions matching a regex pattern. For example: + +**Usage:** + +```bash +# Remove a specific session by ID +goose session remove -i 20250305_113223 + +# Remove all sessions starting with "project-" +goose session remove -r "project-.*" + +# Remove all sessions containing "migration" +goose session remove -r ".*migration.*" +``` + +:::caution +Session removal is permanent and cannot be undone. Goose will show which sessions will be removed and ask for confirmation before deleting. +::: + --- ### info [options] diff --git a/documentation/docs/guides/managing-goose-sessions.md b/documentation/docs/guides/managing-goose-sessions.md index efdb42ee05..40fcd55e3d 100644 --- a/documentation/docs/guides/managing-goose-sessions.md +++ b/documentation/docs/guides/managing-goose-sessions.md @@ -160,6 +160,10 @@ You can resume a CLI session in Desktop and vice versa. +## Remove Sessions + +You can remove sessions using CLI commands. For detailed instructions on session removal, see the [CLI Commands documentation](/docs/guides/goose-cli-commands#session-remove-options). + ## Search Within Sessions Search allows you to find specific content within your current session. The search functionality is available in both CLI and Desktop interfaces.