Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions documentation/docs/guides/goose-cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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)
- **`--format <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
goose session export --name my-session --output session.md
# Interactive export
goose session export

# Export specific session to stdout
goose session export --name my-session
# Export specific session as JSON for backup
goose session export --name my-session --format json --output session-backup.json

# Interactive export (prompts for session selection)
goose session export
# Export specific session as readable markdown
goose session export --name my-session --output session.md

# 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
Expand Down
6 changes: 3 additions & 3 deletions documentation/docs/guides/recipes/session-recipes.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
47 changes: 36 additions & 11 deletions documentation/docs/guides/sessions/session-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -130,7 +130,7 @@ Search allows you to find specific content within sessions or find specific sess
<Tabs groupId="interface">
<TabItem value="ui" label="goose Desktop" default>

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 |
|--------|-------|---------------|
Expand Down Expand Up @@ -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.
Expand All @@ -324,22 +324,47 @@ You can resume a CLI session in Desktop.
</TabItem>
</Tabs>

## Export Sessions
## Import Sessions

<Tabs groupId="interface">
<TabItem value="ui" label="goose Desktop" default>
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.

Export sessions to Markdown to share with your team, create documentation, archive conversations, or review them in a readable format.
1. Click the <PanelLeft className="inline" size={16} /> button in the top-left to open the sidebar
2. Click `History` in the sidebar
3. Click the <Upload className="inline" size={16} /> `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

</TabItem>
<TabItem value="cli" label="goose CLI">
Session import is currently only available through the Desktop app.
</TabItem>
</Tabs>

## Export Sessions

<Tabs groupId="interface">
<TabItem value="ui" label="goose Desktop" default>
Session export is currently only available through the CLI.
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 <PanelLeft className="inline" size={16} /> 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 <Download className="inline" size={16} /> button that appears
6. The session will be downloaded as a `.json` file named after the session description

</TabItem>
<TabItem value="cli" label="goose CLI">
Export sessions using the `export` subcommand:
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).

</TabItem>
</Tabs>