### Start Docker Compose Development Stack Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Starts all dependencies, installs packages, and runs migrations. The 'prep' service ensures dependencies are ready before other services start. ```bash docker compose -f docker/docker-compose.dev.yml up ``` -------------------------------- ### Example: Get User Info with API Key and Server Address Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/05-integrations/02-command-line.md An example of using the 'whoami' command with specific API key and server address, showing the expected JSON output. ```bash karakeep --api-key mysupersecretkey --server-addr https://try.karakeep.app whoami { id: 'j29gnbzxxd01q74j2lu88tnb', name: 'Test User', email: 'test@gmail.com' } ``` -------------------------------- ### Run Development Environment Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Execute this script for the fastest way to start development. It automatically sets up Meilisearch and headless Chrome in Docker, installs dependencies, and starts the web app and workers. ```bash ./start-dev.sh ``` -------------------------------- ### Install Karakeep SDK Source: https://github.com/karakeep-app/karakeep/blob/main/packages/sdk/README.md Install the SDK using npm. This command fetches and installs the necessary package for using the Karakeep API. ```bash npm install @karakeep/sdk ``` -------------------------------- ### Install and Run with pnpm Source: https://github.com/karakeep-app/karakeep/blob/main/tools/compare-models/README.md Recommended method to run the comparison tool. Navigate to the tool's directory, install dependencies, and execute the tool. ```bash cd tools/compare-models pnpm install pnpm run ``` -------------------------------- ### Install Karakeep Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/02-installation/06-debuntu.md Execute the downloaded script with the 'install' argument to perform a fresh installation of Karakeep. This command requires root or sudo privileges. ```shell bash karakeep-linux.sh install ``` -------------------------------- ### Download Karakeep Installation Script Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/02-installation/06-debuntu.md Use wget to download the Karakeep installation script from the official GitHub repository. This script is used for both initial installation and updates. ```shell wget https://raw.githubusercontent.com/karakeep-app/karakeep/main/karakeep-linux.sh ``` -------------------------------- ### Karakeep CLI Search Query Examples Source: https://github.com/karakeep-app/karakeep/blob/main/skills/SKILL.md Demonstrates various search query syntaxes for finding bookmarks. Use these examples to construct powerful searches. ```bash # Favorited bookmarks from 2024 tagged "important" is:fav after:2024-01-01 before:2024-12-31 #important ``` ```bash # Archived bookmarks in "reading" list or tagged "work" is:archived and (list:reading or #work) ``` ```bash # Untagged or unorganized bookmarks -is:tagged or -is:inlist ``` ```bash # Recent bookmarks from the last week age:<1w ``` ```bash # Full-text search combined with qualifiers machine learning is:fav -is:archived ``` -------------------------------- ### Start Local Development Server Source: https://github.com/karakeep-app/karakeep/blob/main/docs/README.md Starts a local development server for live previewing changes. Changes are reflected live without server restarts. ```bash yarn start ``` -------------------------------- ### Start Web Application Source: https://github.com/karakeep-app/karakeep/blob/main/CLAUDE.md Starts the Next.js web application. This command runs continuously until manually stopped. ```bash pnpm web ``` -------------------------------- ### Install Karakeep CLI Source: https://github.com/karakeep-app/karakeep/blob/main/skills/SKILL.md Install the Karakeep CLI globally using npm or run it via Docker. ```bash npm install -g @karakeep/cli ``` ```bash docker run --rm ghcr.io/karakeep-app/karakeep-cli:release --help ``` -------------------------------- ### Install Karakeep CLI via NPM Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/05-integrations/02-command-line.md Installs the Karakeep command-line interface globally using npm. ```bash npm install -g @karakeep/cli ``` -------------------------------- ### Enable and Start Karakeep Service Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/02-installation/03-archlinux.md Enable and start the karakeep systemd target service to run Karakeep. ```shell sudo systemctl enable --now karakeep.target ``` -------------------------------- ### Install Project Dependencies with pnpm Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Install all necessary packages and dependencies for the project using pnpm. Run this from the root of the repository. ```bash $ pnpm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/karakeep-app/karakeep/blob/main/docs/README.md Installs project dependencies using Yarn. ```bash yarn ``` -------------------------------- ### Install Optional Dependencies for Karakeep Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/02-installation/03-archlinux.md Install optional dependencies for karakeep, including the CLI tool, Ollama for automatic tagging, and yt-dlp for video downloads. ```shell # karakeep-cli: karakeep cli tool paru -S karakeep-cli # ollama: for automatic tagging sudo pacman -S ollama # yt-dlp: for download video sudo pacman -S yt-dlp ``` -------------------------------- ### Karakeep Configuration File Example Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/05-integrations/02-command-line.md An example JSON structure for the Karakeep configuration file, used to store server address and API key. ```json { "serverAddr": "https://try.karakeep.app", "apiKey": "mysupersecretkey" } ``` -------------------------------- ### Run Development Server Source: https://github.com/karakeep-app/karakeep/blob/main/apps/landing/README.md Use these commands to start the Next.js development server. Open http://localhost:3000 in your browser to view the application. ```bash npm run dev # or yarn dev # or pnpm dev # or bun dev ``` -------------------------------- ### Migrate Baremetal Installation to Karakeep Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/06-administration/08-hoarder-to-karakeep-migration.md Execute the migration script for baremetal installations that were previously set up using the Debian/Ubuntu install script. This script automates the migration process without requiring user input and checks for updates afterward. ```bash bash karakeep-linux.sh migrate ``` -------------------------------- ### Start Drizzle Studio Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/03-database.md Run this command in the root of the repository to launch Drizzle Studio, a GUI tool for inspecting and interacting with your database. ```bash pnpm run db:studio ``` -------------------------------- ### Install Karakeep Skill using skills.sh Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/05-integrations/07-agentic-skills.md Use this command to add the Karakeep skill to your system via skills.sh. ```bash npx skills add karakeep-app/karakeep ``` -------------------------------- ### Example Cookie JSON Structure Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/03-configuration/01-environment-variables.md Provides an example of the JSON structure required for the BROWSER_COOKIE_PATH environment variable. This file should contain an array of cookie objects. ```json [ { "name": "session", "value": "xxx", "domain": ".example.com", "path": "/", "expires": 1735689600, "httpOnly": true, "secure": true, "sameSite": "Lax" } ] ``` -------------------------------- ### Verify Node.js Version Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Confirm that Node.js version 24 has been successfully installed. ```bash $ node --version ``` -------------------------------- ### Run Web App Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Start the Karakeep web application. Access it via http://localhost:3000. Search functionality requires Meilisearch to be running. ```bash pnpm web ``` -------------------------------- ### Get Bookmark Details via CLI Source: https://github.com/karakeep-app/karakeep/blob/main/skills/SKILL.md Retrieve details for a specific bookmark, optionally including its content. ```bash karakeep bookmarks get ``` ```bash karakeep bookmarks get --include-content ``` -------------------------------- ### Run using an Environment File Source: https://github.com/karakeep-app/karakeep/blob/main/tools/compare-models/README.md Create a `.env` file with all necessary configuration variables and then run the comparison tool. This is an alternative to setting environment variables directly. ```env KARAKEEP_API_KEY=your_api_key KARAKEEP_SERVER_ADDR=https://your-karakeep-instance.com MODEL1_NAME=gpt-4o-mini MODEL2_NAME=claude-3-5-sonnet OPENAI_API_KEY=your_openai_key COMPARE_LIMIT=10 ``` -------------------------------- ### Verify Corepack Installation Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Check if Corepack is installed and accessible in your system's PATH. Corepack should be included with Node.js installations. ```bash $ command -v corepack ``` -------------------------------- ### Install Node.js Version 24 with NVM Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Use NVM to install the required Node.js version 24 for the project. Ensure you have NVM installed first. ```bash $ nvm install 24 ``` -------------------------------- ### Initialize Karakeep Client and Use SDK Source: https://github.com/karakeep-app/karakeep/blob/main/packages/sdk/README.md Create a client instance with your API key and base URL, then use it to create and search for bookmarks. Ensure the authorization header is correctly formatted. ```typescript import { createKarakeepClient } from "@karakeep/sdk"; // Create a client const apiKey = "my-super-secret-key"; const addr = `https://karakeep.mydomain.com`; const client = createKarakeepClient({ baseUrl: `${addr}/api/v1/`, headers: { "Content-Type": "application/json", authorization: `Bearer ${apiKey}`, }, }); // Create a bookmark const { data: createdBookmark, response: createResponse, error: createError, } = await client.POST("/bookmarks", { body: { type: "text", title: "Search Test 1", text: "This is a test bookmark for search", }, }); console.log(createResponse.status, createdBookmark, createError); // Search for bookmarks const { data: searchResults, response: searchResponse, error: searchError, } = await client.GET("/bookmarks/search", { params: { query: { q: "test bookmark", }, }, }); console.log(searchResponse.status, searchResults, searchError); ``` -------------------------------- ### Copy Environment Sample File Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Create a local .env file by copying the provided sample file. This file will store your environment-specific configurations. ```bash cp .env.sample .env ``` -------------------------------- ### Install Karakeep on Arch Linux Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/02-installation/03-archlinux.md Use paru to install the karakeep package from AUR. ```shell paru -S karakeep ``` -------------------------------- ### Start Karakeep Service Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/02-installation/01-docker.md Start the Karakeep service in detached mode using Docker Compose. ```bash docker compose up -d ``` -------------------------------- ### Browser Extension Development Setup Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/08-development/01-setup.md Steps to set up and run the browser extension in development mode. Ensure developer mode is enabled in Chrome and load the unpacked 'dist' directory. ```bash cd apps/browser-extension ``` ```bash pnpm dev ``` -------------------------------- ### Initialize Karakeep Configuration Interactively Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/05-integrations/02-command-line.md Initializes or updates the Karakeep configuration file interactively through the command line. ```bash karakeep auth init ``` -------------------------------- ### Start Background Workers Source: https://github.com/karakeep-app/karakeep/blob/main/CLAUDE.md Starts the background worker processes for the application. This command runs continuously until manually stopped. ```bash pnpm workers ``` -------------------------------- ### Karakeep CLI Help Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/05-integrations/02-command-line.md Displays the main help information for the Karakeep CLI, outlining available options and commands. ```bash karakeep ``` -------------------------------- ### Get a single list Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/get-list.api.mdx Retrieve a single list by its ID. ```APIDOC ## GET /lists/{listId} ### Description Retrieve a single list by its ID. ### Method GET ### Endpoint /lists/{listId} ### Parameters #### Path Parameters - **listId** (string) - Required - The unique identifier of the list. #### Request Body This endpoint does not accept a request body. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the list. - **name** (string) - The name of the list. - **description** (string) - Optional - A description for the list. - **icon** (string) - An icon representing the list. - **parentId** (string) - The ID of the parent list, if any. - **type** (string) - The type of the list, either "manual" or "smart". - **query** (string) - Optional - The query string for smart lists. - **public** (boolean) - Indicates if the list is public. - **hasCollaborators** (boolean) - Indicates if the list has collaborators. - **userRole** (string) - The role of the current user on the list (owner, editor, viewer, public). #### Error Response (401) - **message** (string) - Unauthorized — the Bearer token is missing, invalid, or expired. #### Error Response (404) - **code** (string) - A machine-readable error code. - **message** (string) - A human-readable error message. ``` -------------------------------- ### Install Karakeep CLI via Docker Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/05-integrations/02-command-line.md Runs the Karakeep CLI container using Docker, with the --help flag to show available commands. ```bash docker run --rm ghcr.io/karakeep-app/karakeep-cli:release --help ``` -------------------------------- ### Get a single highlight Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/get-highlight.api.mdx Retrieve a single highlight by its ID. ```APIDOC ## GET /highlights/{highlightId} ### Description Retrieve a single highlight by its ID. ### Method GET ### Endpoint /highlights/{highlightId} ### Parameters #### Path Parameters - **highlightId** (string) - Required - The unique identifier of the highlight. ### Response #### Success Response (200) - **bookmarkId** (string) - **startOffset** (number) - **endOffset** (number) - **color** (string) - Enum: yellow, red, green, blue. Default: yellow. - **text** (string) - Nullable - **note** (string) - Nullable - **id** (string) - **userId** (string) - **createdAt** (string) #### Response Example { "example": "{\"bookmarkId\":\"ieidlxygmwj87oxz5hxttoc8\",\"startOffset\":10,\"endOffset\":50,\"color\":\"yellow\",\"text\":\"This is a highlighted text.\",\"note\":\"A user note.\",\"id\":\"highlight123\",\"userId\":\"user456\",\"createdAt\":\"2023-10-27T10:00:00Z\"}" } #### Error Response (401) - **message** (string) - Example: Unauthorized #### Error Response (404) - **code** (string) - A machine-readable error code. - **message** (string) - A human-readable error message. ``` -------------------------------- ### Import Bookmarks from a Text File using CLI Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/04-using-karakeep/import.md Import bookmarks line by line from a text file using the Karakeep CLI. Ensure you replace `` and `` with your actual API key and server address. ```bash while IFS= read -r url; do karakeep --api-key "" --server-addr "" bookmarks add --link "$url" done < all_links.txt ``` -------------------------------- ### Get Bookmarks by Tag Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/get-tag-bookmarks.api.mdx Fetches bookmarks associated with a given tag. ```APIDOC ## GET /api/v1/tags/{tagId}/bookmarks ### Description Retrieves a list of bookmarks associated with a specific tag. ### Method GET ### Endpoint /api/v1/tags/{tagId}/bookmarks ### Parameters #### Path Parameters - **tagId** (string) - Required - The unique identifier of the tag. ### Response #### Success Response (200) - **bookmarks** (array) - A list of bookmark objects. - **id** (string) - The unique identifier of the bookmark. - **url** (string) - The URL of the bookmarked content. - **title** (string) - The title of the bookmarked content. - **description** (string) - A brief description of the bookmarked content. - **createdAt** (string) - The timestamp when the bookmark was created. - **updatedAt** (string) - The timestamp when the bookmark was last updated. #### Error Response (401) - **code** (string) - A machine-readable error code. - **message** (string) - A human-readable error message. #### Error Response (404) - **code** (string) - A machine-readable error code. - **message** (string) - A human-readable error message. ``` -------------------------------- ### Run Karakeep Migration Command Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/06-administration/06-server-migration.md Execute the Karakeep migration command with source and destination server details. Use --yes to skip the confirmation prompt. ```bash karakeep --server-addr https://src.example.com --api-key migrate \ --dest-server https://dest.example.com \ --dest-api-key ``` -------------------------------- ### Get lists of a bookmark Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/get-bookmark-lists.api.mdx Retrieve all lists that contain the specified bookmark. ```APIDOC ## GET /bookmarks/{bookmarkId}/lists ### Description Retrieve all lists that contain the specified bookmark. ### Method GET ### Endpoint /bookmarks/{bookmarkId}/lists ### Parameters #### Path Parameters - **bookmarkId** (string) - Required - The unique identifier of the bookmark. #### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **lists** (array) - The lists that contain this bookmark. - **id** (string) - **name** (string) - **description** (string, nullable) - **icon** (string) - **parentId** (string, nullable) - **type** (string, enum: ["manual", "smart"], default: "manual") - **query** (string, nullable) - **public** (boolean) - **hasCollaborators** (boolean) - **userRole** (string, enum: ["owner", "editor", "viewer", "public"]) #### Response Example ```json { "example": "{\"lists\":[{\"id\":\"string\",\"name\":\"string\",\"description\":null,\"icon\":\"string\",\"parentId\":null,\"type\":\"manual\",\"query\":null,\"public\":true,\"hasCollaborators\":true,\"userRole\":\"owner\"}]}" } ``` #### Error Response (401) - **Unauthorized** - The Bearer token is missing, invalid, or expired. #### Error Response (404) - **Bookmark not found.** - **code** (string) - A machine-readable error code. - **message** (string) - A human-readable error message. ``` -------------------------------- ### Deploy Website (SSH) Source: https://github.com/karakeep-app/karakeep/blob/main/docs/README.md Deploys the website using SSH. Assumes SSH is configured for deployment. ```bash USE_SSH=true yarn deploy ``` -------------------------------- ### Run Code Formatting Source: https://github.com/karakeep-app/karakeep/blob/main/CLAUDE.md Formats the entire codebase using the configured code formatter. ```bash pnpm format ``` -------------------------------- ### Get highlights of a bookmark Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/get-bookmark-highlights.api.mdx Retrieve all text highlights within the specified bookmark. ```APIDOC ## GET /bookmarks/{bookmarkId}/highlights ### Description Retrieve all text highlights within the specified bookmark. ### Method GET ### Endpoint /bookmarks/{bookmarkId}/highlights ### Parameters #### Path Parameters - **bookmarkId** (string) - Required - The unique identifier of the bookmark. #### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **highlights** (array) - The highlights within this bookmark. - **bookmarkId** (string) - **startOffset** (number) - **endOffset** (number) - **color** (string) - Enum: yellow, red, green, blue - Default: yellow - **text** (string, nullable) - **note** (string, nullable) - **id** (string) - **userId** (string) - **createdAt** (string) #### Response Example ```json { "highlights": [ { "bookmarkId": "ieidlxygmwj87oxz5hxttoc8", "startOffset": 10, "endOffset": 50, "color": "yellow", "text": "This is a highlighted text.", "note": "Important note.", "id": "highlight123", "userId": "user456", "createdAt": "2023-10-27T10:00:00Z" } ] } ``` #### Error Response (401) - **Unauthorized** (string) - The Bearer token is missing, invalid, or expired. #### Error Response (404) - **Error** (object) - **code** (string) - A machine-readable error code. - **message** (string) - A human-readable error message. ``` -------------------------------- ### Get all highlights Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/list-highlights.api.mdx Retrieve a paginated list of all highlights across all bookmarks for the authenticated user. ```APIDOC ## GET /highlights ### Description Retrieve a paginated list of all highlights across all bookmarks for the authenticated user. ### Method GET ### Endpoint /highlights ### Parameters #### Query Parameters - **limit** (number) - Optional - Maximum number of items to return per page. - **cursor** (string) - Optional - Cursor from a previous response to fetch the next page. ### Response #### Success Response (200) - **highlights** (array) - An array of highlight objects. - **bookmarkId** (string) - **startOffset** (number) - **endOffset** (number) - **color** (string) - Enum: yellow, red, green, blue. Default: yellow. - **text** (string) - Nullable - **note** (string) - Nullable - **id** (string) - **userId** (string) - **createdAt** (string) - **nextCursor** (string) - Nullable - Cursor for the next page, or null if no more results. #### Error Response (401) - **Unauthorized** (string) - The Bearer token is missing, invalid, or expired. ``` -------------------------------- ### List and Search Bookmarks via CLI Source: https://github.com/karakeep-app/karakeep/blob/main/skills/SKILL.md List all bookmarks or search for specific bookmarks using various criteria and options. ```bash karakeep bookmarks list ``` ```bash karakeep bookmarks search "is:fav #work" ``` ```bash karakeep bookmarks search "rust" --limit 10 --sort-order relevance ``` ```bash karakeep bookmarks search "is:tagged" --all # paginate through all results ``` -------------------------------- ### Get all backups Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/list-backups.api.mdx Retrieves a list of all backups for the authenticated user, including their status and metadata. ```APIDOC ## Get all backups ### Description Retrieve a list of all backups for the authenticated user, including their status and metadata. ### Method GET ### Endpoint /backups ### Response #### Success Response (200) - **backups** (array) - A list of all backups. - **id** (string) - **userId** (string) - **assetId** (string, nullable) - **createdAt** (string) - **size** (number) - **bookmarkCount** (number) - **status** (string, enum: pending, success, failure) - **errorMessage** (string, nullable) ### Response Example ```json { "backups": [ { "id": "backup-123", "userId": "user-abc", "assetId": null, "createdAt": "2023-10-27T10:00:00Z", "size": 1024, "bookmarkCount": 5, "status": "success", "errorMessage": null } ] } ``` #### Error Response (401) - **Unauthorized** (string) - The Bearer token is missing, invalid, or expired. ### Error Response Example ```text Unauthorized ``` ``` -------------------------------- ### Get bookmarks with a tag Source: https://github.com/karakeep-app/karakeep/blob/main/docs/docs/api/get-tag-bookmarks.api.mdx Retrieve a paginated list of all bookmarks that have the specified tag attached. ```APIDOC ## GET /tags/{tagId}/bookmarks ### Description Retrieve a paginated list of all bookmarks that have the specified tag attached. ### Method GET ### Endpoint /tags/{tagId}/bookmarks ### Parameters #### Path Parameters - **tagId** (string) - Required - The ID of the tag to filter bookmarks by. #### Query Parameters - **page** (integer) - Optional - The page number for pagination. Defaults to 1. - **pageSize** (integer) - Optional - The number of items per page. Defaults to 20. ```