DocsReference
Registry & CLI
Publish memory as packages other people can install, and keep encrypted backups of your own — all from the memorylayer CLI.
Sign in
If you saved your key during the Quickstart, you're already signed in. The key lives in ~/.memorylayer/auth.json — outside your projects; never commit it. In CI, set MEMORY_API_KEY instead.
memorylayer login --token sk-ml-your-key-here # checks the key, then saves itmemorylayer whoami # key prefix + registrymemorylayer logoutPublish
A package is a versioned snapshot of one namespace. Names are scoped to your username or an org you admin — @you/name. memorylayer init writes the manifest; memorylayer.namespace picks what to export and defaults to the package name.
{"name": "@acme/react-patterns","version": "1.0.0","description": "React component patterns for the Acme design system","keywords": ["react", "components", "design-system"],"private": false,"license": "MIT","memorylayer": { "namespace": "react-patterns" }}memorylayer publishmemorylayer publish --bump patch # 1.0.0 → 1.0.1 (or minor, major)memorylayer publish --tag betamemorylayer publish --access private # only you and collaborators can installmemorylayer publish --dry-runNeed to pull a version back? Email support@memorylayer.in — yanked versions stay visible in infobut can't be installed.
Install
memorylayer add @acme/react-patterns # into a namespace of the same namememorylayer add @acme/react-patterns@1.2.0memorylayer add @acme/react-patterns --namespace my-acmememorylayer add @acme/react-patterns --dry-runEvery download is checked against its SHA-512 hash and aborts on a mismatch. Dependencies install first; memories you already have are skipped, changed ones merged. Private packages use your signed-in key.
Search
memorylayer search "react hooks"memorylayer search --keyword typescriptmemorylayer info @acme/react-patterns # details + version historySync
sync
A private backup
One namespace, encrypted before it leaves your machine. Only you can read it; it never appears in the registry. For moving between machines.
publish
A package for others
Versioned and installable with add. Listed on the registry unless private. For sharing.
memorylayer sync push --namespace work # remote becomes exactly your local copymemorylayer sync pull --namespace work # remote merges in; nothing local is deletedmemorylayer sync status # every backup: count, size, last pushPush replaces the backup completely, so pull first if another machine pushed since. Backups are AES-256-GCM encrypted with a key derived from your API key; pass --key "passphrase"to use your own — and the same one on every push and pull. Signed in on the web? They're listed under Encrypted backups on the registry.
Share
# a link: 7 days by default, prints a ready-to-paste add commandmemorylayer share @acme/internal-kbmemorylayer share @acme/internal-kb --expires 48 --max-uses 5 # a collaborator: installs with their own key, can't publishmemorylayer share @acme/internal-kb --add sk-ml-their-keymemorylayer share @acme/internal-kb --remove sk-ml-their-keymemorylayer share @acme/internal-kb --listOrgs & teams
An org gives a team one scope — @acme/… — without sharing a key. Whoever creates it is admin.
memorylayer org create acme "Acme Inc"memorylayer org add-member acme sk-ml-their-key [--role admin]memorylayer org set-role acme sk-ml-their-key adminmemorylayer org remove-member acme sk-ml-their-keymember
Installs and publishes
Can install and publish packages under @acme/…, public or private.
admin
Also runs the org
Adds and removes members, changes roles, and creates share links for org packages.
Plans
A plan belongs to an API key. Every machine and agent using that key shares its monthly budget; org members each keep their own. One budget for a whole team is Enterprise. Limits per plan are on MCP tools and pricing.
Something missing or wrong? Email support@memorylayer.in or open an issue.