@dvxgonzalez/marca-cli
v0.1.1
Published
Save links to Marca from the command line
Readme
marca-cli
Save links to Marca from the command line.
Install
npm install -g marca-cli
# or locally:
cd cli && npm linkRequires Node.js 18+.
Development
Build executable JS output for the CLI package:
npm --prefix cli run buildSetup
- Go to Settings → API Keys in your Marca app and generate a key.
- Configure the CLI:
marca config set-url https://yourapp.com
marca config set-key mca_…Config is stored in ~/.config/marca/config.json.
Usage
# Save a bookmark
marca add https://example.com
# With options
marca add https://example.com --title "My title" --tag reading,tech --private
# Save as article
marca add https://example.com --article
marca add https://example.com --article --no-archive
# With a note
marca add https://example.com --desc "Check this out later"
# Add from stdin
pbpaste | marca add
# List and search
marca list --page 1 --limit 20
marca search "distributed systems"
marca tags
# Manage clips
marca open 123
marca tag 123 --add reading,reference --remove inbox
marca delete 123 --yes
# Export
marca export --format json
marca export --format csv --output clips.csv
# Zsh completion
eval "$(marca completion --shell zsh)"Commands
| Command | Description |
|---------|-------------|
| marca add [url] | Save a new clip (URL arg or piped stdin) |
| marca list | List clips with pagination and filters |
| marca search <query> | Search clips using the same filters as list |
| marca tags | List current tags with usage counts |
| marca open <id> | Open clip URL in your default browser |
| marca tag <id> | Add/remove tags on a clip |
| marca delete <id> | Delete a clip |
| marca export | Export clips as JSON or CSV |
| marca completion --shell zsh | Print zsh completion script |
| marca config set-url <url> | Configure Marca base URL |
| marca config set-key <key> | Configure API key |
Common options
| Option | Description |
|--------|-------------|
| --title <str> | Override title (add) |
| --tag <str> | Comma-separated tags (add or filters) |
| --desc <str> | Note / description (add) |
| --article | Save as Article (add) |
| --archive | Archive source HTML on article save (add) |
| --no-archive | Skip source HTML archive on article save (add) |
| --private | Mark clip private (add) |
| --type Bookmark\|Article | Filter by clip type |
| --query <str> | Full-text filter (list, export) |
| --page <n> | Page number (list, search) |
| --limit <n> | Items per page (list, search) |
| --json | JSON output for command responses |
