{"id":20900729,"url":"https://github.com/invit/ghupload","last_synced_at":"2025-05-13T01:32:34.522Z","repository":{"id":64306064,"uuid":"340694635","full_name":"invit/ghupload","owner":"invit","description":"CLI to create/update files in a github repository","archived":false,"fork":false,"pushed_at":"2023-03-06T22:20:35.000Z","size":92,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T15:21:22.960Z","etag":null,"topics":["cli","github","upload"],"latest_commit_sha":null,"homepage":"","language":"Go","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/invit.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-20T16:04:36.000Z","updated_at":"2025-01-09T13:45:09.000Z","dependencies_parsed_at":"2024-06-20T01:47:56.127Z","dependency_job_id":"1852b6ff-5772-45a5-82a9-5b213cfc6784","html_url":"https://github.com/invit/ghupload","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invit%2Fghupload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invit%2Fghupload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invit%2Fghupload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invit%2Fghupload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invit","download_url":"https://codeload.github.com/invit/ghupload/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253854095,"owners_count":21974223,"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":["cli","github","upload"],"created_at":"2024-11-18T11:22:07.898Z","updated_at":"2025-05-13T01:32:34.228Z","avatar_url":"https://github.com/invit.png","language":"Go","readme":"# ghupload\n\n[![build](https://github.com/invit/ghupload/actions/workflows/build.yml/badge.svg)](https://github.com/invit/ghupload/actions/workflows/build.yml)\n\nCLI to upload a file to a github repository through [github's REST API](https://docs.github.com/en/rest/reference/repos#create-or-update-file-contents). The file will be either created or overwritten.\n\n## Installation\n\nDownloadable binaries are available from the [releases page](https://github.com/invit/ghupload/releases/latest).\n\n## Setup\n\nCreate a [Github personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) and store it in one of the following ways:\n\n*  _GITHUB_TOKEN_ environment variable \n\n```shell\n$ export GITHUB_TOKEN=\"your-personal-access-token\"\n```\n\n* In a _github-token_ file. See help message for the upload command for the location on your system. On Linux this is usally _$HOME/.config/ghupload/github-token_, on MacOS _$HOME/Library/Application/ghupload/github-token_ and _%AppData%/ghupload/github-token_ on Windows. \n\n* Provide a _token_ parameter to the upload command, pointing to a file containing the access token. \n\n## Usage\n\n```\nUsage:\n  ghupload upload -m \u003ccommit-msg\u003e [-b \u003cbranch\u003e] [-t \u003ctoken-file\u003e] \u003clocal-path\u003e \u003cremote-url\u003e\n\nFlags:\n  -b, --branch string    Commit to branch (default branch if empty)\n  -m, --message string   Commit message (required)\n  -t, --token string     File to read token from (default /home/USER/.config/ghupload/github-token)\n```\n\n_local-path_ is either a path to a local file or \"-\" for STDIN. \n\n_remote-url_ can be one of the following formats and has to include the repository owner, the repository and the path to the file inside the repository:\n* https://github.com/owner/repository/path/in/repo\n* git@github.com:owner/repository.git/path/in/repo\n* owner/repository/path/in/repo\n\nCommand prints the commit SHA on success.\n\n### Examples\n\n* Upload file\n\n```shell\n$ ghupload upload -m \"commit msg\" README.md invit/ghupload/README.md\nb6cbb5b2ea041956c4ac8da17007f95d2312a461\n```\n\n* Upload data from STDIN\n\n```shell\n$ ghupload upload -m \"commit msg\" - invit/ghupload/README.md\nthis is the new \ncontent \nof the file\n^D\n3be39e60c3ae44faa40f4efc31241f3564c396f1\n```\n\n## Build\n\nOn Linux:\n\n```\n$ git clone github.com/invit/ghupload \n$ cd ghupload\n$ make \n```\n\n## License\n\nghupload is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvit%2Fghupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvit%2Fghupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvit%2Fghupload/lists"}