CLI Usage
Memoreru CLI
The Memoreru CLI is a command-line tool that syncs Markdown, CSV, and JSON files on your computer with Memoreru. You can write page drafts as files and publish them in one go, or download your Memoreru content to work on locally.
What You Can Do
- push: Upload local files to Memoreru
- pull: Download Memoreru content to your computer
- status / diff: See what you've changed since the last sync, before publishing
- Automatic images: Images referenced from Markdown are uploaded automatically on push
- Safe sync: If several people edit the same table, conflicting edits are detected when you push
Since everything is plain files, you can keep your content under Git version control — a good fit if you want to manage content as file assets.
Requirements
The CLI requires an API key and is available on Light plans and above, including during the Feature Trial period.
Installation
Install with npm, or run it without installing via npx.
# Global install
npm install -g @memoreru-sdk/cli
# Run without installing
npx @memoreru-sdk/cli --helpYou can use the shorthand mem instead of memoreru — both work the same way.
Initial Setup
1. Log in
memoreru loginYour browser opens — sign in with your usual Memoreru account.
2. Create an API key
memoreru keys createOnce you're logged in, this single command generates an API key.
You can also generate one from the app: open the "API Keys" card under Settings > Security, create a key with Read + Write access, and set it as an environment variable.
export MEMORERU_API_KEY=your-api-keyBasic Workflow
Creating new content looks like this:
# 1. Generate a template
memoreru init ./my-page
# 2. Edit the generated files
# 3. Review your changes
memoreru status ./my-page
memoreru diff ./my-page
# 4. Publish to Memoreru
memoreru push ./my-pageTo edit content that already exists in Memoreru, start with pull:
memoreru pull ./my-data # Download
# Edit the files
memoreru push ./my-data # PublishCommands
| Command | Description |
|---|---|
memoreru login | Log in via browser and save credentials |
memoreru logout | Remove saved credentials |
memoreru keys create | Create an API key (--read-only for read-only) |
memoreru keys list | List your API keys |
memoreru keys revoke | Revoke an API key |
memoreru init | Generate a content template (choose a type with --type) |
memoreru pull | Download Memoreru content to your computer |
memoreru push | Upload local files to Memoreru |
memoreru status | List files changed since the last sync |
memoreru diff | Show your changes as a diff |
Both pull and push accept --preview, which shows what would happen without writing anything.
How Files Map to Content
Each content type becomes the following file format locally:
| Content | File format |
|---|---|
| Pages / Slides | .md (images in an images/ folder) |
| Tables | .csv |
| Views / Graphs / Dashboards | .json |
| Folders | Directories |
A .memoreru.json file in each directory declares which files sync as which content. Only listed files are synced.
{
"readme.md": {
"content_type": "page",
"title": "Project README"
},
"tasks.csv": {
"content_type": "table",
"title": "Task List"
}
}Only content_type is required. You can also specify the title, visibility, category, tags, thumbnail, and more. After your first push, the information linking each file to its Memoreru content is written back to this file automatically.
A .memoreru/ folder is generated to keep sync records. If you use Git, add it to .gitignore.
Tables and CSV
Tables sync as CSV files: column names on the first line, data from the second line on.
Title,Status,Priority
Set up CI,Done,High
Write docs,In progress,MediumAfter your first push, two columns — row_id and version — are added at the front to identify each row (your original file is backed up as .bak.csv). Leave these two columns as they are.
To add a new row, leave row_id and version empty:
row_id,version,Title,Status,Priority
row_abc123,1,Set up CI,Done,High
,,Add tests,Not started,LowFrom the second push on, only changed rows are sent. If someone else has already updated the same row, the push lets you know about the conflict, so you won't overwrite their work by accident.
Images
Images referenced with relative paths in Markdown are uploaded automatically when you push.
On pull, only images that have changed are downloaded.
Using Multiple Accounts
To switch between accounts — say, work and personal — use profiles.
memoreru login --profile work # Save credentials under the name "work"
memoreru push ./docs --profile workPlace a .memoreru-config.json in a directory to pin which profile is used for operations there.
{
"profile": "work"
}Working with AI Assistants
Combined with Claude Code, you can drive the CLI in plain language — "publish this folder to Memoreru". Just copy the skill bundled with the CLI:
cp -r node_modules/@memoreru-sdk/cli/skills/memoreru-cli ~/.claude/skills/If you want an AI to read and write table data directly, without going through local files, the MCP Server is a better fit. See "Integration Overview" for guidance.
コメント