Install
openclaw skills install memos-cliUse when a user needs to read, search, create, update, delete, comment on, tag, or inspect Memos data through this repository's Go CLI, especially when the agent should prefer real project commands over guessing HTTP API calls.
openclaw skills install memos-cliInstall: go install github.com/rogeecn/memos-cli@latest
Binary form: memos-cli
Primary purpose: Use this repository's Go CLI to perform Memos operations from the terminal.
This repository contains a Go CLI named memos for common Memos operations.
Agents should prefer this CLI when the user asks to list memos, fetch memo details, search content, apply CEL filters, create or update memos, delete memos, add comments, remove tags, or inspect users. The CLI already handles configuration loading, JSON output, memo formatting, and memo ID normalization behavior implemented in the repo.
Use this skill when:
Do not use this skill when:
Install the CLI first:
go install github.com/rogeecn/memos-cli@latest
Then run it as a normal installed binary:
memos-cli --help
Use memos-cli as the canonical entrypoint. Do not use go run . in this skill.
IMPORTANT FOR AGENTS: Before executing any command that talks to the Memos API, first run:
memos-cli config check
The CLI reads configuration with this precedence:
.envExpected variables:
MEMOS_URL=http://localhost:5230
MEMOS_API_KEY=your-api-key
MEMOS_ADMIN_API_KEY=your-admin-api-key
DEFAULT_TAG=cli
MEMOS_URL is missing, stop and ask the user for the Memos base URLMEMOS_API_KEY is missing, stop and ask the user to provide or export ituser list, also require MEMOS_ADMIN_API_KEY.envmemos-cli memo list
memos-cli memo get <memo-id>
--jsonUse --json whenever the task needs machine-readable data, IDs for follow-up steps, or filtering with shell tools.
memos-cli --json memo list
memos-cli config check
memos-cli memo list
memos-cli memo list --page-size 20
memos-cli memo list --page-token <token>
memos-cli memo get <memo-id>
memos-cli search "keyword"
memos-cli filter --expr "visibility == 'PRIVATE'"
memos-cli user list
The content field supports Markdown. Agents can pass plain text or Markdown content to memo and comment commands.
memos-cli memo create "# Weekly Note\n\n- shipped feature\n- fixed bug"
memos-cli memo create "memo content" --tag release --tag cli
memos-cli memo create "memo content" --visibility PUBLIC
memos-cli memo update <memo-id> --content "## Updated\n\nThis memo now uses **Markdown**."
memos-cli memo update <memo-id> --visibility PUBLIC
memos-cli memo delete <memo-id> --yes
memos-cli comment create <memo-id> "Looks good.\n\n- reviewed\n- approved"
memos-cli tag remove <memo-id> <tag>
memos-cli config check
memos-cli memo list
Note: memo list lists memos using the API default ordering. Treat it as the current list view, not a guaranteed dedicated recent command.
memos-cli config check
memos-cli --json memo list
memos-cli memo get <memo-id>
memos-cli memo update <memo-id> --content "new content"
memos-cli --json search "deploy"
memos-cli memo get <memo-id>
memos-cli filter --expr "createTime > timestamp('2026-01-01T00:00:00Z') && visibility == 'PRIVATE'"
memos-cli memo list --page-size 20
memos-cli memo list --page-size 20 --page-token <next-token>
In text mode, the CLI prints Next page token: ... when another page exists. In JSON mode, inspect nextPageToken.
memos-cli memo create "ship checklist ready" --tag release --tag weekly
The CLI appends DEFAULT_TAG automatically when configured.
memos-cli memo delete <memo-id> --yes
Deletion requires explicit --yes. If the user asks to delete a memo and has not clearly confirmed, ask before running it.
go run . config check
go run . user list
If MEMOS_ADMIN_API_KEY is missing, stop and ask the user to provide admin credentials.
abc123memos:// or other URI forms for CLI commandscomment create and tag remove work with memo IDs and rely on the client behavior already implemented in the repo| Error or symptom | Likely cause | Agent action |
|---|---|---|
MEMOS_URL is required | Base URL missing | Ask user for MEMOS_URL or local .env |
MEMOS_API_KEY is required | API key missing | Ask user for MEMOS_API_KEY |
MEMOS_ADMIN_API_KEY is required | Admin command without admin key | Ask user for admin key before user list |
update requires --content or --visibility | Update called with no changes | Re-run with at least one change flag |
delete requires --yes | Delete missing confirmation flag | Re-run only after explicit confirmation |
| empty or unexpected search results | Filter/query too narrow or API data differs | Try --json and inspect returned structure |
| next page not visible | Pagination token not supplied | Re-run with --page-token |
config check over guessing whether configuration exists--json for agent follow-up logic and ID extraction.env or other local secret materialgo run . or go run ./cmd/memos instead of the installed memos-cli binaryconfig check--json when later steps need a memo ID or tokenmemo list is a dedicated recent endpoint rather than the default list API--yes for deletionsuser list without admin credentialsgo install github.com/rogeecn/memos-cli@latestmemos-cli config checkmemos-cli memo listmemos-cli --json memo listmemos-cli memo get <memo-id>memos-cli search "keyword"memos-cli filter --expr "..."memos-cli memo create "content"memos-cli memo update <memo-id> --content "..."memos-cli memo delete <memo-id> --yesmemos-cli comment create <memo-id> "..."memos-cli tag remove <memo-id> <tag>memos-cli user list