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

react-native-cross-shortcuts

v0.1.1

Published

One config, all platforms. Generate iOS App Intents + Siri Shortcuts, Android App Shortcuts + Google Assistant App Actions for any React Native app.

Readme

react-native-cross-shortcuts

One config, all platforms. Generate iOS App Intents + Siri Shortcuts, Android App Shortcuts + Google Assistant App Actions for any React Native app.

What you get from a single shortcuts.config.json

| Surface | Result | |---|---| | iOS Spotlight | App actions appear in Spotlight without users adding them | | Siri | "Hey Siri, " launches the right screen | | Action Button (iPhone 15 Pro+) | Bindable to any of your shortcuts | | Shortcuts app | All actions auto-registered via AppShortcutsProvider | | iOS Home Screen | Long-press app icon → quick actions | | Android Home Screen | Long-press app icon → quick actions | | Google Assistant | "Hey Google, " launches the right screen |

All actions land in your existing React Native deep-link handler (Linking API).

Install

npm install react-native-cross-shortcuts
# Optional, only if you also want iOS NSUserActivity donations:
npm install react-native-siri-shortcut

Configure

Create shortcuts.config.json at your project root:

{
  "scheme": "myapp",
  "appName": "My App",
  "ios": {
    "xcodeprojPath": "ios/MyApp.xcodeproj",
    "targetName": "MyApp",
    "groupName": "MyApp",
    "swiftOutputPath": "ios/MyApp/AppIntents.generated.swift",
    "infoPlistPath": "ios/MyApp/Info.plist",
    "minIosVersion": "16.0",
    "shortcutTileColor": "purple"
  },
  "android": {
    "modulePath": "android/app",
    "applicationId": "com.myorg.myapp"
  },
  "shortcuts": [
    {
      "id": "open-feed",
      "shortLabel": "Open Feed",
      "longLabel": "Jump straight into your feed",
      "systemImage": "list.bullet",
      "deepLink": "/feed",
      "siriPhrases": ["Open my feed in ${appName}"],
      "assistantBII": "actions.intent.OPEN_APP_FEATURE"
    },
    {
      "id": "search",
      "shortLabel": "Search",
      "longLabel": "Search anything in My App",
      "systemImage": "magnifyingglass",
      "deepLink": "/search",
      "siriPhrases": ["Search with ${appName}"],
      "parameter": {
        "name": "query",
        "title": "Search query",
        "description": "What would you like to search for?",
        "paramQuery": "q"
      },
      "assistantBII": "actions.intent.GET_THING"
    }
  ]
}

Run codegen

npx cross-shortcuts sync

The CLI:

  1. Generates ios/<App>/AppIntents.generated.swift with one AppIntent per shortcut and a single AppShortcutsProvider.
  2. Patches Info.plist with the matching NSUserActivityTypes entries.
  3. Injects the generated Swift file into your .xcodeproj via the bundled Ruby script (xcodeproj gem — comes with CocoaPods).
  4. Generates android/app/src/main/res/xml/shortcuts.xml and actions.xml.
  5. Patches AndroidManifest.xml with the custom-scheme intent filter and the <meta-data> references.
  6. Adds the per-shortcut label <string> resources to strings.xml (inside an idempotent <!-- BEGIN cross-shortcuts --> block).

Wire it up at runtime

import { addShortcutListener, donateShortcut } from 'react-native-cross-shortcuts';

useEffect(() => {
  const unsub = addShortcutListener({ scheme: 'myapp' }, (event) => {
    // event.id === 'feed' | 'search' | ...
    // event.params === { q: 'gita' } when launched with ?q=gita
    navigateTo(event.id, event.params);
  });
  return unsub;
}, []);

// Donate on success — teaches the system to suggest this shortcut.
donateShortcut({
  applicationId: 'com.myorg.myapp',
  shortcutId: 'open-feed',
  title: 'Open Feed',
  invocationPhrase: 'Open my feed',
});

How re-runs behave

The CLI is idempotent. Re-run it whenever you edit shortcuts.config.json:

  • Swift file is regenerated wholesale (and re-injected into the project file if missing).
  • Info.plist NSUserActivityTypes array is replaced (not duplicated).
  • AndroidManifest.xml patches detect existing entries and skip.
  • strings.xml block is delimited and replaced atomically.

Limitations / roadmap

  • Dynamic Android shortcuts and iOS NSUserActivity-only fallback to be added.
  • iOS EntityQuery-style parameter resolution not yet generated; current parameter support is a free-form string.
  • We don't add xcodeproj as a dependency — assumes CocoaPods is installed (already required by RN). If it isn't: gem install xcodeproj.

License

MIT