Skip to content

Conversation

@toyamagu-2021
Copy link
Contributor

@toyamagu-2021 toyamagu-2021 commented Jun 7, 2025

Signed-off-by: toyamagu2021 [email protected]

Closes #2814

Motivation

  • add recipe list

Verification

recipe list

 ./target/debug/goose recipe list              
github.com
  ✓ Logged in to github.com account toyamagu-2021 (keyring)
  - Active account: true
  - Git operations protocol: https
  - Token: gho_************************************
  - Token scopes: 'gist', 'read:org', 'repo', 'workflow'
Available recipes:
recipe - Create personalized, creative 404 pages using public profile data - local: ./recipe.yaml
create-pr - create-pr by diff - github: toyamagu-2021/shared-goose-recipe/create-pr
update-pr - update-pr based on current PR - github: toyamagu-2021/shared-goose-recipe/update-pr

recipe list --format json

➜ ./target/debug/goose recipe list --format json
github.com
  ✓ Logged in to github.com account toyamagu-2021 (keyring)
  - Active account: true
  - Git operations protocol: https
  - Token: gho_************************************
  - Token scopes: 'gist', 'read:org', 'repo', 'workflow'
[{"name":"recipe","source":"Local","path":"./recipe.yaml","title":"404Portfolio","description":"Create personalized, creative 404 pages using public profile data"},{"name":"create-pr","source":"GitHub","path":"toyamagu-2021/shared-goose-recipe/create-pr","title":"Create GitHub Pull Request","description":"create-pr by diff"},{"name":"update-pr","source":"GitHub","path":"toyamagu-2021/shared-goose-recipe/update-pr","title":"Update GitHub Pull Request Title and Description","description":"update-pr based on current PR"}]

recipe list --verbose

➜ ./target/debug/goose recipe list --verbose
github.com
  ✓ Logged in to github.com account toyamagu-2021 (keyring)
  - Active account: true
  - Git operations protocol: https
  - Token: gho_************************************
  - Token scopes: 'gist', 'read:org', 'repo', 'workflow'
Available recipes:
  recipe - Create personalized, creative 404 pages using public profile data - local: ./recipe.yaml
    Title: 404Portfolio
    Path: ./recipe.yaml
  temp - Create personalized, creative 404 pages using public profile data - local: ./temp.yaml
    Title: 404Portfolio
    Path: ./temp.yaml
  test - Create personalized, creative 404 pages using public profile data - local: recipes/test/test.yaml
    Title: 404Portfolio
    Path: recipes/test/test.yaml
  create-pr - create-pr by diff - github: toyamagu-2021/shared-goose-recipe/create-pr
    Title: Create GitHub Pull Request
    Path: toyamagu-2021/shared-goose-recipe/create-pr
  update-pr - update-pr based on current PR - github: toyamagu-2021/shared-goose-recipe/update-pr
    Title: Update GitHub Pull Request Title and Description
    Path: toyamagu-2021/shared-goose-recipe/update-pr

