Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

app3dshot

Capture your app's own screens from the terminal and turn them into App Store and Google Play assets.

npx app3dshot login
npx app3dshot init --with-test
npx app3dshot doctor

Works on Windows, macOS and Linux for Flutter and Android. iOS capture needs macOS, because iOS simulators do.

Status

0.1.0 is an early release. What ships today:

Command
login Connect a terminal to your app3dshot account (device-code flow, like gh auth login)
logout Revoke this terminal's token, server-side, and forget it
whoami Show the account and the tokens on it
init Detect the project and write app3dshot.config.json — plus, with --with-test, the Flutter capture test and its driver
doctor Check Node, sign-in, Flutter, adb, an attached device, ffmpeg and the iOS simulator

capture and push are next. Until then init sets a project up and the app3dshot editor does the rest.

Install

Nothing to install — npx app3dshot <command> fetches it on demand. The package has no runtime dependencies, so a cold npx run downloads only this.

For a permanent copy:

npm i -g app3dshot

Needs Node 20 or newer.

What init writes

Run it from anywhere inside your project; it walks up to find the root.

app3dshot.config.json                 the project's settings and scene list
integration_test/store_capture.dart   --with-test: drives the app, names each screen
test_driver/integration_test.dart     --with-test: writes the captured bytes to disk

Both Dart files are yours to edit — they import your app and tap your widgets, so they are app code, not tool code. Add a screen by driving to it and naming the shot:

await tester.tap(find.byKey(const Key('nav-contacts')));
await tester.pumpAndSettle();
await binding.takeScreenshot('02-contacts');

Flutter projects need the integration_test package:

flutter pub add --dev integration_test --sdk=flutter

Configuration

app3dshot.config.json is plain JSON with a $schema for editor completion, so it is equally easy for you and for a coding agent to edit.

{
  "app": {
    "name": "Bulk Dialer",
    "framework": "flutter",
    "android": { "applicationId": "com.example.app" }
  },
  "capture": {
    "driver": "flutter",
    "target": "integration_test/store_capture.dart",
    "platform": "android",
    "locales": ["en-US"]
  },
  "scenes": [],
  "output": "app3dshot/raw"
}

Pointing at another server

npx app3dshot login --api http://localhost:3000

Tokens are stored per server in ~/.app3dshot/config.json (mode 600), so a token issued by a dev server is never sent to production, or the reverse.

What it does not bundle

ffmpeg, the Android SDK and emulators are hundreds of megabytes and belong to the machine, not to a package fetched through npx. app3dshot doctor names whatever is missing and where to get it.

License

MIT © Mohd Ahmad (Staksoft)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages