360 Secure SkillHub
360 安全技能中心

Weeko

为 Weeko 书签管理 CLI 提供命令指引:登录与账户查看、书签的搜索/新增/更新/删除、分组管理、批量移动与批量删除,支持 JSON、TOON、pretty 三种输出及 --dry-run 预演。含删除等破坏性操作提示,运行需 Bun 与 Weeko API key。

分类:知识
occupy5
occupy5
热度 29.80
最近更新 2026-05-11 17:35:58

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add occupy5/weeko
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
weeko
description
Weeko CLI commands for bookmark management. Search, add, update, delete bookmarks. Create and organize groups. Batch operations.
metadata
{"author":"occupy5","homepage":"https://weeko.blog","version":"1.4.0"}

Weeko CLI Assistant

Expert guidance for interacting with the Weeko CLI - a Bun-powered, AI-native CLI for managing your Weeko bookmarks and groups.

Overview

The Weeko CLI provides command-line access to your Weeko bookmark manager with AI-friendly output formats. All commands support:

  • Output formats: json (default) or toon (AI-optimized via --format toon) or pretty (formatted tables)
  • Dry-run mode: Test commands safely with --dry-run
  • Schema validation: All API responses validated with Zod schemas

Requirements & Installation

Prerequisites

Installation

Install from npm (recommended)

bun install -g weeko-cli

Verify installation:

weeko --version

Quick Start

# Authentication
weeko login [api-key]         # Login with API key
weeko whoami                  # Show current user
weeko logout                  # Remove credentials

# Get context about the account
weeko status                  # Account overview (alias: context)
weeko tree                    # Show all groups (alias: structure)

# Search and manage bookmarks
weeko search "query"          # Search bookmarks
weeko add <url>               # Add new bookmark
weeko get <id>                # Get bookmark details
weeko update <id>             # Update bookmark
weeko delete <id>             # Delete bookmark
weeko list                    # List all bookmarks

# Manage groups
weeko group list              # List groups
weeko group create "Name"     # Create group
weeko group update <id>       # Update group
weeko group delete <id>       # Delete group

# Batch operations
weeko batch move --ids "1,2,3" --group <id>    # Move bookmarks
weeko batch delete --ids "1,2,3"               # Delete bookmarks

Authentication & Setup

Login

weeko login                   # Interactive prompt
weeko login "wk_xxx"          # Provide key directly

Getting an API key:

  1. Visit https://weeko.blog/zh/dashboard
  2. Generate a new API key
  3. Copy the key (starts with wk_)

Check Current User

weeko whoami                  # Returns user ID, name, email

Account Overview

weeko status                  # High-level overview:
                              # - User details
                              # - Bookmark stats (total, links, colors, text, public)
                              # - Group count
                              # - Recent groups

weeko tree                    # All groups with IDs, names, and bookmark counts

Working with Bookmarks

List Bookmarks

weeko list                    # List all bookmarks
weeko list -g <groupId>       # Filter by group ID
weeko list --pretty           # Formatted table output

Search Bookmarks

weeko search "query"          # Search by title, URL, or description
weeko search "javascript" --pretty    # Formatted results

Search is performed client-side across bookmark title, URL, and description fields.

Get Bookmark Details

weeko get <id>                # Full bookmark details:
                              # - id, title, url, description
                              # - image, favicon, siteName
                              # - type (link/color/text)
                              # - color, isPublic, groupId
                              # - group info (id, name, color)
                              # - createdAt, updatedAt

Add Bookmarks

weeko add "https://example.com"
weeko add "https://example.com" -t "My Title"
weeko add "https://example.com" -g <groupId>
weeko add "https://example.com" -t "Title" -g <groupId> -d "Description"

If no group is specified with -g, you'll be prompted to select one interactively.

Options:

  • -t, --title <title>: Bookmark title (prompts if not provided)
  • -g, --group <id>: Target group ID
  • -d, --description <desc>: Description

Update Bookmarks

weeko update <id> -t "New Title"
weeko update <id> -u "https://new-url.com"
weeko update <id> -g <newGroupId>
weeko update <id> -d "New description"
weeko update <id> -t "Title" -g <groupId> -d "Desc"

