Developer tools and editor integrations
theSVG brings its brand and UI icon catalogs into developer tools so engineers can find an icon and move it into code or design work without leaving the task. The integrations share a catalog-and-asset model: a small index supports search and metadata views, while the selected SVG is copied, inserted, embedded by URL, or turned into a native design object.
Integration surface
The integration surface covers two related paths. API-oriented tools support scripts and AI clients. Interactive integrations adapt search and copy or insert actions to an editor, launcher, browser, or design canvas.
| Workflow | Main result | Child page |
|---|---|---|
| Command line | Search, list, and add brand or UI SVG files and framework-ready files to a project | CLI and MCP tools |
| AI-assisted work | Search catalog data, inspect variants or UI looks, fetch SVG markup, or obtain a CDN URL through MCP | CLI and MCP tools |
| Code editors | Search from VS Code or Neovim and copy or insert SVG content or a CDN URL | Editor, launcher, and browser extensions |
| Launchers | Find an icon from Raycast or Alfred and copy SVG, URL, or related markup | Editor, launcher, and browser extensions |
| Browser | Search from a Chrome, Firefox, or Edge popup and copy SVG, URL, or Markdown | Editor, launcher, and browser extensions |
| Design tools | Search and place an editable vector in Figma | Editor, launcher, and browser extensions |
| Package managers | Install the CLI through npm or Homebrew, or install catalog, flag, and framework packages through npm | CLI and MCP tools |
The package build path is described in Icon package builds. These tools are separate distribution units rather than one shared runtime. They still depend on shared catalog concepts: a stable icon slug identifies an asset, brand variant names select alternate marks, and UI look names select alternate UI marks. References: src/…/generate-api.ts• L1-15, packages/…/api.ts• L1-6, packages/…/ui.ts• L6-29, packages/…/index.ts• L9-17, packages/…/ui.ts• L6-30, extensions/…/main.ts• L1-10
Catalog and asset access
The brand catalog is published as static data for consumers that need to search without downloading every SVG. It carries the icon title, slug, aliases, categories, brand color, license, and available variants. The UI catalog is a separate index with UI icon titles, slugs, categories, tags, sets, release dates, and supported looks. Generated registry and category files give external tools a compact view of this data. References: src/…/generate-api.ts• L24-37, src/…/generate-api.ts• L48-85, packages/…/api.ts• L17-34, packages/…/ui.ts• L13-29, packages/…/ui.ts• L15-30
The selected asset follows one of two access patterns. A tool can fetch raw SVG text for local use, or it can return a direct URL for later embedding. The CLI validates and caches the brand registry for its process, then fetches the selected brand SVG before it writes a file. A UI command loads the UI index only when needed and then fetches the selected look data. The MCP package bundles its brand search index at build time, while UI requests load a separate index on demand. Raw SVG retrieval needs network access. References: packages/…/api.ts• L86-124, packages/…/api.ts• L232-263, packages/…/ui.ts• L53-90, packages/…/ui.ts• L140-179, packages/…/README.md• L32-42, packages/…/index.ts• L55-84, packages/…/ui.ts• L59-91
Flags are a shared catalog category with a separate package boundary. Search results can identify a flag by its slug, but the CLI and MCP responses point developers to @thesvg/flags for package installation and per-flag React imports instead of the generic icon packages. References: packages/…/flag-hint.ts• L1-10, packages/…/search.ts• L187-192, packages/…/add.ts• L187-188, packages/…/flag-hint.ts• L1-21, packages/…/index.ts• L210-212, packages/…/index.ts• L304-306
The catalog and SVG files are version-sensitive external contracts. Brand consumers must use a listed variant and a matching asset path. UI consumers must use a listed look and its matching path. The brand MCP path is pinned to a release, while UI tools read the UI index from the moving main source, so the two data sets do not refresh in the same way. References: extensions/…/App.tsx• L17-26, packages/…/index.ts• L10-17, packages/…/ui.ts• L6-10, extensions/…/main.ts• L175-183
The following diagram shows the common path from a user request to a local or remote result.
flowchart LR
A[User query] --> B[Integration search]
B --> C{Catalog kind}
C --> D[Brand index]
C --> E[UI index]
D --> F[Slug and variant]
E --> G[Slug and look]
F --> H{Output need}
G --> H
H --> I[Fetch SVG]
H --> J[Build CDN or site URL]
H --> K[Build framework or markup form]
I --> L[Clipboard, file, editor, or Figma node]
J --> L
K --> L
Command-line and AI workflows
The command-line interface gives a project-facing path from catalog discovery to checked-in assets. search finds brand icons by name, slug, or keyword, while list shows the brand catalog or a category. With --ui, both commands work against the UI catalog. add writes selected assets as SVG, JSX, or Vue output with a chosen brand variant or UI look. Flag results add a hint for the separate @thesvg/flags package so developers do not treat flags as part of the generic icon package. The CLI is distributed as @thesvg/cli version 0.8.2 with the thesvg executable. Its catalog and asset requests report network, HTTP, invalid-data, and missing-asset errors as one CLI error type, so a successful search does not hide a later fetch failure. References: packages/…/README.md• L16-18, packages/…/README.md• L20-32, packages/…/README.md• L34-147, packages/…/package.json• L1-5, packages/…/CHANGELOG.md• L3-9, packages/…/add.ts• L103-188, packages/…/list.ts• L40-84, packages/…/search.ts• L39-69, packages/…/flag-hint.ts• L1-10
The CLI chooses a project-friendly output directory when the user does not set one. It can save raw SVG files or wrap a brand asset as a typed React component or Vue single-file component. UI assets use a separate ui: name space, support seven named looks, and receive a ui- file prefix so they cannot replace a brand file with the same name. The current package requires Node.js 18 or later. References: packages/…/README.md• L36-88, packages/…/README.md• L107-145, packages/…/package.json• L24-26, packages/…/package.json• L42-43, packages/…/add.ts• L78-100, packages/…/ui.ts• L123-179
The MCP server makes the same catalog useful to AI-assisted tools that speak Model Context Protocol. It exposes icon search, icon detail, variant discovery, URL creation, and category discovery for Claude Desktop, Cursor, Claude Code, and other MCP-aware clients without an API key. Every tool keeps brand as the default kind and can select ui; UI requests use looks instead of brand variants. Flag results add package and import guidance for @thesvg/flags, while ordinary brand results keep the generic icon workflow. The published server is @thesvg/mcp-server version 0.9.2 and provides the thesvg-mcp executable. Brand search and URL queries work from the bundled index, while UI requests load and cache their separate index. Raw SVG retrieval needs network access. References: packages/…/README.md• L16-42, packages/…/README.md• L44-126, packages/…/package.json• L1-5, packages/…/package.json• L27-29, packages/…/package.json• L51-53, packages/…/CHANGELOG.md• L3-9, packages/…/flag-hint.ts• L1-21, packages/…/index.ts• L127-167, packages/…/index.ts• L195-212, packages/…/index.ts• L284-306, packages/…/index.ts• L417-438, packages/…/ui-tools.ts• L37-135
For the hosted MCP service and its widget-based use, see MCP worker service and widget. The hosted HTTPS service is maintained as a separate Cloudflare Worker package for clients that use a remote MCP endpoint. The package and framework exports provide a build-time alternative to fetching assets during a tool action. The package set exposes raw icon data through @thesvg/icons and typed components for React, React Native, Vue, and Svelte. The thesvg package provides a general package entry over the icon data, while the framework packages target their own host runtimes. These are separate npm products with host-framework requirements, so applications can use local assets without a runtime CDN request. Per-icon imports keep an application focused on the icons it uses. References: packages/…/package.json• L1-5, packages/…/README.md• L24-47, packages/…/README.md• L75-110, packages/…/package.json• L27-52, packages/…/package.json• L1-5, packages/…/package.json• L33-45, packages/…/README.md• L7-18, packages/…/package.json• L29-55, packages/…/README.md• L7-17, packages/…/README.md• L7-15, packages/…/package.json• L1-5
Editor and launcher workflows
Editor integrations place catalog search beside the code that will use the result. VS Code supports search, variant choice, SVG or JSX copy, CDN link copy, direct insertion, and a copied CLI command. Neovim supports a picker through Telescope or its built-in selection UI. It inserts either a CDN URL or inline SVG at the captured cursor location. References: extensions/…/README.md• L1-32, extensions/…/extension.ts• L188-249, extensions/…/extension.ts• L265-307, extensions/…/README.md• L3-12, extensions/neovim/lua/thesvg/picker.lua#L76-L101
The editor tools balance a fast local search view with delayed asset retrieval. VS Code caches the registry after it loads. Neovim caches the registry with a time limit and keeps a small popular-icon fallback when the network is down. Inline insertion is delayed until the SVG fetch completes, while URL insertion does not need that fetch. References: extensions/…/extension.ts• L22-60, extensions/…/README.md• L93-101, extensions/neovim/lua/thesvg/cache.lua#L1-L120, extensions/neovim/lua/thesvg/http.lua#L33-L57
Raycast and Alfred turn the same actions into launcher commands. Raycast offers a searchable list with category filters, previews, variant-aware copy actions, detail views, and a quick-copy command. Alfred uses a Script Filter to return ranked results and modifier keys to choose raw SVG, CDN URL, or Markdown output. References: extensions/…/README.md• L1-45, extensions/…/search-icons.tsx• L30-85, extensions/…/search-icons.tsx• L88-219, extensions/…/README.md• L27-41, extensions/…/thesvg_search.py• L82-122, extensions/…/thesvg_action.py• L48-79
Browser and design-tool workflows
The browser extension provides a small popup for quick asset retrieval while a user works in a browser. It caches the registry for 24 hours and offers SVG, CDN URL, and Markdown clipboard output. Its permissions are limited to local storage, clipboard writes, and jsDelivr access. References: extensions/…/README.md• L1-5, extensions/…/README.md• L34-42, extensions/…/App.tsx• L33-68, extensions/…/App.tsx• L118-139
The Figma plugin changes the final target from text or clipboard data to an editable vector node. It searches and filters the catalog in the plugin UI, fetches the selected SVG in the plugin's main context, and creates the node on the current page. It also records the last twelve inserted icon and variant pairs for reuse. References: extensions/…/README.md• L1-17, extensions/…/main.ts• L90-183, extensions/…/main.ts• L186-207, extensions/…/main.ts• L221-263
Both integrations use jsDelivr as their asset source. This keeps their runtime path independent of the website, but it makes the CDN registry and public icon paths important shared contracts. References: extensions/…/README.md• L34-42, extensions/…/README.md• L15-17, extensions/…/manifest.json• L7-12, extensions/…/main.ts• L1-10
Distribution boundaries
Each external workflow has its own host rules, cache policy, and release boundary. The boundary affects how quickly catalog changes appear and which failures a user can recover from locally.
| Surface | Distribution or host | Catalog behavior | Asset behavior |
|---|---|---|---|
| CLI | npm package and Homebrew formula | Fetches the public brand registry; fetches the UI index only for UI commands; identifies flags as a separate package | Fetches the chosen brand SVG or UI look data before writing it |
| MCP | npm package run by an MCP client | Bundles the brand registry; loads the UI index lazily; identifies flags as a separate package | Fetches selected brand SVG content from a pinned CDN release or selected UI content from the UI source |
| VS Code | VS Code extension package | Caches the registry after first load | Fetches direct SVG or returns a jsDelivr URL |
| Neovim | Plugin files | Caches the registry for a configured time | Inserts a URL or fetches inline SVG asynchronously |
| Raycast | Raycast extension | Caches registry requests through the extension utility | Fetches detail variants or returns URLs |
| Alfred | Alfred workflow | Caches registry for six hours and can use stale data | Fetches SVG or copies a URL or Markdown form |
| Browser | Chrome, Firefox, and Edge extension builds | Stores the registry for 24 hours | Fetches SVG or copies a URL or Markdown form |
| Figma | Figma plugin | Loads catalog data in the plugin runtime | Fetches SVG and creates an editable vector |
| npm packages | @thesvg/icons and framework packages | Catalog data is packaged with the selected package | SVG data or framework component is local to the application |
These boundaries mean a new icon or variant does not reach every consumer at the same time. Static-package consumers need a rebuild or package release. Live-CDN consumers depend on cache refresh and path stability. The latest CLI release is 0.8.2. The latest MCP server release is 0.9.2. Flags are shared in the catalog but remain outside the generic icon and framework packages, so their package release is a separate distribution path. The framework package releases are separate from the tool releases: @thesvg/icons, @thesvg/react, @thesvg/vue, and @thesvg/svelte are at 3.3.9, while @thesvg/react-native is at 3.3.0. UI data read from main can change separately from the bundled brand data in a published MCP package. References: packages/…/package.json• L1-5, packages/…/CHANGELOG.md• L3-9, packages/…/package.json• L1-5, packages/…/CHANGELOG.md• L3-9, packages/…/README.md• L32-42, packages/…/ui.ts• L6-10, packages/…/package.json• L1-5, packages/…/package.json• L1-5, packages/…/package.json• L1-5, packages/…/package.json• L1-5, packages/…/package.json• L1-5, packages/…/package.json• L1-5, extensions/…/README.md• L21-25, extensions/…/README.md• L34-42, extensions/…/README.md• L15-17, packages/…/README.md• L104-119
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the brand registry shape, UI index shape, variant names, look names, and public asset paths aligned with CLI, MCP, browser, editor, launcher, and Figma consumers.
- When changing CDN version or branch references, update the consumers that must resolve catalog metadata and SVG files from the same data set. Check the separate
main-based UI path as well as the pinned brand path. - When adding a new output form, keep its slug-to-asset and variant or look fallback rules consistent with the CLI, editor, launcher, and package workflows.
- When changing package names or executable names, update npm usage, Homebrew formula input, MCP client setup, and editor actions together.
- When changing the CLI or MCP package release, check its Node.js engine contract and the published executable name used by setup instructions.
- When changing a catalog or framework package release, check its generated catalog or component output and its host-framework peer contract.
- When changing cache policy or offline behavior, check each host's permissions and fallback path rather than assuming browser, editor, launcher, design-tool, CLI, and MCP runtimes behave alike.
- Keep UI failures isolated from brand operations. A missing UI index or look file must not make the brand registry unavailable.
- Keep flag guidance aligned with the separate
@thesvg/flagspackage and its per-flag import paths in both CLI output and MCP responses.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Catalog variant or UI look key does not match the public asset path | A tool shows an icon but cannot fetch the selected asset | Resolve and validate the available variant or look before building the asset URL |
| A moving registry or CDN path changes shape | Installed extensions can fail to load or map old entries | Treat registry fields and paths as versioned external contracts |
| Network access fails during a selected-asset fetch | Copy, inline insertion, file writing, or Figma insertion fails after search succeeds | Keep local catalog search separate from asset fetch and report the fetch error clearly |
| The UI index is unavailable | UI search, listing, or retrieval fails while brand operations remain usable | Keep UI loading lazy and return a UI-specific error without touching brand state |
| An unknown UI look is requested | The tool cannot build or fetch the requested UI asset | Validate against the index's supported looks and show the valid list |
| The CLI receives an unavailable, malformed, or unexpected registry response | Search and list actions stop instead of using data that may not match the catalog contract | Validate the response before caching it and expose a clear CLI error |
| A package bundles an older catalog | New icons or variants are absent from AI, package, or local search | Rebuild or release the package when the catalog data set changes |
| A flag is treated as a generic icon package member | Developers install the wrong package or use an invalid import path | Keep the CLI and MCP flag hints pointed at @thesvg/flags |
| A framework package is used below its peer-framework range | The local component path can fail during install, type check, or runtime use | Match the package to its declared React, React Native, React Native SVG, Vue, or Svelte peer version |
| The Figma plugin cannot reach its allowed CDN domain | Search or vector insertion cannot load remote catalog or SVG data | Keep Figma network permissions aligned with the CDN source |
| A client uses a package with an unsupported Node.js version | The CLI or MCP process cannot run | Use Node.js 18 or later for the published packages |
Key files
| File | Why to read it |
|---|---|
| src/…/generate-api.ts | Defines the static brand registry and category outputs used by external consumers. |
| packages/…/README.md | Shows the project-facing command-line workflow, UI icon workflow, and supported output forms. |
| packages/…/package.json | Defines the CLI package identity, executable, release boundary, and Node.js requirement. |
| packages/…/api.ts | Shows how CLI consumers validate brand catalog data and map entries to SVG paths. |
| packages/…/flag-hint.ts | Shows how CLI results identify flags as a separate package workflow. |
| packages/…/ui.ts | Defines the separate UI index, look model, lazy loading, and UI asset access path. |
| packages/…/add.ts | Connects brand and UI selection to project files without allowing same-name overwrites. |
| packages/…/README.md | Describes the AI-assisted tool surface and its brand and UI data freshness model. |
| packages/…/package.json | Defines the MCP package identity, executable, build-time catalog copy, release boundary, and Node.js requirement. |
| packages/…/flag-hint.ts | Shows how MCP answers guide flag users to the separate package and import path. |
| packages/…/index.ts | Defines the MCP capabilities and the default brand versus UI routing. |
| packages/…/ui.ts | Defines UI index loading, search data, supported looks, and UI URL construction. |
| packages/…/ui-tools.ts | Connects UI catalog actions to MCP results and isolated error responses. |
| packages/…/package.json | Defines the separate remote HTTPS MCP service boundary and Cloudflare Worker host. |
| packages/…/package.json | Defines the local catalog package boundary and its import forms. |
| packages/…/package.json | Defines the general npm package entry that depends on the local icon package. |
| packages/…/package.json | Defines the React component package boundary and its host-framework contract. |
| packages/…/package.json | Defines the React Native component package boundary and its host-framework contract. |
| packages/…/package.json | Defines the Vue component package boundary and its host-framework contract. |
| packages/…/package.json | Defines the Svelte component package boundary and its host-framework contract. |
| extensions/…/extension.ts | Shows the editor search, variant, copy, and insertion flow. |
extensions/neovim/lua/thesvg/picker.lua | Shows URL and inline insertion behavior in Neovim. |
| extensions/…/search-icons.tsx | Shows launcher search, details, and output actions. |
| extensions/…/thesvg_search.py | Shows launcher result ranking and cache behavior for Alfred. |
| extensions/…/App.tsx | Shows the browser popup search and clipboard output flow. |
| extensions/…/main.ts | Shows catalog loading, remote SVG retrieval, and editable vector insertion. |
| packages/…/README.md | Shows the local package data model and CDN alternative. |
| packages/…/README.md | Shows the typed React component consumption path. |