Skip to content

Commit

Permalink
Merge branch 'main' into lifei/auto-save-sessions
Browse files Browse the repository at this point in the history
* main:
  feat: add shell-completions subcommand (#76)
  chore: update readme! (#96)
  chore: update docs again (#77)
  fix: remove overly general match for long running commands (#87)
  • Loading branch information
lifeizhou-ap committed Sep 25, 2024
2 parents 5ecc326 + 5c52138 commit a008211
Show file tree
Hide file tree
Showing 86 changed files with 765 additions and 496 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy MkDocs

on:
push:
branches:
- main # Trigger deployment on pushes to main
paths:
- 'docs/**'
- 'mkdocs.yml'

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
- name: Build the documentation
run: mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
2 changes: 1 addition & 1 deletion .goosehints
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This is a python CLI app that uses UV. Read CONTRIBUTING.md for information on how to build and test it as needed.
Some key concepts are that it is run as a command line interface, dependes on the "ai-exchange" package, and has the concept of toolkits which are ways that its behavior can be extended. Look in src/goose and tests.
Once the user has UV installed it should be able to be used effectively along with uvx to run tasks as needed
Once the user has UV installed it should be able to be used effectively along with uvx to run tasks as needed
Empty file added .nojekyll
Empty file.
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<p>
<a href="#prerequisites">Prerequisites</a> •
<a href="#evaluations">Evaluations</a> •
<a href="#developing-and-testing">Developing and testing</a> •
<a href="#building-from-source">Building from source</a> •
<a href="#developing-goose-plugins">Developing goose-plugins</a> •
Expand Down Expand Up @@ -37,7 +36,7 @@ Plugins added directly to Goose are subject to rigorous review. This is because

Plugins in `goose-plugins` undergo less detailed reviews and are more modular or experimental. They can prove their value through usage or iteration over time and may be eventually moved over to Goose.

To see how to add a toolkit, see the [toolkits documentation][toolkits].
To see how to add a toolkit, see the [toolkits documentation][adding-toolkit].

### Running tests
```sh
Expand Down Expand Up @@ -123,4 +122,4 @@ This project follows the [Conventional Commits](https://www.conventionalcommits.
[uv]: https://docs.astral.sh/uv/
[ruff]: https://docs.astral.sh/ruff/
[just]: https://github.com/casey/just
[toolkits]: docs/docs/toolkits.md
[adding-toolkit]: https://square.github.io/goose/configuration.html#adding-a-toolkit
284 changes: 113 additions & 171 deletions README.md

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Binary file added docs/assets/goose-in-action.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/goose-in-action.mp4
Binary file not shown.
Binary file added docs/assets/goose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes.
File renamed without changes
85 changes: 43 additions & 42 deletions docs/docs/configuration.md → docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
# Configuring Goose

## Adding a toolkit
To make a toolkit available to Goose, add it to your project's pyproject.toml. For example in the Goose pyproject.toml file:
```
[project.entry-points."goose.toolkit"]
developer = "goose.toolkit.developer:Developer"
github = "goose.toolkit.github:Github"
# Add a line like this - the key becomes the name used in profiles
my-new-toolkit = "goose.toolkit.my_toolkits:MyNewToolkit" # this is the path to the class that implements the toolkit
```

Then to set up a profile that uses it, add something to `~/.config/goose/profiles.yaml`:
```yaml
my-profile:
provider: openai
processor: gpt-4o
accelerator: gpt-4o-mini
moderator: passive
toolkits: # new toolkit gets added here
- developer
- my-new-toolkit
```
And now you can run Goose with this new profile to use the new toolkit!
```sh
goose session start --profile my-profile
```

Or, if you're developing a new toolkit and want to test it:
```sh
uv run goose session start --profile my-profile
```

## Tuning it to your repo

Goose ships with the ability to read in the contents of a file named `.goosehints` from your repo. If you find yourself repeating the same information across sessions to Goose, this file is the right place to add this information.

This file will be read into the Goose system prompt if it is present in the current working directory.

> [!NOTE]
> `.goosehints` follows [jinja templating rules][jinja-guide] in case you want to leverage templating to insert file contents or variables.
## Profiles

If you need to customize goose, one way is via editing: `~/.config/goose/profiles.yaml`.
Expand Down Expand Up @@ -146,3 +104,46 @@ unit-test-gen:
```

[jinja-guide]: https://jinja.palletsprojects.com/en/3.1.x/


## Adding a toolkit
To make a toolkit available to Goose, add it to your project's pyproject.toml. For example in the Goose pyproject.toml file:
```
[project.entry-points."goose.toolkit"]
developer = "goose.toolkit.developer:Developer"
github = "goose.toolkit.github:Github"
# Add a line like this - the key becomes the name used in profiles
my-new-toolkit = "goose.toolkit.my_toolkits:MyNewToolkit" # this is the path to the class that implements the toolkit
```

Then to set up a profile that uses it, add something to `~/.config/goose/profiles.yaml`:
```yaml
my-profile:
provider: openai
processor: gpt-4o
accelerator: gpt-4o-mini
moderator: passive
toolkits: # new toolkit gets added here
- developer
- my-new-toolkit
```

And now you can run Goose with this new profile to use the new toolkit!

```sh
goose session start --profile my-profile
```

Or, if you're developing a new toolkit and want to test it:
```sh
uv run goose session start --profile my-profile
```

## Tuning Goose to your repo

Goose ships with the ability to read in the contents of a file named `.goosehints` from your repo. If you find yourself repeating the same information across sessions to Goose, this file is the right place to add this information.

This file will be read into the Goose system prompt if it is present in the current working directory.

> [!NOTE]
> `.goosehints` follows [jinja templating rules][jinja-guide] in case you want to leverage templating to insert file contents or variables.
1 change: 1 addition & 0 deletions docs/contributing.md
File renamed without changes.
1 change: 0 additions & 1 deletion docs/docs/contributing.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/docs/index.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/docs/providers.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/docs/tips.md

This file was deleted.

Loading

0 comments on commit a008211

Please sign in to comment.