opencode 0.7.0 --help printing the bun help text #1673

Closed
opened 2026-02-16 17:32:06 -05:00 by yindo · 7 comments
Owner

Originally created by @xhuw on GitHub (Sep 10, 2025).

Originally assigned to: @thdxr on GitHub.

opencode 0.7.0 installed via the install script is giving bad output for --version and --help

❯ which opencode
/home/huw/.opencode/bin/opencode


❯ opencode --version
1.2.21


❯ opencode run --agent buildcheap run hello
|  List     home/huw
|  async-bash_spawn  {"command":"hello"}
|  async-bash_poll  {"process_id":1,"wait":1000}
|  Write    home/huw/hello
|  async-bash_spawn  {"command":"chmod +x hello"}
|  async-bash_poll  {"process_id":2,"wait":1000}
|  async-bash_spawn  {"command":"./hello"}
|  async-bash_poll  {"process_id":3,"wait":1000}

Hello, World!



❯ opencode --help
Bun is a fast JavaScript runtime, package manager, bundler, and test runner. (1.2.21+7c45ed97d)

Usage: bun <command> [...flags] [...args]

Commands:
  run       ./my-script.ts       Execute a file with Bun
            lint                 Run a package.json script
  test                           Run unit tests with Bun
  x         bun-repl             Execute a package binary (CLI), installing if needed (bunx)
  repl                           Start a REPL session with Bun
  exec                           Run a shell script directly with Bun

  install                        Install dependencies for a package.json (bun i)
  add       lyra                 Add a dependency to package.json (bun a)
  remove    backbone             Remove a dependency from package.json (bun rm)
  update    @remix-run/dev       Update outdated dependencies
  audit                          Check installed packages for vulnerabilities
  outdated                       Display latest versions of outdated dependencies
  link      [<package>]          Register or link a local npm package
  unlink                         Unregister a local npm package
  publish                        Publish a package to the npm registry
  patch <pkg>                    Prepare a package for patching
  pm <subcommand>                Additional package management utilities
  info      @evan/duckdb         Display package metadata from the registry

  build     ./a.ts ./b.jsx       Bundle TypeScript & JavaScript into a single file

  init                           Start an empty Bun project from a built-in template
  create    svelte               Create a new project from a template (bun c)
  upgrade                        Upgrade to latest version of Bun.
  <command> --help               Print help text for command.

Flags:
      --watch                         Automatically restart the process on file change
      --hot                           Enable auto reload in the Bun runtime, test runner, or bundler
      --no-clear-screen               Disable clearing the terminal screen on reload when --hot or --watch is enabled
      --smol                          Use less memory, but run garbage collection more often
  -r, --preload=<val>                 Import a module before other modules are loaded
      --require=<val>                 Alias of --preload, for Node.js compatibility
      --import=<val>                  Alias of --preload, for Node.js compatibility
      --inspect=<val>                 Activate Bun's debugger
      --inspect-wait=<val>            Activate Bun's debugger, wait for a connection before executing
      --inspect-brk=<val>             Activate Bun's debugger, set breakpoint on first line of code and wait
      --if-present                    Exit without an error if the entrypoint does not exist
      --no-install                    Disable auto install in the Bun runtime
      --install=<val>                 Configure auto-install behavior. One of "auto" (default, auto-installs when no node_modules), "fallback" (missing packages only), "force" (always).
  -i                                  Auto-install dependencies during execution. Equivalent to --install=fallback.
  -e, --eval=<val>                    Evaluate argument as a script
  -p, --print=<val>                   Evaluate argument as a script and print the result
      --prefer-offline                Skip staleness checks for packages in the Bun runtime and resolve from disk
      --prefer-latest                 Use the latest matching versions of packages in the Bun runtime, always checking npm
      --port=<val>                    Set the default port for Bun.serve
      --conditions=<val>              Pass custom conditions to resolve
      --fetch-preconnect=<val>        Preconnect to a URL while code is loading
      --max-http-header-size=<val>    Set the maximum size of HTTP headers in bytes. Default is 16KiB
      --dns-result-order=<val>        Set the default order of DNS lookup results. Valid orders: verbatim (default), ipv4first, ipv6first
      --expose-gc                     Expose gc() on the global object. Has no effect on Bun.gc().
      --no-deprecation                Suppress all reporting of the custom deprecation.
      --throw-deprecation             Determine whether or not deprecation warnings result in errors.
      --title=<val>                   Set the process title
