{"id":17030284,"url":"https://github.com/vsoch/nu-plugin","last_synced_at":"2025-08-03T01:19:51.097Z","repository":{"id":56824339,"uuid":"216898660","full_name":"vsoch/nu-plugin","owner":"vsoch","description":"GoLang library for creating nushell plugins (under development!)","archived":false,"fork":false,"pushed_at":"2019-10-24T01:53:16.000Z","size":38,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T12:42:05.358Z","etag":null,"topics":["nu-plugin","nu-plugin-golang","nushell"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsoch.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-10-22T19:57:27.000Z","updated_at":"2024-05-19T16:36:20.000Z","dependencies_parsed_at":"2022-09-01T09:20:44.743Z","dependency_job_id":null,"html_url":"https://github.com/vsoch/nu-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vsoch/nu-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fnu-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fnu-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fnu-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fnu-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsoch","download_url":"https://codeload.github.com/vsoch/nu-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fnu-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261343808,"owners_count":23144738,"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":["nu-plugin","nu-plugin-golang","nushell"],"created_at":"2024-10-14T08:05:42.551Z","updated_at":"2025-06-22T18:33:50.221Z","avatar_url":"https://github.com/vsoch.png","language":"Go","readme":"# Nushell Plugin in GoLang\n\nThis is a base library for generating a nushell plugin in Golang.\nAs nushell is under development, it's likely that not all features are implemented\nhere! Please [open an issue](https://www.github.com/vsoch/nu-plugin/issues)\nif you need help.\n\n## Filter Plugin\n\nI've done a basic [filter example](examples/len) to calculate the length of a string, \nand the usage is summarized as follows:\n\n\n```go\npackage main\n \nimport nu \"github.com/vsoch/nu-plugin/pkg/plugin\"\n\n\n// filter will read stream from nushell and print a response\nfunc filter(plugin *nu.FilterPlugin, params interface{}) {\n\n\t// can also be getIntPrimitive\n\tvalue := plugin.Func.GetStringPrimitive(params)\n\n\t// Put your logic here! In this case, we want a length\n\tintLength := len(value)\n\n\t// You must also return the tag with your response\n\ttag := plugin.Func.GetTag(params)\n\n\t// This can also be printStringResponse\n\tplugin.Func.PrintIntResponse(intLength, tag)\n\n}\n\n\nfunc main() {\n\n\tname := \"len\"\n\tusage := \"Return the length of a string\"\n\tplugin := nu.NewFilterPlugin(name, usage)\n\n\t// Run the filter function\n\tplugin.Run(filter)\n}\n```\n\nFor more details, see the [full example](examples/len).\n\n## Sink Plugin\n\nWe have two examples for Sink plugins:\n\n - [examples/salad](examples/salad) prints colored salad puns to the screen\n - [examples/hello](examples/hello) is a more basic example to say hello\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fnu-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsoch%2Fnu-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fnu-plugin/lists"}