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

@farcaster/miniapp-codemods

v1.0.0

Published

Codemods to help migrate from Farcaster Frames to MiniApps

Readme

Farcaster Frames to Mini Apps Migration Codemods

This package provides automated codemods to help migrate your codebase from Farcaster Frames to Mini Apps.

Warnings

This tool might make mistakes. Make sure you are working from a clean, committed branch and have backed up your project.

Installation

npm install -g @farcaster/miniapp-codemods

Or run directly with npx:

npx @farcaster/miniapp-codemods <path-to-your-project>

Usage

Basic usage

Run all codemods on your project:

miniapp-migrate ./src

Dry run mode

Preview changes without modifying files:

miniapp-migrate ./src --dry-run

Run specific transform

Run only a specific transformation:

miniapp-migrate ./src --transform update-imports

Available transforms

  • update-imports - Updates package imports from @farcaster/frame-* to @farcaster/miniapp-*
  • update-api-methods - Updates API method names (e.g., frameHostminiAppHost)
  • update-types - Updates TypeScript type names (e.g., FrameContextMiniAppContext)
  • update-event-names - Updates event names (e.g., frame_addedminiapp_added)

What gets migrated

1. Package imports

- import { frameHost } from '@farcaster/frame-sdk'
+ import { miniAppHost } from '@farcaster/miniapp-sdk'

- import { FrameContext } from '@farcaster/frame-core'
+ import { MiniAppContext } from '@farcaster/miniapp-core'

2. API methods

- const context = await frameHost.getFrameContext()
+ const context = await miniAppHost.getMiniAppContext()

- frameHost.addFrame({ url: 'https://example.com' })
+ miniAppHost.addMiniApp({ url: 'https://example.com' })

3. TypeScript types

- const context: FrameContext = { ... }
+ const context: MiniAppContext = { ... }

- export interface MyFrameHost extends FrameHost { ... }
+ export interface MyMiniAppHost extends MiniAppHost { ... }

4. Event names

- sdk.on('frame_added', handler)
+ sdk.on('miniapp_added', handler)

- if (event.type === 'frame_removed') { ... }
+ if (event.type === 'miniapp_removed') { ... }

5. Manifest files

The codemod will update farcaster.json files to include both frame and miniapp properties for backward compatibility:

{
  "accountAssociation": { ... },
  "frame": {
    "version": "1",
    "name": "My App",
    ...
  }
+ "miniapp": {
+   "version": "1",
+   "name": "My App",
+   ...
+ }
}

Manual steps after migration

After running the codemods, you'll need to:

  1. Update your package.json dependencies:

    {
      "dependencies": {
        "@farcaster/miniapp-sdk": "^0.0.61",
        "@farcaster/miniapp-wagmi-connector": "^0.0.5"
      }
    }
  2. Update meta tags in your HTML (if using embeds):

    <meta name="fc:miniapp" content="..." />
    <!-- Keep for backward compatibility -->
    <meta name="fc:frame" content="..." />
  3. Test your application thoroughly

Backward compatibility

The migration maintains backward compatibility:

  • Old @farcaster/frame-* packages still work but show deprecation warnings
  • Both frame and miniapp properties in manifests are supported
  • The fc:frame meta tag continues to work alongside fc:miniapp

Troubleshooting

Transform not finding files

Make sure your file extensions match the patterns:

  • JavaScript/TypeScript files: .js, .jsx, .ts, .tsx
  • Manifest files: farcaster.json or .well-known/farcaster.json

Syntax errors after transformation

The codemods use jscodeshift which preserves most formatting, but complex code might need manual adjustment. Always review the changes and run your tests.

Missing transformations

Some edge cases might not be covered. Please report issues at: https://github.com/farcasterxyz/miniapps/issues

Examples

Migrate a Next.js project

miniapp-migrate ./src --dry-run
# Review changes
miniapp-migrate ./src

Migrate only TypeScript files

miniapp-migrate ./src --transform update-types

Migrate with detailed output

miniapp-migrate ./src --verbose