@toyamagu-2021 toyamagu-2021 marked this pull request as ready for review June 7, 2025 18:08
@toyamagu-2021 toyamagu-2021 changed the title feat: recipe-list feat: recipe-list (#2814) Jun 7, 2025
@toyamagu-2021 toyamagu-2021 changed the title feat: recipe-list (#2814) feat: recipe list (#2814) Jun 7, 2025
Signed-off-by: toyamagu2021 <[email protected]>
let output = Command::new("gh")
.args(["api", &format!("repos/{}/contents", repo)])
.output()
.map_err(|e| anyhow!("Failed to execute gh api command: {}", e))?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we include a more descriptive message explaining that the command relies on gh being installed and configured for auth?

I also wonder if we could interact with the API instead, and just have the user progress through an oauth flow?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we should just skip here and show the user the recipes that are accessible

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in some cases goose will then offer to install it for you if the error is returned in an interactive way (eg if an MCP fails), wonder if can do similar here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the error message easier to understand.

Since ensure_gh_authenticated is executed beforehand, the login workflow will appear if you are not logged in, as shown below. You can authenticate within this workflow as follows:

➜  goose git:(feat/recipe-list) ./target/release/goose recipe list
You are not logged into any GitHub hosts. To log in, run: gh auth login
GitHub CLI is not authenticated. Launching `gh auth login`...
? Where do you use GitHub? GitHub.com
? How would you like to authenticate GitHub CLI? Login with a web browser

Signed-off-by: toyamagu-2021 <[email protected]>
@DOsinga DOsinga self-assigned this Jul 7, 2025
@DOsinga DOsinga merged commit 70f41d1 into block:main Jul 15, 2025
6 checks passed
zanesq added a commit that referenced this pull request Jul 15, 2025
* 'main' of github.com:block/goose:
  fix: Set include_usage=true for OpenAI streaming (#3441)
  feat: `recipe list` (#2814) (#2815)
  docs: update github mcp config (#3433)
  feat: Implement streaming for OpenAI (#3413)
  fix: improve extension startup error messages with command details (#2694)
  [feat]: improve file search tools to add globsearch / grep tools (#3368)
  docs: typo in guide description (#3429)
  fix: use safe_truncate to truncate charactor (#3263) (#3264)
  fix: convert invalid recipe variable name to raw content (#3420)
  center goose mobile screenshot (#3418)
  docs: model context limit overrides (#3377)
  docs: Subagents (#3402)
  fix: avoid pass encoded empty string to goose run --recipe (#3361)
  ux: alphabetize extensions (#3416)
  fix: message concatenation in server session management (#3412)
  refactor: streamline memory directory management (#3345)
  feat: Add AZURE_OPENAI_API_KEY as a visible config parameter (#3265)
  feat: stream LLM responses (#2677)

# Conflicts:
#	crates/goose/src/session/storage.rs
#	ui/desktop/src/components/ChatView.tsx
#	ui/desktop/src/components/settings/extensions/subcomponents/ExtensionList.tsx
lifeizhou-ap added a commit that referenced this pull request Jul 16, 2025
* main: (54 commits)
  UI update with sidebar and settings tabs (#3288)
  docs: add CLIStreamExtensionInstructions component (#3443)
  chore(release): release version 1.0.36 (#3436)
  [goose-llm] fix image content bug, add optional request_id field (#3439)
  fix: Set include_usage=true for OpenAI streaming (#3441)
  feat: `recipe list` (#2814) (#2815)
  docs: update github mcp config (#3433)
  feat: Implement streaming for OpenAI (#3413)
  fix: improve extension startup error messages with command details (#2694)
  [feat]: improve file search tools to add globsearch / grep tools (#3368)
  docs: typo in guide description (#3429)
  fix: use safe_truncate to truncate charactor (#3263) (#3264)
  fix: convert invalid recipe variable name to raw content (#3420)
  center goose mobile screenshot (#3418)
  docs: model context limit overrides (#3377)
  docs: Subagents (#3402)
  fix: avoid pass encoded empty string to goose run --recipe (#3361)
  ux: alphabetize extensions (#3416)
  fix: message concatenation in server session management (#3412)
  refactor: streamline memory directory management (#3345)
  ...
lifeizhou-ap added a commit that referenced this pull request Jul 16, 2025
* main:
  UI update with sidebar and settings tabs (#3288)
  docs: add CLIStreamExtensionInstructions component (#3443)
  chore(release): release version 1.0.36 (#3436)
  [goose-llm] fix image content bug, add optional request_id field (#3439)
  fix: Set include_usage=true for OpenAI streaming (#3441)
  feat: `recipe list` (#2814) (#2815)
  docs: update github mcp config (#3433)
  feat: Implement streaming for OpenAI (#3413)
  fix: improve extension startup error messages with command details (#2694)
  [feat]: improve file search tools to add globsearch / grep tools (#3368)
  docs: typo in guide description (#3429)
  fix: use safe_truncate to truncate charactor (#3263) (#3264)
s-soroosh pushed a commit to s-soroosh/goose that referenced this pull request Jul 18, 2025
Signed-off-by: toyamagu2021 <[email protected]>
Signed-off-by: toyamagu-2021 <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Soroosh <[email protected]>
kwsantiago pushed a commit to kwsantiago/goose that referenced this pull request Jul 19, 2025
Signed-off-by: toyamagu2021 <[email protected]>
Signed-off-by: toyamagu-2021 <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Kyle Santiago <[email protected]>
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
Signed-off-by: toyamagu2021 <[email protected]>
Signed-off-by: toyamagu-2021 <[email protected]>
Signed-off-by: [email protected] <[email protected]>
atarantino pushed a commit to atarantino/goose that referenced this pull request Aug 5, 2025
Signed-off-by: toyamagu2021 <[email protected]>
Signed-off-by: toyamagu-2021 <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Adam Tarantino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add goose recipe list

4 participants