A modern, feature-complete CLI for linkding bookmark manager
clinkding is a command-line interface for managing your linkding bookmarks. Built with Go for speed and ease of distribution, it provides full API coverage with a human-friendly interface that's also perfect for scripting.
✨ Full API Coverage
- 📑 Bookmarks (create, read, update, delete, archive, search)
- 🏷️ Tags (list, create, get)
- 📦 Bundles (full CRUD operations)
- 📎 Assets (upload, download, manage file attachments)
- 👤 User profile
🎨 Modern CLI Experience
- Human-friendly output with colors and tables
- Machine-readable JSON and plain text modes
- Smart configuration (flags, environment variables, config file)
- Interactive confirmations for destructive operations
- Progress indicators for long operations
⚡ Developer Friendly
- Single binary, no dependencies
- Cross-platform (macOS, Linux, Windows)
- Shell completion (bash, zsh, fish)
- Scriptable with stable exit codes
brew install daveonkels/tap/clinkdingDownload the latest release for your platform from the releases page.
go install github.com/daveonkels/clinkding@latest# Interactive setup
clinkding config init
# Or use flags
clinkding --url https://linkding.example.com --token YOUR_TOKEN bookmarks list# List bookmarks
clinkding bookmarks list
# Search bookmarks
clinkding bookmarks list --query "golang tutorial"
# Create a bookmark
clinkding bookmarks create https://go.dev \
--title "Go Programming Language" \
--tags "golang,programming,reference" \
--description "Official Go website"
# Update a bookmark
clinkding bookmarks update 42 \
--add-tags "learning,docs" \
--description "Updated description"
# Archive a bookmark
clinkding bookmarks archive 42
# Delete a bookmark
clinkding bookmarks delete 42# List all tags
clinkding tags list
# Create a tag
clinkding tags create "golang"
# Get tag details
clinkding tags get 1# List bundles
clinkding bundles list
# Create a bundle
clinkding bundles create "Go Resources" \
--description "Everything related to Go programming"
# Update a bundle
clinkding bundles update 1 --name "Go Lang Resources"
# Delete a bundle
clinkding bundles delete 1# List assets for a bookmark
clinkding assets list 42
# Upload a file
clinkding assets upload 42 ~/Documents/screenshot.png
# Download an asset
clinkding assets download 42 1 -o ./downloaded-file.png
# Delete an asset
clinkding assets delete 42 1By default, clinkding looks for a config file at ~/.config/clinkding/config.yaml:
url: https://linkding.example.com
token: your-api-token-here
defaults:
bookmark_limit: 100
output_format: auto # auto, json, plainexport LINKDING_URL="https://linkding.example.com"
export LINKDING_TOKEN="your-api-token-here"Configuration is applied in this order (highest to lowest):
- Command-line flags (
--url,--token) - Environment variables (
LINKDING_URL,LINKDING_TOKEN) - Config file (
~/.config/clinkding/config.yaml)
# Export all bookmarks as JSON
clinkding bookmarks list --json > bookmarks.json
# Get specific bookmark in JSON
clinkding bookmarks get 42 --json | jq '.title'# Get tab-separated values
clinkding bookmarks list --plain | cut -f1,3
# Archive old bookmarks
clinkding bookmarks list --modified-since "180d" --plain | \
while read id _; do
clinkding bookmarks archive "$id"
done# Bookmarks modified in the last 7 days
clinkding bookmarks list --modified-since "7d"
# Bookmarks added in the last 24 hours
clinkding bookmarks list --added-since "24h"
# Supports: h (hours), d (days), y (years)# Check if URL already exists
clinkding bookmarks check https://go.dev# Tag multiple bookmarks
for id in 42 43 44; do
clinkding bookmarks update $id --add-tags "important"
done
# Export bookmarks with specific tag
clinkding bookmarks list --query "tag:golang" --json | \
jq -r '.results[] | .url' > golang-bookmarks.txtAll commands support these global flags:
| Flag | Description |
|---|---|
-h, --help |
Show help |
--version |
Show version |
-c, --config <file> |
Config file path |
-u, --url <url> |
Linkding instance URL |
-t, --token <token> |
API token |
--json |
Output as JSON |
--plain |
Output as plain text |
--no-color |
Disable colors |
-q, --quiet |
Minimal output |
-v, --verbose |
Verbose output |
clinkding completion bash > /etc/bash_completion.d/clinkdingclinkding completion zsh > "${fpath[1]}/_clinkding"clinkding completion fish > ~/.config/fish/completions/clinkding.fish| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error (API error, network error) |
| 2 | Invalid usage (bad flags, missing args) |
| 3 | Authentication error (invalid token) |
| 4 | Not found (resource doesn't exist) |
| 130 | Interrupted (Ctrl-C) |
# Morning: Check unread bookmarks
clinkding bookmarks list --query "unread:yes"
# Add a bookmark from clipboard
pbpaste | xargs -I {} clinkding bookmarks create {}
# Quick search
clinkding bookmarks list --query "golang"
# Archive old unread bookmarks
clinkding bookmarks list --query "unread:yes" --added-since "30d" --plain | \
while read id _; do
clinkding bookmarks archive "$id"
done# Backup all bookmarks
clinkding bookmarks list --json > backup-$(date +%Y%m%d).json
# Export specific tag
clinkding bookmarks list --query "tag:important" --json > important.json# Open random bookmark in browser
clinkding bookmarks list --plain | shuf -n1 | cut -f3 | xargs open
# Add bookmark with fzf selection
clinkding tags list --plain | fzf | cut -f2 | \
xargs -I {} clinkding bookmarks create "$URL" --tags {}
# Sync to Pocket (example)
clinkding bookmarks list --json | jq -r '.results[].url' | \
while read url; do pocket add "$url"; donegit clone https://github.com/daveonkels/clinkding.git
cd clinkding
go build -o clinkding .go test ./...clinkding/
├── cmd/ # Command implementations
│ ├── assets/ # Asset commands
│ ├── bookmarks/ # Bookmark commands
│ ├── bundles/ # Bundle commands
│ ├── config/ # Config commands
│ ├── tags/ # Tag commands
│ └── user/ # User commands
├── internal/
│ ├── api/ # API client methods
│ ├── client/ # HTTP client
│ ├── config/ # Configuration management
│ ├── models/ # Data models
│ └── output/ # Output formatters
└── main.go # Entry point
# Test your connection
clinkding config test
# Check configuration
clinkding config show- Verify your API token in the linkding web interface
- Ensure the URL includes the protocol (
https://) - Check for trailing slashes in the URL
# Command-specific help
clinkding bookmarks --help
clinkding bookmarks create --help
# General help
clinkding --helpContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
- linkding - The excellent bookmark manager this CLI is built for
- Cobra - CLI framework
- Viper - Configuration management
- linkding - The linkding bookmark manager
- linkding-cli - Original Python-based CLI (inspiration for this project)
Made with ❤️ for the linkding community
