DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to install OpenCode into a chosen directory on a shared machine with Opencode

Use the install script with OPENCODE_INSTALL_DIR to place the binary where you want it.

Short answer: Review the install script at Opencode.ai/v2/install before running it; then run OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash (replace the path with your own directory); make sure the directory is on your PATH, then confirm the install location. All steps.

Remote script. This pipes a script from Opencode.ai straight into bash, so read the script first and only run it on machines where you accept that code.

Who it is forA systems administrator or developer setting up OpenCode on a shared Linux or macOS machine where the install location must be controlled.

The problemThe default install path may not match where a team keeps shared tools, so the binary needs to go somewhere specific.

The outcomeThe Opencode binary installed in your chosen directory and ready to run from the command line.

What you need first

  • A terminal on macOS, Linux, or Windows, or the desktop app installer for your platform
  • One package manager available: npm, bun, pnpm, yarn, or brew
  • A local project folder you want the agent to work in
  • Configuration for OpenCode as described in the docs at opencode.ai/docs (the README only links to them)

Steps

  1. Review the install script at Opencode.ai/v2/install before running it.
  2. Run OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash (replace the path with your own directory).
  3. Make sure the directory is on your PATH, then confirm the install location.
  4. Run opencode from a new terminal to confirm it starts. (inferred, check the README)

Prompt for your agent

Install OpenCode from the anomalyco/opencode install script into <install-directory> by setting OPENCODE_INSTALL_DIR. Expected output: an opencode binary in that directory. Verify with the install directory check you choose, and confirm that no earlier install takes precedence on the PATH.

Caveat. The README lists the install directory priority order, but it does not say what the script changes beyond placing the binary, so check the script before running it.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for anomalyco/opencode and "Install OpenCode into a chosen directory on a shared machine"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer