{"id":20801541,"url":"https://github.com/harish2704/file-header","last_synced_at":"2026-05-06T19:35:50.169Z","repository":{"id":57235462,"uuid":"75424090","full_name":"harish2704/file-header","owner":"harish2704","description":"A template based commandline file-header generator","archived":false,"fork":false,"pushed_at":"2017-05-26T11:59:43.000Z","size":4,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-19T19:04:34.677Z","etag":null,"topics":["file-header","header","nodejs","tempalte","vim","vim-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/harish2704.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":"2016-12-02T19:20:18.000Z","updated_at":"2020-10-14T12:56:58.000Z","dependencies_parsed_at":"2022-09-04T21:20:39.287Z","dependency_job_id":null,"html_url":"https://github.com/harish2704/file-header","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harish2704%2Ffile-header","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harish2704%2Ffile-header/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harish2704%2Ffile-header/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harish2704%2Ffile-header/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harish2704","download_url":"https://codeload.github.com/harish2704/file-header/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243147273,"owners_count":20243745,"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","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":["file-header","header","nodejs","tempalte","vim","vim-plugin"],"created_at":"2024-11-17T18:18:54.683Z","updated_at":"2026-05-06T19:35:45.149Z","avatar_url":"https://github.com/harish2704.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-header\nA CLI tool for generating file header from a configuration file and an EJS template.\n\n\n## Installation \n\n#### install the package\n`npm i -g file-header`\n\n#### Edit the config file ( Optional )\nData to be presented on a file header is stored in a config file which is located at `~/.file-headers/template_data.js`\n\nThe default content of this file will be as follows.\n```javascript\nmodule.exports = {\n  user: process.env.USER,\n  email: process.env.USER + '@' + process.env.HOST,\n  date: new Date(),\n};\n\n```\n\nWe can customize it as required. For example, change it to\n\n```javascript\nmodule.exports = {\n  user: 'Jake sully'\n  email: 'gmail@jakesully.com'\n  github: 'https://github.com/jakesully'\n  date: new Date(),\n};\n```\n\n#### Edit the [EJS](ejs) tempalte of the default file-header ( Optional )\n\nThe default file header template can be found at `~/.file-headers/default`\nIt is just [EJS](ejs) template. We can customize it to any extend.\n\nIf we require different template for each file type , create a file  `~/.file-headers/\u003cextention\u003e`\n\n* For javscript, create a custom template at  `~/.file-headers/js` and customize it.\n* If we want a custom header for '*.spec.js' file, create ~/.file-headers/spec.js and customize it\n\n\n## Usage\n\nCommandline\n```\nfile-header \u003cfilename.ext\u003e\n```\nwhich will print the file header to your console.\n\n\n#### Use with Vim editor\n\nAdd the below line to your vim config file\n```vim\ncommand! Header :execute '0r!file-header %'\n```\n\nNow, type `:Header` to add file header to your current buffer.\n\n[ejs]: https://github.com/mde/ejs \"Ejs template engine\"\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharish2704%2Ffile-header","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharish2704%2Ffile-header","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharish2704%2Ffile-header/lists"}