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

@vilancer/filelinks

v1.0.3

Published

CLI for filelinks: check staged git file-links and optionally run Cursor AI agents (--run-agents). filelinks add creates config if missing. Install with @vilancer/filelinks-core.

Readme

@vilancer/filelinks

filelinks declares semantic relationships between files in a git repo (for example “when this route changes, keep the OpenAPI spec in sync”), then checks staged changes against those links.

This package is the CLI (filelinks binary). Pair it with @vilancer/filelinks-core — your filelinks.config.ts imports defineLinks from core.

What it does

  1. Declare links in TypeScript config (triggeraffects)
  2. filelinks check — report missing companions for staged files (warn/error exit codes)
  3. filelinks check --run-agents — optionally run Cursor AI agents to update linked files when a link’s agent policy matches
  4. filelinks list / filelinks add — inspect links, or use the interactive wizard to create filelinks.config.ts if it does not exist (or append a link if it does), including agent/model setup

AI agents (Cursor)

Opt-in agent runs use the Cursor provider:

export CURSOR_API_KEY=...   # or --cursor-api-key / .env.local
filelinks check --run-agents

Configure agents in config (global defaults and/or per link):

import { defineLinks } from '@vilancer/filelinks-core';

export default defineLinks(
  [
    {
      trigger: 'apps/api/src/routes/user.ts',
      affects: [
        { file: 'apps/api/docs/openapi.yaml', reason: 'Keep OpenAPI in sync' },
      ],
      agent: {
        provider: 'cursor',
        runtime: 'local', // or 'cloud' + cloud.repos
        model: 'composer-2.5',
        runPolicy: 'trigger-only', // or 'trigger-or-affects'
        local: { cwd: '.' },
      },
    },
  ],
  {
    agent: {
      provider: 'cursor',
      runtime: 'local',
      model: 'composer-2.5',
      local: { cwd: '.' },
    },
  },
);
  • Auth: --cursor-api-keyCURSOR_API_KEY env → .env.local / .env under --cwd
  • Policies: trigger-only (default) or trigger-or-affects
  • Runtimes: local (+ cwd) or cloud (+ repos)
  • Wizard: filelinks add can set agent defaults, models, and prompts interactively

Install

pnpm add -D @vilancer/filelinks @vilancer/filelinks-core
# or: npm install --save-dev @vilancer/filelinks @vilancer/filelinks-core

Quick start

No config yet? Run the wizard — it creates filelinks.config.ts for you:

filelinks add

Or write the file yourself:

// filelinks.config.ts
import { defineLinks } from '@vilancer/filelinks-core';

export default defineLinks([
  {
    trigger: 'apps/api/src/routes/user.ts',
    affects: [
      { file: 'apps/api/docs/openapi.yaml', reason: 'Keep OpenAPI in sync' },
    ],
    severity: 'warn',
  },
]);
filelinks list
filelinks check
filelinks check --run-agents
filelinks add    # also works when the config already exists (adds another link)

Related package

| Package | npm | Role | |---------|-----|------| | @vilancer/filelinks (this) | npm | CLI binary | | @vilancer/filelinks-core | npm | defineLinks, matching, agent helpers |

Full docs: github.com/Vilancer/filelinks.