mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
feat(cli): Add --name/-n to session remove and --id/-i alias for session export (#3941)
This commit is contained in:
@@ -99,7 +99,12 @@ enum SessionCommand {
|
||||
},
|
||||
#[command(about = "Remove sessions. Runs interactively if no ID or regex is provided.")]
|
||||
Remove {
|
||||
#[arg(short, long, help = "Session ID to be removed (optional)")]
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
alias = "name",
|
||||
help = "Session ID to be removed (optional)"
|
||||
)]
|
||||
id: Option<String>,
|
||||
#[arg(short, long, help = "Regex for removing matched sessions (optional)")]
|
||||
regex: Option<String>,
|
||||
|
||||
@@ -254,6 +254,7 @@ Remove one or more saved sessions.
|
||||
|
||||
**Options:**
|
||||
- **`-i, --id <id>`**: Remove a specific session by its ID
|
||||
- **`-n, --name <name>`**: Remove a specific session by its name
|
||||
- **`-r, --regex <pattern>`**: Remove sessions matching a regex pattern. For example:
|
||||
|
||||
**Usage:**
|
||||
@@ -262,6 +263,9 @@ Remove one or more saved sessions.
|
||||
# Remove a specific session by ID
|
||||
goose session remove -i 20250305_113223
|
||||
|
||||
# Remove a specific session by its name
|
||||
goose session remove -n my-session
|
||||
|
||||
# Remove all sessions starting with "project-"
|
||||
goose session remove -r "project-.*"
|
||||
|
||||
@@ -280,6 +284,7 @@ Session removal is permanent and cannot be undone. Goose will show which session
|
||||
Export a session to Markdown format for sharing, documentation, or archival purposes.
|
||||
|
||||
**Options:**
|
||||
- **`-i, --id <id>`**: Export a specific session by ID
|
||||
- **`-n, --name <name>`**: Export a specific session by name
|
||||
- **`-p, --path <path>`**: Export a specific session by file path
|
||||
- **`-o, --output <file>`**: Save exported content to a file (default: stdout)
|
||||
|
||||
Reference in New Issue
Block a user