Options:

  • -t, --title <title>: New title
  • -u, --url <url>: New URL
  • -g, --group <id>: Move to different group
  • -d, --description <desc>: New description

All options are optional. Only provided fields will be updated.

Delete Bookmarks

weeko delete <id>             # Deletes after confirmation

Working with Groups

List Groups

weeko group list              # All groups with IDs and counts
weeko group list --pretty     # Formatted table

Get Group Details

weeko group get <id>          # Full group details:
                              # - id, name, color
                              # - isPublic, bookmarkCount
                              # - createdAt, updatedAt

Create Groups

weeko group create "My Group"
weeko group create "Work" -c "#ef4444"

Options:

  • -c, --color <hex>: Group color in hex format (default: #3b82f6)

Update Groups

weeko group update <id> -n "New Name"
weeko group update <id> -c "#ec4899"
weeko group update <id> -n "Name" -c "#10b981"

Options:

  • -n, --name <name>: New group name
  • -c, --color <hex>: New hex color

Delete Groups

weeko group delete <id>       # Deletes group AND all its bookmarks

Warning: Deleting a group permanently deletes all bookmarks within it.

Batch Operations

Batch Move

weeko batch move --ids "id1,id2,id3" --group <targetGroupId>

Move multiple bookmarks to a different group.

Batch Delete

weeko batch delete --ids "id1,id2,id3"

Delete multiple bookmarks at once.

Output Formats

JSON (Default)

Standard JSON output:

{
  "id": "clx...",
  "title": "Example",
  "url": "https://example.com"
}

TOON (AI-Optimized)

Token-optimized format for AI agents via --format toon:

id\tclx...
title\tExample
url\thttps://example.com

Pretty (Formatted Tables)

Human-readable formatted tables via --pretty:

┌────────────┬──────────────────────┬─────────────────────────────┐
│ ID         │ Title                │ URL                         │
├────────────┼──────────────────────┼─────────────────────────────┤
│ clx...     │ Example              │ https://example.com         │
└────────────┴──────────────────────┴─────────────────────────────┘
(1 bookmarks)

Global Options

All commands support:

--dry-run                        # Log actions without making API calls
--format toon                    # Output as TOON instead of JSON
-v, --version                    # Show version

Best Practices

  1. Start with context: Run weeko status or weeko tree to understand the account structure
  2. Search before adding: Use weeko search to avoid duplicates
  3. Use dry-run: Test destructive operations with --dry-run first
  4. Use TOON format: Use --format toon for AI-optimized token-efficient output
  5. Batch when possible: Use batch move and batch delete for bulk operations

Error Handling

The CLI provides helpful error messages with hints:

  • 401 Unauthorized: Run weeko login to authenticate
  • 404 Not Found: Verify the ID is correct
  • 429 Rate Limited: Wait a few minutes before retrying
  • 500 Server Error: The Weeko server is experiencing issues

All errors include:

  • Error message
  • HTTP status code
  • Hint for resolution (when available)

Examples

Daily Workflow

# Check account status
weeko status

# See group structure
weeko tree

# Add a new bookmark
weeko add "https://example.com/article" -g <groupId> -t "Great Article"

# Search for existing bookmarks
weeko search "javascript" --pretty

# Move bookmarks between groups
weeko batch move --ids "id1,id2" --group <newGroupId>

Clean Up Workflow

# Review all bookmarks
weeko list --pretty

# Search for specific items
weeko search "example.com"

# Delete unwanted bookmarks
weeko delete <id>

# Check group sizes before cleanup
weeko group list --pretty

Content Curation

# Create a new group
weeko group create "AI Resources" -c "#8b5cf6"

# Add bookmarks to the new group
weeko add "https://arxiv.org" -g <newGroupId> -t "arXiv"
weeko add "https://paperswithcode.com" -g <newGroupId> -t "Papers With Code"

# List group contents
weeko list -g <newGroupId> --pretty

Resources

See references/commands.md for detailed command reference, architecture info, and output format specifications.