{"id":19420116,"url":"https://github.com/einride/aip-cli-go","last_synced_at":"2025-04-24T14:32:03.933Z","repository":{"id":37425489,"uuid":"366293506","full_name":"einride/aip-cli-go","owner":"einride","description":"Generate command line interfaces to your gRPC services.","archived":false,"fork":false,"pushed_at":"2025-04-01T16:54:17.000Z","size":1102,"stargazers_count":28,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T17:51:32.339Z","etag":null,"topics":["aip","api-management","cli","command-line","go","golang","grpc","protobuf","protocol-buffers"],"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/einride.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-11T07:27:15.000Z","updated_at":"2025-03-28T08:13:47.000Z","dependencies_parsed_at":"2022-08-08T20:15:47.248Z","dependency_job_id":"b5527e88-5f1b-4d5f-b613-b855e577e4ea","html_url":"https://github.com/einride/aip-cli-go","commit_stats":null,"previous_names":["einride/protoc-gen-go-cli","einride/ctl"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-cli-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-cli-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-cli-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Faip-cli-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/einride","download_url":"https://codeload.github.com/einride/aip-cli-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250643492,"owners_count":21464186,"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":["aip","api-management","cli","command-line","go","golang","grpc","protobuf","protocol-buffers"],"created_at":"2024-11-10T13:21:11.218Z","updated_at":"2025-04-24T14:32:03.483Z","avatar_url":"https://github.com/einride.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AIP CLI Go\n\nGenerate command line interfaces to your [AIP](https://aip.dev) gRPC services.\n\n## How to\n\n### Step 1: Install the plugin\n\n```bash\n$ GOBIN=$PWD/build go install go.einride.tech/aip-cli/cmd/protoc-gen-go-aip-cli\n```\n\n### Step 2: Configure the code generator\n\nThe following example uses a\n[buf generate](https://docs.buf.build/generate/usage) template to configure the\nCLI generator.\n\n[buf.gen.example.yaml](./proto/buf.gen.example.yaml):\n\n```yaml\nversion: v1\n\nmanaged:\n  enabled: true\n  go_package_prefix:\n    default: go.einride.tech/aip-cli/cmd/examplectl\n    except:\n      - buf.build/googleapis/googleapis\n\nplugins:\n  # The CLI generator requires the stubs generated by protoc-gen-go.\n  - name: go\n    out: cmd/examplectl\n    opt: module=go.einride.tech/aip-cli/cmd/examplectl\n\n  # The CLI generator optionally generates a root command and a main file\n  # to the root of the output module.\n  - name: go-aip-cli\n    out: cmd/examplectl\n    strategy: all\n    opt:\n      - module=go.einride.tech/aip-cli/cmd/examplectl\n      - root=examplectl\n      - gcloud_identity_tokens=true\n```\n\n### Step 3: Generate the code\n\n```bash\n$ buf generate \\\n  --template buf.gen.example.yaml \\\n  --path einride/example/freight\n```\n\n### Step 4: Install the CLI\n\n```bash\n$ go install ./cmd/examplectl\n```\n\n### Step 5: Use the CLI\n\n```bash\n$ examplectl help freight\n\nthis api represents a simple freight service\n\nUsage:\n  examplectl freight [command]\n\nAvailable Commands:\n  batch-get-sites batch get sites\n  create-shipment create a shipment\n  create-shipper  create a shipper\n  create-site     create a site\n  delete-shipment delete a shipment\n  delete-shipper  delete a shipper\n  delete-site     delete a site\n  get-shipment    get a shipment\n  get-shipper     get a shipper\n  get-site        get a site\n  list-shipments  list shipments for a shipper\n  list-shippers   list shippers\n  list-sites      list sites for a shipper\n  update-shipment update a shipment\n  update-shipper  update a shipper\n  update-site     update a site\n\nFlags:\n  -h, --help   help for freight\n\nGlobal Flags:\n      --address string   address to connect to\n      --insecure         make insecure client connection (only on localhost)\n      --token string     bearer token used by client\n  -v, --verbose          print verbose output\n\nUse \"examplectl freight [command] --help\" for more information about a command.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Faip-cli-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinride%2Faip-cli-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Faip-cli-go/lists"}