{"id":48250423,"url":"https://github.com/dlukanin/node-raspistill","last_synced_at":"2026-04-04T20:51:19.998Z","repository":{"id":17025238,"uuid":"80150350","full_name":"dlukanin/node-raspistill","owner":"dlukanin","description":"Node wrapper for taking photos using raspberry pi raspistill app.","archived":false,"fork":false,"pushed_at":"2023-03-04T04:39:50.000Z","size":7503,"stargazers_count":22,"open_issues_count":6,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-19T04:40:04.442Z","etag":null,"topics":["camera","hacktoberfest","iot","raspberry","raspistill","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlukanin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-26T20:05:22.000Z","updated_at":"2025-02-25T07:51:54.000Z","dependencies_parsed_at":"2024-06-19T05:18:43.756Z","dependency_job_id":"bf2ef75a-f735-4660-a133-ee81d637abc6","html_url":"https://github.com/dlukanin/node-raspistill","commit_stats":{"total_commits":202,"total_committers":13,"mean_commits":"15.538461538461538","dds":0.1089108910891089,"last_synced_commit":"6d538622a64f14d65e427e40c3a5157dc7657f84"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dlukanin/node-raspistill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlukanin%2Fnode-raspistill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlukanin%2Fnode-raspistill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlukanin%2Fnode-raspistill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlukanin%2Fnode-raspistill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlukanin","download_url":"https://codeload.github.com/dlukanin/node-raspistill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlukanin%2Fnode-raspistill/sbom","scorecard":{"id":347354,"data":{"date":"2025-08-11","repo":{"name":"github.com/dlukanin/node-raspistill","commit":"6d538622a64f14d65e427e40c3a5157dc7657f84"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/dlukanin/node-raspistill/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/dlukanin/node-raspistill/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/dlukanin/node-raspistill/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/dlukanin/node-raspistill/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/dlukanin/node-raspistill/release.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-xvf7-4v9q-58w6","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T07:25:40.852Z","repository_id":17025238,"created_at":"2025-08-18T07:25:40.853Z","updated_at":"2025-08-18T07:25:40.853Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camera","hacktoberfest","iot","raspberry","raspistill","typescript"],"created_at":"2026-04-04T20:51:18.588Z","updated_at":"2026-04-04T20:51:19.969Z","avatar_url":"https://github.com/dlukanin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-raspistill\n![Build status](https://github.com/dlukanin/node-raspistill/actions/workflows/main.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/dlukanin/node-raspistill/badge.svg?branch=master)](https://coveralls.io/github/dlukanin/node-raspistill?branch=master)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/dlukanin/node-raspistill.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/dlukanin/node-raspistill/alerts/)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/dlukanin/node-raspistill.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/dlukanin/node-raspistill/context:javascript)\n\nSimple wrapper for taking photos using Raspberry Pi raspistill app.\n\nModule is written in typescript and provides type definitions out-of-the-box.\n\nTested with Raspberry Pi 2 B (Raspbian OS), and Raspberry Camera Module v2.\n\n## Requirements\nRaspbian OS with node.js 12+ installed, raspberry camera module connected to your pi.\n\n\n## Usage\n\n**You can check a lot of examples [here](https://github.com/dlukanin/node-raspistill/tree/main/examples).**\n\nSample usage:\n```\nnpm install node-raspistill\n```\n\n```typescript\nconst Raspistill = require('node-raspistill').Raspistill;\nconst camera = new Raspistill();\n\ncamera.takePhoto().then((photo) =\u003e {\n    ...\n});\n```\nOr (if you use imports):\n```typescript\nimport {Raspistill} from 'node-raspistill';\nconst camera = new Raspistill();\n\ncamera.takePhoto().then((photo) =\u003e {\n    ...\n});\n```\n\nYou can also pass some options to constructor method:\n\n```typescript\nconst camera = new Raspistill({\n    verticalFlip: true,\n    width: 800,\n    height: 600\n});\n```\n\nSee full options list in the docs below.\n\n## Changelog\n\nYou can see changelog [here](https://github.com/dlukanin/node-raspistill/releases).\n\n## Docs\n### Raspistill\n#### constructor(options?: ICameraOptions)\nCreates new Raspistill instance.\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\nOptions - object, that can contain:\n\n|key|type|defaults|desc|\n|---|---|---|---|\n|noFileSave|boolean|false|Disables photos saving. If true - camera output will be directly sent as Buffer without saving on the drive|\n|verticalFlip|boolean|false|   |\n|horizontalFlip|boolean|false|   |\n|noPreview|boolean|true|Disables preview window on Pi while taking photo|\n|outputDir|string|'./photos'|Output directory where photos will be stored|\n|fileName|string|undefined|Name for photo file. If undefined - photos file names will be calculated as new Date.now() + file encoding|\n|encoding|string|'jpg'|'jpg', 'bmp', 'gif' or 'png'|\n|width|number|undefined|Width of taken image in pixels. If width is not set - raspistill uses default max camera sensor resolution width|\n|height|number|undefined|Height of taken image in pixels. If height is not set - raspistill uses default max camera sensor resolution height|\n|time|number|undefined|Time before camera takes photo. If undefined raspistill util use it's own 5 sec timeout|\n|shutterspeed|number|undefined|Shutter speed in microseconds|\n|contrast|number|undefined|Contrast of the image (-100 ... 100). If undefined - raspistill util use contrast 0 value |\n|brightness|number|undefined|Brightness of the image. 50 is the default raspistill util value.|\n|saturation|number|undefined|Image saturation (-100 ... 100). Raspistill util uses 0 value if undefined|\n|iso|number|undefined|Capture ISO (100 ... 800)|\n|rotation|number|undefined|Image rotation param|\n|awb|string|undefined|'off', 'auto', 'sun', 'cloud', 'shade', 'tungsten', 'fluorescent', 'incandescent', 'flash', 'horizon'|\n|awbg|string|undefined|Sets blue and red gains (as floating point numbers) to be applied when awb=off. e.g. '1.5,1.2'|\n|quality|number|undefined|JPEG quality \u003c0 to 100\u003e|\n|thumb|string|undefined|Specification of the thumbnail image inserted into the JPEG file. If not specified, defaults are a size of 64x48 at quality 35|\n|exposure|string|'auto'|'auto', 'night', 'nightpreview', 'backlight', 'spotlight', 'sports', 'snow', 'beach', 'verylong', 'fixedfps', 'antishake', 'fireworks'|\n|flicker|string|'off'|'off', 'auto', '50hz','60hz'|\n|imageEffect|string|'none'|'none','negative', 'solarise', 'posterise', 'whiteboard', 'blackboard', 'sketch', 'denoise', 'emboss', 'oilpaint', 'hatch', 'gpen', 'pastel', 'watercolour', 'film', 'blur', 'saturation'|\n|drc|string|'off'|'off', 'low', 'med', 'high'|\n\n```typescript\nconst camera = new Raspistill({\n    verticalFlip: true,\n    fileName: 'foo'\n});\n```\n\nYou can find more info about raspistill util options in the official docs: https://www.raspberrypi.org/documentation/raspbian/applications/camera.md\n\u003c/details\u003e\n\n---\n\n#### takePhoto(fileName?: string): Promise\\\u003cBuffer\\\u003e\nTakes new photo. Returns Promise, resolving with Buffer object.\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n```typescript\ncamera.takePhoto('testPhotoName').then((photo) =\u003e {\n    ...\n});\n```\n\u003c/details\u003e\n\n---\n\n#### timelapse(fileName: string, intervalMs: number, execTimeMs: number, cb: (image: Buffer) =\u003e any): Promise\\\u003cvoid\\\u003e;\n#### timelapse(intervalMs: number, execTimeMs: number, cb: (image: Buffer) =\u003e any): Promise\\\u003cvoid\\\u003e;\nRuns camera in timelapse mode. Passes taken image picture as Buffer object to the callback. \nRaspistill options (passed into constructor or into setOptions method) are also applicable in this mode.\n\nRemember that raspberry camera has it's own limits of taking photos speed even in timelapse mode.\n\nCheck out official raspistill docs (https://www.raspberrypi.org/documentation/raspbian/applications/camera.md) for\nfile naming rules and interval/total exec time params usage.\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n```typescript\ncamera.timelapse(500, 3000, (image) =\u003e {\n    // got image from camera, do something\n}).then(() =\u003e {\n    // timelapse ended\n}).catch((err) =\u003e {\n    // something bad happened\n});\n```\nor\n```typescript\ncamera.timelapse('image%04d', 500, 3000, (image) =\u003e {\n    // got image from camera, do something\n}).then(() =\u003e {\n    // timelapse ended\n}).catch((err) =\u003e {\n    // something bad happened\n});\n```\n\u003c/details\u003e\n\n---\n\n#### stop(): void;\nTries to stop current raspistill running action. Note that pending raspistill promises will be\nrejected with RaspistillInterruptError if stop was completed.\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n```typescript\nconst RaspistillInterruptError = require('node-raspistill').RaspistillInterruptError;\n\nraspistill.timelapse(1000, 30000, (image) =\u003e {\n    console.log('got photo, trying to stop raspistill');\n    raspistill.stop();\n})\n    .then(() =\u003e {\n        console.log('timelapse ended')\n    })\n    .catch((err) =\u003e {\n        console.log(err instanceof RaspistillInterruptError) // true, raspistill was interrupted;\n    });\n```\n\n\u003c/details\u003e\n\n---\n\n#### setOptions(options: ICameraOptions): void\nSets new options for current Raspistill instance.\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n```typescript\ncamera.setOptions({\n    horizontalFlip: true,\n    noPreview: false\n});\n```\n\u003c/details\u003e\n\n---\n\n#### getOptions(): ICameraOptions\nGets current raspistill options.\n\n---\n\n#### getOption(key: string): any\nGets current raspistill option by key.\n\n---\n\n## Contributors\n\nJust want to say thx for all [contributors](https://github.com/dlukanin/node-raspistill/graphs/contributors). You are wonderful. :)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlukanin%2Fnode-raspistill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlukanin%2Fnode-raspistill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlukanin%2Fnode-raspistill/lists"}