feat(cli): add mem0 whoami + mem0 agent-rush subcommands (#5199)

This commit is contained in:
Mragank Shekhar
2026-05-20 19:05:12 +05:30
committed by GitHub
parent 74d043731b
commit edd1b3e2f2
14 changed files with 615 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
/**
* `mem0 whoami` — print the active agent's default_user_id (AGENTRUSH identifier).
* Reads from local config; no network call.
*/
import { colors, printError, printInfo } from "../branding.js";
import { loadConfig } from "../config.js";
export async function cmdWhoami(): Promise<void> {
const config = loadConfig();
const sessionId = config.platform?.defaultUserId;
if (!sessionId) {
printError("No default_user_id found. Run `mem0 init --agent` first.");
process.exit(1);
}
console.log(`Your AGENTRUSH identifier: ${colors.brand(sessionId)}`);
printInfo("Find your row at https://mem0.ai/agentrush");
}