npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@intent-driven/cli

v1.23.9

Published

Intent-Driven Frontend — CLI для bootstrap новых доменов через LLM-диалог

Readme

@intent-driven/cli

CLI для bootstrap новых доменов в парадигме Intent-Driven Frontend через интерактивный LLM-диалог.

Установка и запуск

Без установки, через npx:

ANTHROPIC_API_KEY=sk-ant-... npx @intent-driven/cli init my-domain

Или глобально:

npm install -g @intent-driven/cli
export ANTHROPIC_API_KEY=sk-ant-...
idf init my-domain

API-ключ Claude получить: https://console.anthropic.com/

Что делает idf init <name>

Ведёт короткий диалог из 5 шагов:

  1. Описание домена — 1-2 предложения от тебя.
  2. Сущности — Claude предлагает 3-7 ключевых entity на основе описания.
  3. Роли — Claude предлагает 1-3 роли с base (owner / viewer / agent / observer).
  4. Намерения — Claude выводит 8-15 атомарных интентов; ты multiselect-ом оставляешь нужные.
  5. Генерация — пишет файлы и валидирует через crystallizeV2.

На выходе — каталог <name>/ с готовой стартовой структурой:

<name>/
  domain.js                  ─ ontology + intents + projections
  seed.js                    ─ начальный мир для smoke-тестов
  test/crystallize.test.js   ─ vitest-проверки
  package.json               ─ зависимости (@intent-driven/core, vitest)
  README.md                  ─ описание домена

После cd <name> && npm install && npm test — всё должно зеленеть.

Опции

idf init <name> [options]

  -m, --model     LLM-модель: haiku | sonnet | opus  (default: sonnet)
  -o, --out       Каталог для генерации               (default: ./<name>)
  -h, --help
  -v, --version

Модели:

  • haiku (Claude Haiku 4.5) — самая быстрая и дешёвая, для простых доменов
  • sonnet (Claude Sonnet 4.6) — баланс качества и скорости (default)
  • opus (Claude Opus 4.6) — лучшее качество для сложных domain'ов

Подключение сгенерированного домена к прототипу

В клонированном DubovskiyIM/idf:

  1. Скопируй каталог <name>/ в src/domains/<name>/.
  2. Зарегистрируй в src/prototype.jsx как новый пункт переключателя:
    import myDomainDef from "./domains/my-domain/domain.js";
    import myDomainSeed from "./domains/my-domain/seed.js";
    // … добавить в DOMAINS / SEEDS map
  3. npm run dev — твой домен станет доступен через переключатель в шапке.

Что считается «сгенерированным»

CLI не угадывает бизнес-логику. То, что он генерирует — каркас, который:

  • Проходит crystallizeV2 без ошибок.
  • Имеет corretные типы полей (money, datetime, boolean, entityRef выводятся из имён).
  • Имеет правильную структуру particles в каждом intent'е.
  • Генерирует базовый набор catalog+detail проекций для каждой non-reference entity.

Что не генерируется автоматически:

  • Условия (conditions) — нужно добавить вручную, Claude их не выводит без знания бизнес-правил.
  • Кастомные projections — dashboard, wizard, canvas (только catalog/detail из коробки).
  • Многосущностные effects (например, batch-изменения) — простые add/replace/remove.

После генерации домен — стартовая точка для итеративной правки.

idf import

Импорт схемы из внешних источников в IDF-ontology.

idf import prisma

idf import prisma --file schema.prisma --out src/domains/api/ontology.js

idf import openapi

idf import openapi --file openapi.yaml --out src/domains/api/ontology.js

idf import postgres

idf import postgres --url postgresql://user:pass@localhost/mydb --out src/domains/api/ontology.js

idf import nestjs-typeorm

Сканирует NestJS+TypeORM проект (*.entity.ts + *.controller.ts) и генерирует ontology.

idf import nestjs-typeorm --src ./src --out src/domains/api/ontology.js
idf import nestjs-typeorm --src ./apps/backend/src --no-guards

Флаги:

  • --src <dir> (required) — root user-проекта для рекурсивного скана
  • --out <file> (default src/domains/default/ontology.js)
  • --name <name> — domain name (default default)
  • --no-guards — отключить Guards → roles mapping
  • --tsconfig <path> (optional) — путь к tsconfig.json (default: auto-detect в src/)

v0.2: extracts @Param/@Body/@Query параметры из Nest handler'ов в intent.parameters. Резолвит DTO-классы и enum-references по relative imports + tsconfig compilerOptions.paths.

Скоп v1.0

В этой версии — только команда init. В планах для следующих минорных:

  • idf add intent <name> — добавить намерение к существующему домену
  • idf validate <path> — прогон conformance-тестов из spec
  • Поддержка не-Anthropic LLM (OpenAI, локальные)

Issues / feature requests: https://github.com/DubovskiyIM/idf-sdk/issues

Лицензия

MIT.