Skip to content

Add sudo for global installation command#454

Merged
rohitg00 merged 4 commits into
rohitg00:mainfrom
kedar-1:main
May 20, 2026
Merged

Add sudo for global installation command#454
rohitg00 merged 4 commits into
rohitg00:mainfrom
kedar-1:main

Conversation

@kedar-1
Copy link
Copy Markdown
Contributor

@kedar-1 kedar-1 commented May 17, 2026

Hi,

I tried to install agentmemory globally, but the command threw a missing permissions error. Adding sudo fixes this.

Radek

Summary by CodeRabbit

  • Documentation
    • Improved README installation and Quick Start sections: reformatted global install command blocks for consistency and added a commented retry note suggesting elevated permissions on macOS/Linux to help users overcome permission errors during global installs.

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@kedar-1 is attempting to deploy a commit to the rohitg00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee4f7b4c-79cb-4775-95d4-e6c61cd43845

📥 Commits

Reviewing files that changed from the base of the PR and between e4853d1 and dcef907.

📒 Files selected for processing (1)
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Walkthrough

README updated in two places to reformat the global npm install -g @agentmemory/agentmemory`` command and add commented sudo npm install -g ... retry guidance for macOS/Linux EACCES cases.

Changes

Installation Documentation

Layer / File(s) Summary
Global install snippets update
README.md
Reformatted the global npm install -g @agentmemory/agentmemory lines and added commented `sudo npm install -g `@agentmemory/agentmemory retry notes in the main Install bash block and the Quick Start "Recommended: install globally" block.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • rohitg00/agentmemory#411: Overlaps README Install/Quick Start command snippet edits for global npm install -g @agentmemory/agentmemory``.
  • rohitg00/agentmemory#80: Related README Quick Start/install command updates affecting npm install -g guidance.

Poem

🐰 I nudged the docs with gentle paw,
A tiny sudo to fix install law,
Two snippets patched, aligned just so,
Permissions tamed — the demos go,
Hooray, the README hops and glows!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title refers to adding sudo for global installation, but the raw summary indicates the changes add commented 'retry with sudo' notes rather than directly adding sudo to the command itself. Clarify whether the title should reference 'sudo retry instructions' or 'commented sudo options' instead of 'Add sudo for global installation command', which implies a direct modification.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 75-78: Replace the inconsistent global install advice by
standardizing on "npm install -g `@agentmemory/agentmemory`" (no sudo) wherever
the README shows global install instructions (e.g., the block containing "sudo
npm install -g `@agentmemory/agentmemory`" and the later "Recommended: install
globally" section); add a single conditional note immediately after that command
stating that on some macOS/Linux system Node installs users may need to prefix
with sudo or use a node version manager, rather than leaving sudo hard-coded in
one place and omitted elsewhere.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cac5c574-568a-4c07-ac24-bbc089420da1

📥 Commits

Reviewing files that changed from the base of the PR and between c93c715 and 0a13219.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated
kedar-1 and others added 3 commits May 17, 2026 13:11
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Added installation instructions for macOS/Linux users.
Backticks inside a ```bash fenced block are still copy-pasted literally
by users, and bash interprets them as command substitution. The package
name in the install line had decorative backticks that turn into a shell
syntax error when pasted as-is.
@rohitg00 rohitg00 merged commit f5e67ea into rohitg00:main May 20, 2026
1 of 2 checks passed
@rohitg00
Copy link
Copy Markdown
Owner

Thanks @kedar-1 — sudo hint is a real gap on system Node installs. Pushed a tiny fixup to your branch dropping the backticks around the package name inside the ```bash code fence (bash interprets backticks as command substitution when pasted, even though markdown renders them as literals). Merged.

rohitg00 added a commit that referenced this pull request May 21, 2026
…uard (#588)

Three concerns surfaced when auditing PRs merged since v0.9.21:

1) Graph parser regex from #494 was correct for self-closing tags ONLY
   when they're the only entity in the document. With a self-closing
   entity followed by an explicit-close entity, the greedy `[^>]*` ate
   the trailing `/` of the self-close, the alternation fell through to
   the explicit-close branch, and `[\s\S]*?` ran ahead to the *next*
   `</entity>` — merging two entity declarations into one match and
   silently dropping a node. Switch to lazy `[^>]*?` so the
   self-closing alternation gets first chance. Test from #494 (which
   was failing on main but I didn't notice) now passes.

2) #386 shipped `${AGENTMEMORY_URL}` / `${AGENTMEMORY_SECRET}`
   placeholders in plugin/.mcp.json. Claude Code and Cursor expand
   those at MCP launch time; some hosts pass the literal string
   through. A truthy literal `"${AGENTMEMORY_URL}"` defeats the
   existing `|| DEFAULT_URL` fallback and would have the shim POST to
   `${AGENTMEMORY_URL}/agentmemory/...` (DNS failure). Add a
   defensive guard in src/mcp/rest-proxy.ts that strips any value of
   the form `${...}` so the fallback engages. Mirror in
   src/mcp/standalone.ts's mode-announce log line.

3) CHANGELOG entries for all PRs landed since v0.9.21 (#321, #325,
   #386, #454, #494, #526, #542, #560, #561, #562, #564, #567) plus
   the regex + env-guard hardening here.

Validation:
- npm test → 98 files, 1091 tests pass
- npm pack → 142 files, fresh install clean, iii-sdk@0.11.2 pinned,
  plugin/ shipped with hooks/scripts/skills/opencode/
- New test file covers 8 placeholder cases (unset, empty,
  `${VAR}` literal, mismatched braces, real values with $,
  unclosed `${`, no-braces `$VAR`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants