{"id":15426356,"url":"https://github.com/richardlitt/add-file-to-github-repo","last_synced_at":"2025-06-30T00:06:24.153Z","repository":{"id":57173185,"uuid":"106956716","full_name":"RichardLitt/add-file-to-github-repo","owner":"RichardLitt","description":"Add a file to a GitHub repository","archived":false,"fork":false,"pushed_at":"2020-05-11T17:15:40.000Z","size":1598,"stargazers_count":2,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-22T17:17:31.956Z","etag":null,"topics":["add","cli","file","github"],"latest_commit_sha":null,"homepage":"","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/RichardLitt.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"license","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-14T19:30:05.000Z","updated_at":"2024-05-27T06:31:11.000Z","dependencies_parsed_at":"2022-08-24T14:41:08.163Z","dependency_job_id":null,"html_url":"https://github.com/RichardLitt/add-file-to-github-repo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RichardLitt/add-file-to-github-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fadd-file-to-github-repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fadd-file-to-github-repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fadd-file-to-github-repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fadd-file-to-github-repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RichardLitt","download_url":"https://codeload.github.com/RichardLitt/add-file-to-github-repo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fadd-file-to-github-repo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262685694,"owners_count":23348451,"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":["add","cli","file","github"],"created_at":"2024-10-01T17:55:38.773Z","updated_at":"2025-06-30T00:06:24.114Z","avatar_url":"https://github.com/RichardLitt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# add-file-to-github-repo\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/RichardLitt/add-file-to-github-repo.svg)](https://greenkeeper.io/)\n\n[![Build Status](https://travis-ci.org/RichardLitt/add-file-to-github-repo.svg?branch=master)](https://travis-ci.org/RichardLitt/add-file-to-github-repo) [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n\u003e Add a file to a GitHub repository\n\n## Install\n\n```\n$ npm install --save add-file-to-github-repo\n```\n\n## Usage\n\n```js\nconst addFileToGithubRepo = require('add-file-to-github-repo');\n\naddFileToGithubRepo('unicorns', 'RichardLitt/here', {\n  path: '.github/unicorns'\n})\n//=\u003e 'Done'\n```\n\n## API\n\n### addFileToGithubRepo(file, repository, [options])\n\n##### file\n\nType: `string`\n\nThe file.\n\n#### repo\n\nType: `string`\n\nIn the format 'user/repo'\n\n#### options\n\n#### branch\n\nType: `string`\nDefault: `master`\n\nThe branch to commit to.\n\n#### message\n\nType: `string`\n\nThe commit message. Default: `chore(filename): init file.`\n\n#### path\n\nType: `string`\n\nWhere to save the file.\n\n\n## CLI\n\n```\n$ npm install --global add-file-to-github-repo\n```\n\n```\n$ add-file-to-github-repo --help\n\n  Usage\n    $ add-file-to-github-repo [file] [repo] \u003copts\u003e\n\n  Options\n    -b, --branch  GitHub branch [Default: default_branch of repo]\n    -i, --input   Input file path\n    -r, --repo    Repository. Format: 'user/repo'\n    -m, --message Commit message [Default: chore(filename): init file]\n    -p, --path    Where to put the file\n\n  Examples\n    $ GITHUB_TOKEN=abc... add-file-to-github-repo 'file' 'RichardLitt/add-file-to-github-repo'\n```\n\n## Contribute\n\nPRs accepted. Check out the [issues](https://github.com/RichardLitt/add-file-to-github-repo/issues)!\n\n## License\n\n[MIT](LICENSE) © [Richard Littauer](https://burntfen.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardlitt%2Fadd-file-to-github-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardlitt%2Fadd-file-to-github-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardlitt%2Fadd-file-to-github-repo/lists"}