dev-env
БесплатноБез исполняемых скриптовНе проверенRun the Karakeep dev environment (web + workers) inside a git worktree and log in as a seeded user. Use when asked to start/run the app, verify a change in…
от karakeep-app★ 30 982 звезды на GitHubОб этом скилле
Running the Karakeep dev env in a worktree
Many worktrees run on this machine at the same time, often each with its own dev server. pnpm dev:worktree (scripts/dev-worktree.sh) handles the resulting conflicts. Use it rather than pnpm web / pnpm workers.
1. Start it
Run from the worktree root, in the background (it doesn't return until stopped):
# run_in_background: true
pnpm dev:worktree >| $TMPDIR/karakeep-$(basename $PWD)-dev.out 2>&1
Then wait for it to report readiness:
for i in $(seq 1 150); do grep -qE "is ready|exited|didn't become" $TMPDIR/karakeep-$(basename $PWD)-dev.out && break; sleep 2; done; tail -20 $TMPDIR/karakeep-$(basename $PWD)-dev.out
The script:
- Sets up only the pieces that are missing: runs
pnpm install, writes.env(randomNEXTAUTH_SECRET, absoluteDATA_DIR), symlinks.envintoapps/web,apps/workersandpackages/db, and applies the seed snapshot intodata/. - Migrates the main DB and the queue DB. The seed snapshot is older than HEAD, so this always runs.
- Picks the first free port in 3100–3199 and sets
NEXTAUTH_URLto match. - Starts the workers, then
next devwithWATCHPACK_POLLING=true, and waits until/signinreturns 200. - Prints the URL, the seed users, and the log paths (
$TMPDIR/karakeep-dev-<worktree>/{web,workers}.log).
Overrides: PORT=3105, DEV_HOST=<host> (see step 3), and WATCHPACK_POLLING=false. pnpm dev:worktree setup does steps 1–2 without starting anything.
Web changes hot-reload. Worker changes don't: restart the script.
2. Stop it
Stop the background task (TaskStop). The script stops both services on exit. Don't touch processes from other worktrees; to check which worktree owns a process, run lsof -a -p <pid> -d cwd.
3. Log in
Seed users (all share the password test1234):
| Role | Data | |
|---|---|---|
[email protected] |
admin | 24 bookmarks (links, notes, an image, a PDF), highlights, rules, prompts, a feed, a webhook; shares "Reading Queue" |
[email protected] |
user | 7 bookmarks (incl. an import session), editor on test1's "Reading Queue" |
[email protected] |
user | empty, with a pending invite to "Reading Queue" |
Login flow with any browser automation tool:
- Navigate to
http://localhost:$PORT/signin. - Type the email into
input[type='email']and the password intoinput[type='password'], then press Enter. - Wait for the URL to contain
/dashboardand the page to showSeed snapshot bookmark.
Browser gotchas:
- The browser must use the host in
NEXTAUTH_URL. If your browser tool reaches the app through something other thanlocalhost, such as a LAN IP likehttp://10.0.10.13:3100, restart withDEV_HOST=<that host>. Otherwise sign-in goes to the wrong place, and Next blocks HMR and fonts for that origin. The same applies to127.0.0.1. - Cookies are per host, not per port. Worktrees share cookies. With the per-worktree random secret, another worktree's session cookie is rejected: you land on
/signin, and the web log showsJWT_SESSION_ERRORuntil you log in. That's expected. If.envhas a shared secret such astest1234, another worktree's session is valid on yours, so open/logoutfirst. - The dashboard's accessibility tree is large. If your screenshot tool returns it with the image, save the snapshot to a file and read only the PNG.
4. Not running in dev
- Meilisearch: without
MEILI_ADDR, search is disabled. Start it withdocker run -p 7700:7700 getmeili/meilisearch:v1.55.0and setMEILI_ADDR=http://127.0.0.1:7700only if you need search. Port 7700 may already belong to another worktree's container. - Crawling: the workers run in "browserless mode" with no
BROWSER_WEB_URL. The seed data is already crawled, so this only matters for newly added links. - Inference: no
OPENAI_API_KEY, so no auto-tagging.
5. Troubleshooting and running pieces by hand
listen EPERM ... tsx-*/*.pipe: the baretsxCLI opens an IPC socket that the Claude Code sandbox blocks. Run the file through node's loader instead, e.g.(cd packages/db && node --import tsx migrate.ts). The repo's package scripts (pnpm db:migrate,pnpm seed:apply, …) already do this.EMFILE: too many open files, watch: native file watching is blocked in the sandbox. Fornext devthis shows up as.next/dev"was deleted" and endless restarts; keepWATCHPACK_POLLING=true.pnpm workers(node --watch) fails the same way; usepnpm dev:worktree, which runs the workers without watching.- A stray
packages/db/db.db: migrations ran with an emptyDATA_DIR. Scripts mustimport "dotenv/config"before@karakeep/shared/config, which parsesprocess.envat import time. Delete the stray file and re-run. - Jobs never run / queue errors:
queue.dbneedspnpm db:migrate:queue(or(cd apps/workers && node --import tsx scripts/migrateQueue.ts)). The workers also migrate it on startup; the
Установить dev-env в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dev-env?
Run the Karakeep dev environment (web + workers) inside a git worktree and log in as a seeded user. Use when asked to start/run the app, verify a change in the browser, take a screenshot of the web UI, or when the dev server fails to boot (port conflicts, login redirects to another worktree, stale migrations, EMFILE watcher loops, tsx EPERM).
Как установить скилл dev-env?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-env запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic