fix(cli): fix critical crashes, improve error messages, UX and validation in Node.js and Python SDKs#4636
Merged
whysosaket merged 2 commits intomem0ai:mainfrom Mar 31, 2026
Merged
Conversation
kartik-mem0
approved these changes
Mar 31, 2026
chaithanyak42
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MODULE_NOT_FOUNDcrash affectingstatus,import, and all commands when installed globally; improves API error messages, adds full UUID display in tables, score column in search, short config key aliases, client-side input validation, and several UX fixesNode.js Changes (
cli/node)Critical
status/import/all-command crash (Cannot find module '../../package.json') — replaced runtimecreateRequire+ relative path loading with build-time__CLI_VERSION__injection via newtsup.config.tsHigh
body.detail ?? body.message ?? JSON.stringify(body)) instead of bare "Bad Request"Medium
mem0 get <id>fail)config get api_keynow works — added short-form key aliases (api_key,user_id, etc.)printInfo/printScopemoved to stderr (was stdout, could contaminate JSON piping)--expires(format + future date),--page-size(≥1),--page(≥1),--top-k(≥1),--threshold(0–1), empty contentLow
cat (+N)in table instead of first category only-o quietforlist/searchnow silently exitsmem0 versionregistered as a proper subcommandlist -o jsonnow returns a pagination envelope (status,command,count,scope,data) instead of a bare arrayPython Changes (
cli/python)High
cmd_addwas callingprint_error()explicitly AND settingts.error_msg, causingtimed_statusto print a second time with timing suffixMedium
config get api_keyshort-form aliases addeddelete --all --project --dry-runnow includes a note about count--expires,--page-size,--page,--top-k,--threshold, empty search queryLow
cat (+N)display-o quietforlist/searchexits silentlymem0 versionregistered as a subcommandlist -o jsonreturns pagination envelopeNot Fixed (API-side)
--graph400 (plan-gated feature)delete --entity405 for agent/app/run (API endpoint limitation)listcount difference vs dashboard (v2 API filtering difference)--categoriesoverridden by API auto-categorization--filterundocumented formatTest plan
npm run build)pytest— 118/118)mem0 statusno longer crashesmem0 importno longer crashesmem0 get <uuid>worksconfig get api_keyreturns valuemem0 versionworks as subcommand🤖 Generated with Claude Code