-
Notifications
You must be signed in to change notification settings - Fork 2.3k
docs: session storage migration #5682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,22 +5,9 @@ sidebar_label: CLI Commands | |||||
| toc_max_heading_level: 4 | ||||||
| --- | ||||||
|
|
||||||
| Goose provides a command-line interface (CLI) with several commands for managing sessions, configurations and extensions. This guide covers all available CLI commands and interactive session features. | ||||||
| goose provides a command-line interface (CLI) with several commands for managing sessions, configurations and extensions. This guide covers all available CLI commands and interactive session features. | ||||||
|
|
||||||
| ## Flag Naming Conventions | ||||||
|
|
||||||
| Goose CLI follows consistent patterns for flag naming to make commands intuitive and predictable: | ||||||
|
|
||||||
| - **`--session-id`**: Used for session identifiers (e.g., `20250305_113223`) | ||||||
| - **`--schedule-id`**: Used for schedule job identifiers (e.g., `daily-report`) | ||||||
| - **`-n, --name`**: Used for human-readable names | ||||||
| - **`-p, --path`**: Used for file paths (legacy support) | ||||||
| - **`-o, --output`**: Used for output file paths | ||||||
| - **`-r, --resume` or `-r, --regex`**: Context-dependent (resume for sessions, regex for filters) | ||||||
| - **`-v, --verbose`**: Used for verbose output | ||||||
| - **`-l, --limit`**: Used for limiting result counts | ||||||
| - **`-f, --format`**: Used for specifying output formats | ||||||
| - **`-w, --working-dir`**: Used for working directory filters | ||||||
|
|
||||||
| ### Core Commands | ||||||
|
|
||||||
|
|
@@ -35,7 +22,7 @@ goose --help | |||||
| --- | ||||||
|
|
||||||
| #### configure | ||||||
| Configure Goose settings - providers, extensions, etc. | ||||||
| Configure goose settings - providers, extensions, etc. | ||||||
|
|
||||||
| **Usage:** | ||||||
| ```bash | ||||||
|
|
@@ -45,7 +32,7 @@ goose configure | |||||
| --- | ||||||
|
|
||||||
| #### info [options] | ||||||
| Shows Goose information, including the version, configuration file location, session storage, and logs. | ||||||
| Shows goose information, including the version, configuration file location, session storage, and logs. | ||||||
|
|
||||||
| **Options:** | ||||||
| - **`-v, --verbose`**: Show detailed configuration settings, including environment variables and enabled extensions | ||||||
|
|
@@ -58,7 +45,7 @@ goose info | |||||
| --- | ||||||
|
|
||||||
| #### version | ||||||
| Check the current Goose version you have installed. | ||||||
| Check the current goose version you have installed. | ||||||
|
|
||||||
| **Usage:** | ||||||
| ```bash | ||||||
|
|
@@ -68,11 +55,11 @@ goose --version | |||||
| --- | ||||||
|
|
||||||
| #### update [options] | ||||||
| Update the Goose CLI to a newer version. | ||||||
| Update the goose CLI to a newer version. | ||||||
|
|
||||||
| **Options:** | ||||||
| - **`--canary, -c`**: Update to the canary (development) version instead of the stable version | ||||||
| - **`--reconfigure, -r`**: Forces Goose to reset configuration settings during the update process | ||||||
| - **`--reconfigure, -r`**: Forces goose to reset configuration settings during the update process | ||||||
|
|
||||||
| **Usage:** | ||||||
| ```bash | ||||||
|
|
@@ -90,11 +77,16 @@ goose update --reconfigure | |||||
|
|
||||||
| ### Session Management | ||||||
|
|
||||||
| :::info Session Storage Migration | ||||||
| Starting with version 1.10.0, goose uses a SQLite database (`sessions.db`) instead of individual `.jsonl` files. | ||||||
| Your existing sessions are automatically imported to the database. Legacy `.jsonl` files remain on disk but are no longer managed by goose. | ||||||
| ::: | ||||||
|
|
||||||
| #### session [options] | ||||||
| Start or resume interactive chat sessions. | ||||||
|
|
||||||
| **Basic Options:** | ||||||
| - **`--session-id <session_id>`**: Specify a session by its ID (e.g., '20250921_143022') | ||||||
| - **`--session-id <session_id>`**: Specify a session by its ID (e.g., '20251108_1') | ||||||
| - **`-n, --name <name>`**: Give the session a name | ||||||
| - **`-p, --path <path>`**: Legacy parameter for specifying session by file path | ||||||
| - **`-r, --resume`**: Resume a previous session | ||||||
|
|
@@ -114,8 +106,9 @@ goose session -n my-project | |||||
|
|
||||||
| # Resume a previous session | ||||||
| goose session --resume -n my-project | ||||||
| goose session --resume --session-id 20250620_013617 | ||||||
| goose session --resume -p ./session.jsonl | ||||||
| goose session --resume --session-id 20251108_2 | ||||||
| goose session --resume -p ./session.json # exported session | ||||||
| goose session --resume -p ./session.jsonl # legacy session storage | ||||||
|
|
||||||
| # Start with extensions | ||||||
| goose session --with-extension "npx -y @modelcontextprotocol/server-memory" | ||||||
|
|
@@ -139,23 +132,27 @@ goose session -n my-session --debug --max-turns 25 | |||||
| List all saved sessions. | ||||||
|
|
||||||
| **Options:** | ||||||
| - **`-v, --verbose`**: Include session file paths in the output | ||||||
| - **`-f, --format <format>`**: Specify output format (`text` or `json`). Default is `text` | ||||||
| - **`--ascending`**: Sort sessions by date in ascending order (oldest first) | ||||||
| - **`-p, --working-dir <path>`**: Filter sessions by working directory | ||||||
|
||||||
| - **`-p, --working-dir <path>`**: Filter sessions by working directory | |
| - **`-w, --working-dir <path>`**: Filter sessions by working directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The -w change isn't released yet, per --help
-p, --working_dir <WORKING_DIR>
Filter sessions by working directory
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect short flag. According to the code in crates/goose-cli/src/cli.rs, the session_id argument has long = "session-id" with alias = "id", but no short form. This should be documented as --id <ID> or --session-id <ID> (without the -i short option).
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect short flag. According to the code in crates/goose-cli/src/cli.rs, the session_id argument has long = "session-id" with alias = "id", but no short form. This should be documented as --id <ID> or --session-id <ID> (without the -i short option).
| - **`-i, --id <ID>`**: Export a specific session by ID | |
| - **`--id <ID>`**: Export a specific session by ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i didnt realize this part changes as well. thank you
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if this line could be confusing if you're not familiar with the legacy session storage. is it possible to run path for session for any other situation and do a diff example? or am i misunderstanding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's just for that. goose run --help says "Legacy parameter for backward compatibility. Extracts session ID from
the file path (e.g., '/path/to/20250325_200615.jsonl' -> '20250325_200615')."
I separated out the "Used for legacy file-based session storage" to hopefully make it easier to parse. The note in the Session Management section gives a bit more context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of these are still relevant right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexhancock correct us if we're wrong, but we believe these changes havent been released yet. our docs shouldnt be ahead of any features, so we're temporarily removing them and will restore once released.