Skip to content

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

Closed

Description

@xhuw

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
[...]

Activity

  1. tamirzb commented on Sep 10, 2025

    @tamirzb

    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.

  2. peterszarvas94 commented on Sep 10, 2025

    @peterszarvas94

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

  3. rekram1-node commented on Sep 10, 2025

    @rekram1-node
    Contributor

    fixed on latest

  4. jflaflamme commented on Sep 17, 2025

    @jflaflamme

    Not fixed, see #2643

  5. rekram1-node commented on Sep 17, 2025

    @rekram1-node
    Contributor

    well it was fixed lol

    maybe broke again ill take a look

  6. rekram1-node commented on Sep 17, 2025

    @rekram1-node
    Contributor

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

  7. jflaflamme commented on Sep 22, 2025

    @jflaflamme

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

  8. stronger-jian commented on Mar 26, 2026

    @stronger-jian

    how solve it .I want put opencode into jupyter/minimal-notebook:latest.always like this ,help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions