Contributing
Develop the CLI and React Native package and maintain their documentation.
Clone twocentinc/snapbot, use Node.js 22 or newer and the pinned pnpm 9.15.9, and run:
pnpm install --frozen-lockfile
pnpm test
pnpm typecheck
pnpm --filter react-native-snapbot typecheckThe tests use local fixtures and mocks for configuration, simulator helpers, and PNG stability behavior. They do not prove an end-to-end capture works on a particular Expo application. For that, use a dedicated simulator and test app, then inspect the screenshots, summary, and logs.
Source files
| Source | Responsibility |
|---|---|
src/main.ts | Runtime Zod configuration validation, CLI arguments, summary lifecycle, post-run exec. |
src/ios.ts | Simulator and build lifecycle, setup and capture orchestration, screenshot/app results. |
src/lib.ts | Paths and output ownership, processes, logs, PNG decoding and stability. |
packages/react-native-snapbot/src/ | Expo setup route, setup UI, state hooks, and exported types. |
test/ | Existing configuration, iOS helper, and PNG tests. |
The CLI package ships TypeScript and uses its tsx dependency. The React Native
package exports TypeScript for the app's bundler. Neither currently has a
published npm version; verify package publication and packed-executable behavior
before replacing the documented source-install workflow.
Update the docs
User guides live in twocentinc/oss, under
docs/content/docs/snapbot/, and is publicly readable at this site. Keep the
Snapbot root README and package README as short landing pages linking here.
Contributors without access to the private docs repository can report problems
through Snapbot issues.
When runtime behavior changes, update these guides against the source and existing tests. Do not document planned JSON envelopes, flags, or safety features as implemented. The runtime validator and exported types remain authoritative; a future machine-readable schema should be generated from them, not maintained as a competing handwritten contract.
In the oss checkout, validate documentation with:
cd docs
npm ci
npm run types:check
NEXT_PUBLIC_BASE_PATH=/oss npm run buildVerify internal links, search content, and agent-readable Markdown as well as
the rendered pages. Pushes to oss main deploy through GitHub Pages.