mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-18 06:34:26 +01:00
Co-authored-by: Michael Neale <michael.neale@gmail.com> Co-authored-by: Wendy Tang <wendytang@squareup.com> Co-authored-by: Jarrod Sibbison <72240382+jsibbison-square@users.noreply.github.com> Co-authored-by: Alex Hancock <alex.hancock@example.com> Co-authored-by: Alex Hancock <alexhancock@block.xyz> Co-authored-by: Lifei Zhou <lifei@squareup.com> Co-authored-by: Wes <141185334+wesrblock@users.noreply.github.com> Co-authored-by: Max Novich <maksymstepanenko1990@gmail.com> Co-authored-by: Zaki Ali <zaki@squareup.com> Co-authored-by: Salman Mohammed <smohammed@squareup.com> Co-authored-by: Kalvin C <kalvinnchau@users.noreply.github.com> Co-authored-by: Alec Thomas <alec@swapoff.org> Co-authored-by: lily-de <119957291+lily-de@users.noreply.github.com> Co-authored-by: kalvinnchau <kalvin@block.xyz> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Rizel Scarlett <rizel@squareup.com> Co-authored-by: bwrage <bwrage@squareup.com> Co-authored-by: Kalvin Chau <kalvin@squareup.com> Co-authored-by: Alice Hau <110418948+ahau-square@users.noreply.github.com> Co-authored-by: Alistair Gray <ajgray@stripe.com> Co-authored-by: Nahiyan Khan <nahiyan.khan@gmail.com> Co-authored-by: Alex Hancock <alexhancock@squareup.com> Co-authored-by: Nahiyan Khan <nahiyan@squareup.com> Co-authored-by: marcelle <1852848+laanak08@users.noreply.github.com> Co-authored-by: Yingjie He <yingjiehe@block.xyz> Co-authored-by: Yingjie He <yingjiehe@squareup.com> Co-authored-by: Lily Delalande <ldelalande@block.xyz> Co-authored-by: Adewale Abati <acekyd01@gmail.com> Co-authored-by: Ebony Louis <ebony774@gmail.com> Co-authored-by: Angie Jones <jones.angie@gmail.com> Co-authored-by: Ebony Louis <55366651+EbonyLouis@users.noreply.github.com>
101 lines
3.7 KiB
Markdown
101 lines
3.7 KiB
Markdown
---
|
||
sidebar_position: 1
|
||
title: Managing Sessions
|
||
---
|
||
import Tabs from '@theme/Tabs';
|
||
import TabItem from '@theme/TabItem';
|
||
|
||
# Managing Goose Sessions
|
||
|
||
A session is a single, continuous interaction between you and Goose, providing a space to ask questions and prompt action. In this guide, we'll cover how to start, exit, save, and resume.
|
||
|
||
|
||
## Starting a Session
|
||
|
||
<Tabs>
|
||
<TabItem value="cli" label="Goose CLI" default>
|
||
From your terminal, navigate to the directory from which you'd like to start, and run:
|
||
```sh
|
||
goose session
|
||
```
|
||
</TabItem>
|
||
<TabItem value="ui" label="Goose UI">
|
||
After choosing an LLM provider, you’ll see the session interface ready for use.
|
||
|
||
Type your questions, tasks, or instructions directly into the input field, and Goose will immediately get to work.
|
||
|
||
</TabItem>
|
||
</Tabs>
|
||
|
||
## Naming a Session
|
||
<Tabs>
|
||
<TabItem value="cli" label="Goose CLI" default>
|
||
By default, Goose will provide a random string as the name of your session. If you'd like to provide a specific name, this is where you'd do so. For example to name your session `react-migration`, you would run:
|
||
|
||
```
|
||
goose session -n react-migration
|
||
```
|
||
|
||
You'll know your session has started when your terminal looks similar to the following:
|
||
|
||
```
|
||
starting session | provider: openai model: gpt-4o
|
||
logging to ~/.config/goose/sessions/react-migration.json1
|
||
```
|
||
</TabItem>
|
||
<TabItem value="ui" label="Goose UI">
|
||
Session management features, such as **naming** and **resuming** sessions, are **not** currently available in the Goose UI. If you'd like to see these features added, please [open an issue on GitHub](https://github.com/block/goose/issues/new?template=Blank+issue) to let us know.
|
||
</TabItem>
|
||
</Tabs>
|
||
:::info
|
||
If this is your first session, Goose will prompt you for an API key to access an LLM (Large Language Model) of your choice. For more information on setting up your API key, see the [Installation Guide](/docs/installation#set-up-a-provider). Here is the list of [supported LLMs](/docs/configuration/providers).
|
||
:::
|
||
|
||
## Exiting a Session
|
||
|
||
<Tabs>
|
||
<TabItem value="cli" label="Goose CLI" default>
|
||
To save and exit a session, hold down `Ctrl` + `C`. Alternatively, you can type `exit` to save and exit the session.
|
||
|
||
Your session will be stored locally in `~/.config/goose/sessions`.
|
||
</TabItem>
|
||
<TabItem value="ui" label="Goose UI">
|
||
To exit a session, simply close the application.
|
||
</TabItem>
|
||
|
||
</Tabs>
|
||
## Resuming a Session
|
||
<Tabs>
|
||
<TabItem value="cli" label="Goose CLI" default>
|
||
To resume your latest session, you can run the following command:
|
||
|
||
```
|
||
goose session -r
|
||
```
|
||
|
||
To resume a specific session, you can first check the sessions you currently have by running:
|
||
|
||
```
|
||
goose session --list
|
||
```
|
||
|
||
This command will display a list of all saved sessions, showing a name, date, and time for each session. The output should look similar to the following:
|
||
|
||
```
|
||
2024-11-12 14:12:28 managing-goose
|
||
2024-11-12. 13:48:11 blog
|
||
2024-11-12 13:27:21 react-migration
|
||
2024-11-04 16:14:29 e6d7
|
||
```
|
||
|
||
To resume a specific session, run the following command:
|
||
|
||
```
|
||
goose session -r -n react-migration
|
||
```
|
||
</TabItem>
|
||
<TabItem value="ui" label="Goose UI">
|
||
Session management features, such as **naming** and **resuming** sessions, are **not** currently available in the Goose UI. If you'd like to see these features added, please [open an issue on GitHub](https://github.com/block/goose/issues/new?template=Blank+issue) to let us know.
|
||
</TabItem>
|
||
</Tabs>
|