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

@refactor-ai/csharp-format

v0.1.4

Published

Format a C# file with the Roslyn Formatter API.

Readme

@refactor-ai/csharp-format

Format a C# file with the Roslyn Formatter API.

Use Node.js 22+ and npm. Bun and a source checkout are unnecessary. C# also requires the .NET 8 SDK, the project's required SDK/workloads and restored project dependencies. The bundled Roslyn helper builds on first C# use; initial NuGet restore needs network access and a writable package/cache directory. This package has no install lifecycle scripts.

npx @refactor-ai/csharp-format --help
npx @refactor-ai/csharp-format plan --help
npx @refactor-ai/csharp-format plan --project examples/csharp/Caller.csproj --file examples/csharp/Utility.cs

Replace example paths with your project paths. Planning leaves sources untouched and returns a saved plan path. Preview and validate it, then apply that exact plan:

npx @refactor-ai/csharp-format preview --plan ./path/to/plan.json
npx @refactor-ai/csharp-format validate --plan ./path/to/plan.json
npx @refactor-ai/csharp-format apply --plan ./path/to/plan.json

Or install with npm install --save-dev @refactor-ai/csharp-format and run npx refactor-csharp-format --help. Only format can be planned by this tool. Plans use snapshots, compiler diagnostics and journaled writes. Validation does not run project tests. Full options, language support, limitations and examples are available in --help.

Built from refactor-ai 0.1.4. Third-party diff license: licenses/diff.txt.

Programmatic use

Importing the package does not execute the CLI, load a project or build the C# helper. createRefactor() returns an object with plan(options), preview(plan), validate(plan), apply(plan), loadPlan(path) and capabilities(project). Methods return objects and reject with Errors rather than printing CLI output. TypeScript declarations are included.

import { createRefactor } from "@refactor-ai/csharp-format";
const refactor = await createRefactor();
const supported = await refactor.capabilities("./App.csproj");

This API plans only format; omit operation in plan options. Read API.md for the complete interface, source-change workflow, coordinate conventions, language requirements and automation examples.