iconseek
v0.0.0
Published
Semantic icon search utilities and generation pipeline for Iconify icon sets.
Maintainers
Readme
iconseek
Node.js utilities for generating searchable semantic metadata for Iconify icon sets.
Install
npm install iconseekyarn add iconseekpnpm add iconseekUsage
Configure and run the semantic generation pipeline from Node.js:
import {
DEFAULT_SEMANTIC_LOCALES,
IconifyProvider,
OpenAICompatibleSemanticGenerator,
runSemanticPipeline,
} from 'iconseek'
const summary = await runSemanticPipeline({
provider: new IconifyProvider({
iconSetDir: 'data/raw/iconify',
}),
generator: new OpenAICompatibleSemanticGenerator({
apiKey: process.env.OPENAI_API_KEY!,
model: process.env.ICONSEEK_AI_MODEL ?? 'gpt-5.5',
}),
options: {
provider: 'iconify',
collections: ['mdi', 'lucide', 'tabler'],
locales: [...DEFAULT_SEMANTIC_LOCALES],
concurrency: 2,
dryRun: false,
force: false,
forceMissingLocales: false,
cachePath: 'data/semantic/iconify.ndjson',
reportDir: 'data/reports/semantic-generation',
reportFormats: ['markdown', 'json'],
},
})
console.log(summary)Use local SVG files with a local Ollama vision model:
import {
DEFAULT_SEMANTIC_LOCALES,
OllamaSemanticGenerator,
SvgDirectoryProvider,
runSemanticPipeline,
} from 'iconseek'
await runSemanticPipeline({
provider: new SvgDirectoryProvider({
iconDir: 'icons',
collection: 'app',
}),
generator: new OllamaSemanticGenerator({
model: 'llava:latest',
}),
options: {
provider: 'svg-directory',
collections: ['app'],
locales: [...DEFAULT_SEMANTIC_LOCALES],
concurrency: 1,
dryRun: false,
force: false,
forceMissingLocales: false,
cachePath: 'data/semantic/app-icons.ndjson',
reportDir: 'data/reports/semantic-generation',
reportFormats: ['markdown', 'json'],
},
})Generate Iconify semantics locally
Copy .env.local.example to .env.local and fill in the model settings:
OPENAI_API_KEY=sk-...
ICONSEEK_AI_MODEL=gpt-...
ICONSEEK_LIMIT=5Then run:
pnpm run generate:iconifyThe script reads .env.local, loads Iconify JSON files from
data/raw/iconify, and writes commit-ready semantic output to:
data/semantic/iconify.ndjson
data/reports/semantic-generation/latest.md
data/reports/semantic-generation/latest.json