{"id":39208719,"url":"https://github.com/jakoblorz/netpkg","last_synced_at":"2026-01-17T23:01:44.588Z","repository":{"id":57600051,"uuid":"169760213","full_name":"jakoblorz/netpkg","owner":"jakoblorz","description":"send a message to netpkg to invoke a command remotely","archived":false,"fork":false,"pushed_at":"2019-02-16T12:10:12.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T15:02:58.265Z","etag":null,"topics":["bash","cd","ci-cd","faas","http","netcat","script","shell","tcp"],"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/jakoblorz.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":"2019-02-08T15:59:26.000Z","updated_at":"2021-07-27T01:19:49.000Z","dependencies_parsed_at":"2022-09-16T18:24:01.061Z","dependency_job_id":null,"html_url":"https://github.com/jakoblorz/netpkg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jakoblorz/netpkg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fnetpkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fnetpkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fnetpkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fnetpkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakoblorz","download_url":"https://codeload.github.com/jakoblorz/netpkg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fnetpkg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28521303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bash","cd","ci-cd","faas","http","netcat","script","shell","tcp"],"created_at":"2026-01-17T23:01:44.443Z","updated_at":"2026-01-17T23:01:44.571Z","avatar_url":"https://github.com/jakoblorz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netpkg\nSend a request to netpkg to invoke a command remotely. Hook applications to the network to automate workflows that previously were only automatable with custom solutions.\n\nUsage\n=========\n\n```\nUsage of netpkg:\n  -c string\n        name of the program to execute (default \"sh\")\n  -h string\n        specify the host (default \"0.0.0.0\")\n  -p int\n        specify the port (default 8000)\n  -t string\n        secure the api with a token; set 'n' if no token is required\n```\n\n- Additional arguments will be passed to the defined command (`stdin`):\n    ```bash\n    netpkg -c echo hello world # will output \"hello world\" when invoked\n    netpkg -c docker run hello-world # will run the \"hello-world\" image when invoked\n    ```\n\n- Output will be piped back (`stdout`):\n    ```bash\n    netpkg -c docker run hello-world\n\n    # when invoked:\n\n    # Hello from Docker!\n    # This message shows that your installation appears to be working correctly.\n\n    # To generate this message, Docker took the following steps:\n    #  1. The Docker client contacted the Docker daemon.\n    #  2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\n    #     (amd64)\n    #  3. The Docker daemon created a new container from that image which runs the\n    #     executable that produces the output you are currently reading.\n    #  4. The Docker daemon streamed that output to the Docker client, which sent it\n    #     to your terminal.\n\n    # To try something more ambitious, you can run an Ubuntu container with:\n    #  $ docker run -it ubuntu bash\n\n    # Share images, automate workflows, and more with a free Docker ID:\n    #  https://cloud.docker.com/\n\n    # For more examples and ideas, visit:\n    #  https://docs.docker.com/engine/userguide/\n\n    ```\n\nExamples\n=========\n\n**You want to run the CD for your CI/CD Pipeline...**\n\n...but you need to have it done now - just script it!\n\n1. Continuous Deployment Script\n    ```bash\n    # continuous.sh (on the target server)\n\n    # pull new changes from production branch and build' em\n    git pull origin production \u0026\u0026 docker build . -t awesome-application\n\n    # switch out the running application\n    docker stop $(docker ps -q --filter name=awesome-application)\n    docker run --name awesome-application -d awesome-application\n    ```\n\n2. Start `netpkg` to have the script invoked\n    ```bash\n    netpkg -t awesome -p 4312 -c sh ./continuous.sh\n    ```\n\n3. Configure your CI to trigger the `netpkg` endpoint\n\n    - Send a request via http `curl -s http://your-server:4312?token=awesome`\n    - Send a request via tcp `echo awesome | nc -N your-server 4312`\n    - Sample configuration for GitLab-CI:\n    ```yaml\n    \"Trigger Cloud Rebuild\":\n      image: alpine:3.8\n      stage: deploy\n      only: \n        - production\n      script:\n        - apk add --no-cache curl \n        - curl -s http://your-server:4312?token=awesome\n\n    ```\n\nGetting Help\n=========\nYou can [file an issue](https://github.com/jakoblorz/netpkg/issues/new) to ask questions, request features, \nor ask for help.\n\nLicensing\n=========\nnetpkg is licensed under the MIT License. See\n[LICENSE](https://github.com/jakoblorz/netpkg/blob/master/LICENSE) for the full\nlicense text.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakoblorz%2Fnetpkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakoblorz%2Fnetpkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakoblorz%2Fnetpkg/lists"}