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

@spry-cli/spry

v0.0.7

Published

CLI tool to scaffold production-ready React Native apps with Clean Architecture

Downloads

48

Readme

@spry-cli/spry

A CLI that scaffolds production-ready React Native (Expo) apps with Clean Architecture.

Define once, generate everything. Write an abstract repository class with decorators, and Spry generates the entire implementation stack: data layer, use cases, React Query hooks, Zustand store, and DI wiring.

Install

npx @spry-cli/spry init

Usage

1. Initialize a project

spry init

Creates an Expo project with all dependencies installed, tsconfig patched, shared error handling and HTTP client scaffolded.

2. Create a feature

spry new contact

Generates the domain skeleton with an abstract repository class and model placeholder.

3. Define your contract

import { GET, POST, PUT, DELETE, Param, Body, BaseURL, Cache } from '@spry-cli/decorators'
import type { Contact } from '../models/Contact'
import type { CreateContactInput } from '../models/CreateContactInput'

@BaseURL('/users')
export abstract class ContactRepository {

  @GET('/')
  @Cache(60)
  abstract getContacts(): Promise<Contact[]>

  @GET('/:id')
  abstract getContact(@Param('id') id: number): Promise<Contact>

  @POST('/')
  abstract createContact(@Body() input: CreateContactInput): Promise<Contact>

  @DELETE('/:id')
  abstract deleteContact(@Param('id') id: number): Promise<void>
}

4. Generate everything

spry build contact

Generates:

features/contact/
  domain/usecases/          GetContactsUseCase.ts, GetContactUseCase.ts, ...
  data/repositories/        ContactRepositoryImpl.ts
  data/datasources/         ContactRemoteDataSource.ts
  presentation/hooks/       contactQueries.ts (React Query hooks)
  presentation/state/       contactStore.ts (Zustand)
  presentation/views/       ContactScreen.tsx
  di.ts                     (dependency wiring)

5. Format generated code

spry format

Runs Prettier on all feature files.

Commands

| Command | Description | |---------|-------------| | spry init | Initialize a new Expo project with Spry | | spry init -y | Non-interactive with defaults | | spry new <feature> | Create a feature domain skeleton | | spry build <feature> | Generate implementation from contract | | spry build all | Build all features | | spry build <feature> --dry-run | Preview what would be generated | | spry build <feature> --force | Regenerate all Spry-owned files | | spry format | Format feature files with Prettier | | spry skill | Install Claude Code skill for AI-assisted development |

Incremental Builds

Add a new method to your abstract class and run spry build again. Spry detects new methods and injects them into existing files without touching developer-owned code.

$ spry build contact

  Created: domain/usecases/SearchContactsUseCase.ts
  Injected: ContactRepositoryImpl.ts -> searchContacts()
  Injected: ContactRemoteDataSource.ts -> searchContacts()
  Injected: contactQueries.ts (regenerated)
  Injected: di.ts -> searchContactsUseCase
  Skipped: contactStore.ts (developer-owned)

What Spry Generates vs What You Own

| Spry-owned (regenerated/injected) | Developer-owned (generated once) | |-----------------------------------|----------------------------------| | Use cases, RepositoryImpl, DataSource | Store, Screen component | | React Query hooks, DI wiring | Domain models | | Barrel exports (index.ts) | Abstract repository contract |

Configuration

spry init creates:

  • .spryrc.json — project config (state management, HTTP client, query client)
  • .envEXPO_PUBLIC_API_URL for the HTTP client base URL
  • .prettierrc — formatting config
  • .spry-manifest.json — tracks generated methods per feature

Decorators

Uses @spry-cli/decorators — read statically via AST, zero runtime overhead.

| Decorator | Description | |-----------|-------------| | @BaseURL(path) | Base path prefix for all methods | | @GET(path) @POST(path) @PATCH(path) @PUT(path) @DELETE(path) | HTTP verb + path | | @Cache(seconds) | Sets staleTime in React Query | | @Paginated() | Generates useInfiniteQuery | | @Param(name) | Path parameter | | @Query(name) | Query string parameter | | @Body() | Request body | | @Header(name) | Request header |

Claude Code Integration

Spry ships with a skill for Claude Code that teaches the AI assistant how to use Spry:

spry skill

This installs a skill in .claude/skills/spry/ that enables:

  • /spry contact — Claude creates the full feature (models, contract, build, format)
  • Auto-detection when you ask to "create a feature" or "scaffold an API layer"
  • Knowledge of all decorators, file ownership rules, and best practices

License

MIT