CLI for adding and uploading WithFrame components in React Native / Expo projects.
- Add components from WithFrame registry to your project
- Upload component drafts to the registry
- Upload screenshots and attach them to collections
- Device login flow for CLI auth
- Local project config via
withframe.config.json
Use directly with npx:
npx withframe@latest --helpOr install globally:
npm i -g withframe
withframe --help- Initialize config (optional but recommended):
npx withframe init- Login:
npx withframe login- Set token in one of two ways:
Option A: export in shell
export WITHFRAME_TOKEN="wf_..."Option B: save in project .env or .env.local
WITHFRAME_TOKEN="wf_..."- Add a component:
npx withframe add buttonwithframe init- create/updatewithframe.config.jsonwithframe login- start device auth flowwithframe logout- clear local auth token filewithframe add <component>- add component files to projectwithframe upload- upload component draft to registrywithframe shot --file <path>- upload screenshot
Run withframe <command> --help for command options.
withframe.config.json:
{
"outputDir": "src/components",
"target": "react_native"
}outputDir- where generated files are writtentarget-react_nativeorexpo