[...]
Originally created by @xhuw on GitHub (Sep 10, 2025). Originally assigned to: @thdxr on GitHub. opencode 0.7.0 installed via the install script is giving bad output for `--version` and `--help` ``` ❯ which opencode /home/huw/.opencode/bin/opencode ❯ opencode --version 1.2.21 ❯ opencode run --agent buildcheap run hello | List home/huw | async-bash_spawn {"command":"hello"} | async-bash_poll {"process_id":1,"wait":1000} | Write home/huw/hello | async-bash_spawn {"command":"chmod +x hello"} | async-bash_poll {"process_id":2,"wait":1000} | async-bash_spawn {"command":"./hello"} | async-bash_poll {"process_id":3,"wait":1000} Hello, World! ❯ opencode --help Bun is a fast JavaScript runtime, package manager, bundler, and test runner. (1.2.21+7c45ed97d) Usage: bun <command> [...flags] [...args] Commands: run ./my-script.ts Execute a file with Bun lint Run a package.json script test Run unit tests with Bun x bun-repl Execute a package binary (CLI), installing if needed (bunx) repl Start a REPL session with Bun exec Run a shell script directly with Bun install Install dependencies for a package.json (bun i) add lyra Add a dependency to package.json (bun a) remove backbone Remove a dependency from package.json (bun rm) update @remix-run/dev Update outdated dependencies audit Check installed packages for vulnerabilities outdated Display latest versions of outdated dependencies link [<package>] Register or link a local npm package unlink Unregister a local npm package publish Publish a package to the npm registry patch <pkg> Prepare a package for patching pm <subcommand> Additional package management utilities info @evan/duckdb Display package metadata from the registry build ./a.ts ./b.jsx Bundle TypeScript & JavaScript into a single file init Start an empty Bun project from a built-in template create svelte Create a new project from a template (bun c) upgrade Upgrade to latest version of Bun. <command> --help Print help text for command. Flags: --watch Automatically restart the process on file change --hot Enable auto reload in the Bun runtime, test runner, or bundler --no-clear-screen Disable clearing the terminal screen on reload when --hot or --watch is enabled --smol Use less memory, but run garbage collection more often -r, --preload=<val> Import a module before other modules are loaded --require=<val> Alias of --preload, for Node.js compatibility --import=<val> Alias of --preload, for Node.js compatibility --inspect=<val> Activate Bun's debugger --inspect-wait=<val> Activate Bun's debugger, wait for a connection before executing --inspect-brk=<val> Activate Bun's debugger, set breakpoint on first line of code and wait --if-present Exit without an error if the entrypoint does not exist --no-install Disable auto install in the Bun runtime --install=<val> Configure auto-install behavior. One of "auto" (default, auto-installs when no node_modules), "fallback" (missing packages only), "force" (always). -i Auto-install dependencies during execution. Equivalent to --install=fallback. -e, --eval=<val> Evaluate argument as a script -p, --print=<val> Evaluate argument as a script and print the result --prefer-offline Skip staleness checks for packages in the Bun runtime and resolve from disk --prefer-latest Use the latest matching versions of packages in the Bun runtime, always checking npm --port=<val> Set the default port for Bun.serve --conditions=<val> Pass custom conditions to resolve --fetch-preconnect=<val> Preconnect to a URL while code is loading --max-http-header-size=<val> Set the maximum size of HTTP headers in bytes. Default is 16KiB --dns-result-order=<val> Set the default order of DNS lookup results. Valid orders: verbatim (default), ipv4first, ipv6first --expose-gc Expose gc() on the global object. Has no effect on Bun.gc(). --no-deprecation Suppress all reporting of the custom deprecation. --throw-deprecation Determine whether or not deprecation warnings result in errors. --title=<val> Set the process title [...] ```
yindo closed this issue 2026-02-16 17:32:06 -05:00
Author
Owner

@tamirzb commented on GitHub (Sep 10, 2025):

It seems like in general there are different cases where bun is executed instead of opencode, ruining more functionality.

For example opencode -m opencode/grok-code to run opencode with a specific model gives a bun error message that -m is an invalid argument.

@tamirzb commented on GitHub (Sep 10, 2025): It seems like in general there are different cases where bun is executed instead of opencode, ruining more functionality. For example `opencode -m opencode/grok-code` to run opencode with a specific model gives a bun error message that `-m` is an invalid argument.
Author
Owner

@peterszarvas94 commented on GitHub (Sep 10, 2025):

Same, and it doesn't even start for me. Run opencode and it just hangs.

@peterszarvas94 commented on GitHub (Sep 10, 2025): Same, and it doesn't even start for me. Run `opencode` and it just hangs.
Author
Owner

@rekram1-node commented on GitHub (Sep 10, 2025):

fixed on latest

@rekram1-node commented on GitHub (Sep 10, 2025): fixed on latest
Author
Owner

@jflaflamme commented on GitHub (Sep 17, 2025):

Not fixed, see #2643

@jflaflamme commented on GitHub (Sep 17, 2025): Not fixed, see #2643
Author
Owner

@rekram1-node commented on GitHub (Sep 17, 2025):

well it was fixed lol

maybe broke again ill take a look

@rekram1-node commented on GitHub (Sep 17, 2025): well it was fixed lol maybe broke again ill take a look
Author
Owner

@rekram1-node commented on GitHub (Sep 17, 2025):

Yeah this still works for me, what OS ar eyou @jflaflamme

@rekram1-node commented on GitHub (Sep 17, 2025): Yeah this still works for me, what OS ar eyou @jflaflamme
Author
Owner

@jflaflamme commented on GitHub (Sep 21, 2025):

Ubuntu 24.04, works with the recent releases. Can't replicate.

@jflaflamme commented on GitHub (Sep 21, 2025): Ubuntu 24.04, works with the recent releases. Can't replicate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1673