{"id":19904279,"url":"https://github.com/alloc/fileform","last_synced_at":"2025-09-04T06:34:43.125Z","repository":{"id":57235802,"uuid":"330721843","full_name":"alloc/fileform","owner":"alloc","description":"In-place scaffolding with file templates","archived":false,"fork":false,"pushed_at":"2021-01-28T18:39:53.000Z","size":380,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T23:49:30.035Z","etag":null,"topics":[],"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/alloc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-18T16:18:05.000Z","updated_at":"2021-01-28T18:39:56.000Z","dependencies_parsed_at":"2022-08-23T15:50:54.308Z","dependency_job_id":null,"html_url":"https://github.com/alloc/fileform","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alloc/fileform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Ffileform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Ffileform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Ffileform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Ffileform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alloc","download_url":"https://codeload.github.com/alloc/fileform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Ffileform/sbom","scorecard":{"id":185859,"data":{"date":"2025-08-11","repo":{"name":"github.com/alloc/fileform","commit":"35b104418a025a5128f0ba9ed2361f8bc431ea8d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Code-Review","score":0,"reason":"Found 0/8 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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":-1,"reason":"no workflows found","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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 'master'"],"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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7"],"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-16T19:47:19.336Z","repository_id":57235802,"created_at":"2025-08-16T19:47:19.336Z","updated_at":"2025-08-16T19:47:19.336Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273566763,"owners_count":25128629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-12T20:27:40.715Z","updated_at":"2025-09-04T06:34:43.099Z","avatar_url":"https://github.com/alloc.png","language":"TypeScript","funding_links":["https://paypal.me/alecdotbiz"],"categories":[],"sub_categories":[],"readme":"# fileform\n\n[![npm](https://img.shields.io/npm/v/fileform.svg)](https://www.npmjs.com/package/fileform)\n[![Code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/alecdotbiz)\n\nIn-place scaffolding with file templates\n\n\u003cimg src=\"./img/1.png\" width=\"50%\" /\u003e\n\u003cimg src=\"./img/2.png\" width=\"50%\" /\u003e\n\n## Usage\n\nInstall it globally.\n\n```sh\nnpm i -g fileform\n```\n\nRun it within a directory that contains a `fileform.config.js` file.\n\n```sh\nfileform\n```\n\nPass a Github repository and a destination, and Fileform will use [`degit`](https://www.npmjs.com/package/degit).\n\n```sh\nfileform aleclarson/typescript-template hello-world\n```\n\nFileform can `cd` to the new directory if you invoke it with `source`.\n\nTry adding an `alias` to your `~/.bashrc` or similar.\n\n```sh\nalias fileform=\"source $(npm bin -g)/fileform\"\n```\n\n\u0026nbsp;\n\n### fileform.config.js\n\nCreate a configuration file.\n\n```sh\ntouch fileform.config.js\n```\n\nDefine the form values to be filled out.\n\n```js\nexports.form = {\n  type: [String, ['vanilla', 'react']],\n  name: String,\n  description: String,\n  private: Boolean,\n  license: [String, 'MIT'],\n  keywords: Array,\n}\n```\n\nDefine side effects once the form is filled out.\n\n```js\nexports.onForm = function({ type }) {\n  if (type == 'react') {\n    const pkg = this.readJsonSync('package.json')\n    pkg.dependencies['react'] = '^16.0.0'\n    this.writeJsonSync('package.json', pkg)\n  }\n}\n```\n\nProvide functions and variables to your file templates.\n\n```js\nexports.context = {\n  foo: 'bar',\n  reverse: (_body, _ctx, arg1) =\u003e arg1.reverse(),\n}\n```\n\n- The `body` argument is for block calls (eg: `{{#reverse}}content{{/reverse}}`).\n- The `ctx` argument lets you access other variables/functions.\n- Your context can be a `Proxy` if you want.\n\n\u0026nbsp;\n\n### `form` variables\n\nPossible value types:\n- `String`\n- `Boolean`\n- `Array`\n\nDefault values can be defined with a tuple like `[type, default]`.\n\nWhen a value type is `String` and its default value is an array,\na list of choices is presented to the user.\n\nWhen a value type is `Array`, its default value represents a static\nlist of choices. If no default value is given, the user must write\nin their own values.\n\n### `onForm` context\n\nIn the `onForm` handler, `this` contains a few helpers.\n\n- All [`fs-extra`](https://github.com/jprichardson/node-fs-extra) exports\n- `log` from [`lodge`](https://github.com/aleclarson/lodge)\n- `exec` from [`@cush/exec`](https://github.com/aleclarson/exec)\n- `prompt` from [`enquirer`](https://github.com/enquirer/enquirer)\n\n\u0026nbsp;\n\nThe end. Please open issues for any bugs or feature requests!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Ffileform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falloc%2Ffileform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Ffileform/lists"}