opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Docs don't say you need ripgrep installed, but edit prompt says all opencode users have it installed

Open guysoft opened this issue 2 months ago • 6 comments

Description

Hey, I would add a PR but I am not sure where to PR the docs.

I was trying to understand why opencode kept using rg which is not installed, found this:

  - If you _still_ need to run `grep`, STOP. ALWAYS USE ripgrep at `rg` (or /usr/bin/rg) first, which all opencode users have pre-installed.

In this file: https://github.com/sst/opencode/blob/dev/packages/opencode/src/tool/bash.txt#L25

OpenCode version

dev branch https://github.com/sst/opencode/commit/bdfa213ccf365f23a3efd32de7dab2aeed59fdb3

Steps to reproduce

  1. use open code and make it search for something using the edit tool eg grep for x. or just ask them
Image
  1. See its trying to use rg says it should.

Screenshot and/or share link

No response

Operating System

Ubuntu 25.04

Terminal

Kitty

guysoft avatar Nov 17 '25 18:11 guysoft

This issue might be a duplicate of existing issues. Please check:

  • #4247: RipgrepExtractionFailedError - Similar ripgrep availability issues where OpenCode fails due to ripgrep not being properly installed/accessible

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Nov 17 '25 18:11 github-actions[bot]

We install ripgrep for you if you don't have it installed, but that prompt should prolly be tweaked

rekram1-node avatar Nov 17 '25 18:11 rekram1-node

@rekram1-node This is a windows issue, rg doesn't get installed/work in its current state.

Adding it to my tracker

Hona avatar Nov 17 '25 22:11 Hona

good to know

rekram1-node avatar Nov 17 '25 22:11 rekram1-node

I installed on ubuntu using brew install. So its not only on windows

guysoft avatar Nov 18 '25 20:11 guysoft

We install ripgrep for you if you don't have it installed, but that prompt should prolly be tweaked

Please do not do it. I do not want OpenCode to install any dependencies by itself. You can declare all dependencies in package managers like Homebrew. I do not want OpenCode to pollute the bin directory with something that OpenCode thinks would be better for the end user or something that needs for OpenCode to operate. I have a package manager that controls all dependencies. I can clearly see all dependencies through this package manager. I will not see dependencies installed by OpenCode. You are not a package manager.

vanyauhalin avatar Dec 08 '25 11:12 vanyauhalin