@xxxio1/memos-cli
v1.0.0
Published
CLI tool for Memos - A lightweight note-taking service
Readme
memos-cli
CLI tool for Memos - A lightweight, self-hosted note-taking service.
Installation
npm install -g @xxxio1/memos-cliFrom source
git clone https://github.com/xxxio1/memos-cli.git
cd memos-cli
bun install
bun run build
npm linkUsage
Authentication
# Login to your Memos server
memos auth login -s https://your-memos-server.com -u username -p password
# Check authentication status
memos auth status
# Set server URL only
memos auth config https://your-memos-server.com
# Logout
memos auth logoutList & Search Memos
# List recent memos
memos list
# Search by keyword (server-side filter, no full load)
memos list docker
memos list "部署"
# Filter by visibility
memos list -v PUBLIC
memos list -v PRIVATE
# Filter by tag
memos list -t work
# Combine filters
memos list docker -v PUBLIC --limit 10
# Output as JSON
memos list --json
# Fetch all memos
memos list --allQuick Actions
# Quick create a memo
memos quick "Hello World"
memos quick "Public note" -v PUBLIC
# Get a specific memo
memos get memos/abc123
memos show memos/abc123
# Delete a memo
memos delete memos/abc123
memos delete memos/abc123 -f # force, no confirmationMemo Management
# Create a memo (interactive)
memos memo create
memos memo create -c "Content here" -v PUBLIC
# Update a memo
memos memo update memos/abc123 --pin
memos memo update memos/abc123 --content "New content"
memos memo update memos/abc123 # interactive editor
# Archive / Restore
memos memo update memos/abc123 --archive
memos memo update memos/abc123 --restoreUser Commands
# Show current user
memos user me
# Get user by ID
memos user get users/1Shortcuts
# List shortcuts
memos shortcut list
# Create a shortcut
memos shortcut create -t "My Filter" -f 'visibility == "PUBLIC"'
# Delete a shortcut
memos shortcut delete users/1/shortcuts/abc123Command Overview
memos
list [keyword] # Search and list memos (alias: ls)
get <name> # Get a specific memo (alias: show)
delete <name> # Delete a memo (alias: rm)
quick <content> # Quick create a memo (alias: q)
auth # Authentication commands
memo # Full memo management (alias: m)
user # User commands (alias: u)
shortcut # Shortcut management (alias: sc)Global Options
memos --no-color # Disable colored output
memos --quiet # Suppress spinner and extra output
memos --json # Output as JSON
NO_COLOR=1 memos list # Or use environment variable
MEMOS_QUIET=1 memos list # Or use environment variableConfiguration
Configuration is stored in ~/.memos-cli/config.json:
{
"serverUrl": "https://your-memos-server.com",
"token": "your-jwt-token",
"username": "your-username"
}Development
# Install dependencies
bun install
# Run in development
bun run dev
# Build for production
bun run buildLicense
MIT
