diff --git a/documentation/docs/guides/goose-cli-commands.md b/documentation/docs/guides/goose-cli-commands.md index f61df86ce9..c04d0fd70d 100644 --- a/documentation/docs/guides/goose-cli-commands.md +++ b/documentation/docs/guides/goose-cli-commands.md @@ -172,24 +172,34 @@ Session removal is permanent and cannot be undone. Goose will show which session --- #### session export [options] -Export a session to Markdown format for sharing, documentation, or archival purposes. +Export sessions in different formats for backup, sharing, migration, or documentation purposes. **Options:** - **`-i, --id `**: Export a specific session by ID - **`-n, --name `**: Export a specific session by name - **`-p, --path `**: Export a specific session by file path - **`-o, --output `**: Save exported content to a file (default: stdout) +- **`--format `**: Output format: `markdown`, `json`, `yaml`. Default is `markdown` + +**Export Formats:** +- **`json`**: Complete session backup preserving all data including conversation history, metadata, and settings +- **`yaml`**: Complete session backup in YAML format +- **`markdown`**: Default format that creates a formatted, readable version of the conversation for documentation and sharing **Usage:** ```bash -# Export specific session to file +# Interactive export +goose session export + +# Export specific session as JSON for backup +goose session export --name my-session --format json --output session-backup.json + +# Export specific session as readable markdown goose session export --name my-session --output session.md -# Export specific session to stdout -goose session export --name my-session - -# Interactive export (prompts for session selection) -goose session export +# Export to stdout in different formats +goose session export --id 20250305_113223 --format json +goose session export --name my-session --format yaml # Export session by path goose session export --path ./my-session.jsonl --output exported.md diff --git a/documentation/docs/guides/recipes/session-recipes.md b/documentation/docs/guides/recipes/session-recipes.md index 41dcfeebb9..46b56ca38b 100644 --- a/documentation/docs/guides/recipes/session-recipes.md +++ b/documentation/docs/guides/recipes/session-recipes.md @@ -1,16 +1,16 @@ --- sidebar_position: 1 title: Shareable Recipes -description: "Share a Goose session setup (including tools, goals, and instructions) as a reusable recipe that others can launch with a single click" +description: "Share a goose session setup (including tools, goals, and instructions) as a reusable recipe that others can launch with a single click" --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { PanelLeft, Bot } from 'lucide-react'; -Sometimes you finish a task in Goose and realize, "Hey, this setup could be useful again." Maybe you have curated a great combination of tools, defined a clear goal, and want to preserve that flow. Or maybe you're trying to help someone else replicate what you just did without walking them through it step by step. +Sometimes you finish a task in goose and realize, "Hey, this setup could be useful again." Maybe you have curated a great combination of tools, defined a clear goal, and want to preserve that flow. Or maybe you're trying to help someone else replicate what you just did without walking them through it step by step. -You can turn your current Goose session into a reusable recipe that includes the tools, goals, and setup you're using right now and package it into a new Agent that others (or future you) can launch with a single click. +You can turn your current goose session into a reusable recipe that includes the tools, goals, and setup you're using right now and package it into a new Agent that others (or future you) can launch with a single click. ## Create Recipe diff --git a/documentation/docs/guides/sessions/session-management.md b/documentation/docs/guides/sessions/session-management.md index 021e46c745..a2bd8cffea 100644 --- a/documentation/docs/guides/sessions/session-management.md +++ b/documentation/docs/guides/sessions/session-management.md @@ -5,10 +5,10 @@ sidebar_label: Session Management --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import { AppWindow, PanelLeft, FolderDot, Paperclip, Copy, Edit2, Trash2 } from 'lucide-react'; +import { AppWindow, PanelLeft, FolderDot, Paperclip, Copy, Edit2, Trash2, Download, Upload } from 'lucide-react'; -A session is a single, continuous interaction between you and Goose, providing a space to ask questions and prompt action. This guide covers how to manage the session lifecycle. +A session is a single, continuous interaction between you and goose, providing a space to ask questions and prompt action. This guide covers how to manage the session lifecycle. ## Start Session @@ -130,7 +130,7 @@ Search allows you to find specific content within sessions or find specific sess - You can use keyboard shortcuts and search bar buttons to search sessions in Goose Desktop. + You can use keyboard shortcuts and search bar buttons to search sessions in goose Desktop. | Action | macOS | Windows/Linux | |--------|-------|---------------| @@ -314,7 +314,7 @@ You can resume a CLI session in Desktop. 6. Confirm the deletion in the modal that appears :::warning Permanent deletion - Deleting a session from Goose Desktop will also delete it from the CLI. This action cannot be undone. + Deleting a session from goose Desktop will also delete it from the CLI. This action cannot be undone. ::: The session will be immediately removed from your session history and the underlying session file will be deleted from your local storage. @@ -324,22 +324,47 @@ You can resume a CLI session in Desktop. -## Export Sessions - -Export sessions to Markdown to share with your team, create documentation, archive conversations, or review them in a readable format. +## Import Sessions - Session export is currently only available through the CLI. + Import complete sessions from JSON files to restore, share, or migrate sessions between goose instances. Importing creates a new session with a new ID rather than overwriting existing sessions. + + 1. Click the button in the top-left to open the sidebar + 2. Click `History` in the sidebar + 3. Click the `Import Session` button in the top-right corner + 4. Select a `.json` session file that was previously exported from goose + 5. The session will be imported with a new session ID + 6. A success notification will confirm the import + - Export sessions using the `export` subcommand: + Session import is currently only available through the Desktop app. + + +## Export Sessions + + + + Export complete sessions as JSON files for backup, sharing, migration, or archival. Exported files preserve all session data including conversation history, metadata, and settings. + + 1. Click the button in the top-left to open the sidebar + 2. Click `History` in the sidebar + 3. Find the session you want to export + 4. Hover over the session card to reveal the action buttons + 5. Click the button that appears + 6. The session will be downloaded as a `.json` file named after the session description + + + + Export sessions for backup, sharing, migration, or documentation purposes. You can export as JSON files to preserve complete session data including conversation history, metadata, and settings, or as Markdown files to get a formatted, readable version of the conversation. + + From your terminal, run the [`session export`](/docs/guides/goose-cli-commands#session-export-options) subcommand: + ```bash - # Interactive export - prompts you to select a session goose session export ``` - - For more details on export options, available flags, and output formats, see the [CLI commands documentation](/docs/guides/goose-cli-commands#session-export-options). + \ No newline at end of file