install npm packages via command line and not updating package.json #1524

Closed
opened 2026-02-16 17:31:22 -05:00 by yindo · 2 comments
Owner

Originally created by @luisrudge on GitHub (Aug 28, 2025).

I don't know if this is the model or opencode, but is there a way to guide the model to use a package manager to add packages instead of updating the package.json? if you use a package manager, you always install the latest version.. but by updating the package.json, you usually get old package versions

Image
Originally created by @luisrudge on GitHub (Aug 28, 2025). I don't know if this is the model or opencode, but is there a way to guide the model to use a package manager to add packages instead of updating the package.json? if you use a package manager, you always install the latest version.. but by updating the package.json, you usually get old package versions <img width="1196" height="532" alt="Image" src="https://github.com/user-attachments/assets/b242ed8d-bcf1-4396-b1a9-076aa688a4e2" />
yindo closed this issue 2026-02-16 17:31:22 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 28, 2025):

@luisrudge I would recommend putting in your project or global AGENTS.md something that says:

When installing new packages use install instead of updating package.json directly

^^ you may wanna reword a tad
This really just comes down to prompting tbh

@rekram1-node commented on GitHub (Aug 28, 2025): @luisrudge I would recommend putting in your project or global AGENTS.md something that says: When installing new packages use <package manager> install instead of updating package.json directly ^^ you may wanna reword a tad This really just comes down to prompting tbh
Author
Owner

@luisrudge commented on GitHub (Aug 28, 2025):

sounds good! I was unsure if it was a model thing or opencode thing because sometimes it does use bun add. thanks!

@luisrudge commented on GitHub (Aug 28, 2025): sounds good! I was unsure if it was a model thing or opencode thing because sometimes it does use `bun add`. thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1524