{"id":48047,"library":"grpc-man","title":"grpc-man: gRPC Client","description":"grpc-man is a lightweight gRPC client library for Node.js that allows calling gRPC server methods dynamically at runtime. Version 1.8.0 is the latest stable release, with active maintenance and updates. It supports both programmatic use in JavaScript/TypeScript projects and command-line usage for quick verification of gRPC services. Unlike generated gRPC clients, grpc-man can load .proto files at runtime and invoke methods without code generation, making it ideal for testing and debugging. It ships TypeScript definitions and requires Node.js >=8.9.0.","status":"active","version":"1.8.0","language":"javascript","source_language":"en","source_url":"https://github.com/Jeff-Tian/grpc-man","tags":["javascript","grpc","client","typescript"],"install":[{"cmd":"npm install grpc-man","lang":"bash","label":"npm"},{"cmd":"yarn add grpc-man","lang":"bash","label":"yarn"},{"cmd":"pnpm add grpc-man","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core gRPC library for client-server communication","package":"grpc","optional":false},{"reason":"Used for loading .proto files at runtime","package":"protobufjs","optional":false}],"imports":[{"note":"The library does not have a default export at the package root; you must import from the specific path 'grpc-man/lib/Client'. The import path is case-sensitive.","wrong":"import { GrpcClient } from 'grpc-man';","symbol":"GrpcClient","correct":"import GrpcClient from 'grpc-man/lib/Client';"},{"note":"The class is named GrpcClient in the source, but you can alias it as Client when importing. The library also exports Client as a named export from 'grpc-man/lib/Client'.","wrong":"import Client from 'grpc-man';","symbol":"Client","correct":"import Client from 'grpc-man/lib/Client';"},{"note":"The CLI requires both endpoint and proto file path as arguments. Running without arguments shows help.","wrong":"npx grpc-man <endpoint>","symbol":"grpc-man (CLI)","correct":"grpc-man <endpoint> <protoFilePath>"},{"note":"The endpoint must include the port (e.g., 'localhost:50051'). Omitting the port causes a connection error.","wrong":"const client = new GrpcClient('localhost', './path/to/service.proto');","symbol":"GrpcClient instance","correct":"const client = new GrpcClient('localhost:50051', './path/to/service.proto');"}],"quickstart":{"code":"import GrpcClient from 'grpc-man/lib/Client';\n\nasync function main() {\n  const client = new GrpcClient('0.0.0.0:8890', './proto/helloworld.proto');\n  const res = await client.grpc.helloworld.Greeter.sayHello({ name: 'World' });\n  console.log(res); // { message: 'Hello World' }\n}\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates importing GrpcClient, creating a client with endpoint and proto file path, and calling a gRPC method."},"warnings":[{"fix":"Use exact path 'grpc-man/lib/Client' in imports.","message":"The import path 'grpc-man/lib/Client' is case-sensitive and may vary on different filesystems.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update code: new Client(endpoint, protoPath) instead of passing an object.","message":"In version 1.7.0, the method signature for Client constructor changed to accept endpoint and protoPath as separate arguments.","severity":"breaking","affected_versions":">=1.7.0"},{"fix":"Consider switching to '@grpc/grpc-js' and updating the library or using an alternative.","message":"The package relies on the deprecated 'grpc' npm package (not '@grpc/grpc-js'), which may have compatibility issues with newer Node.js versions.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Check proto file for package declaration and include it in the call chain.","message":"If the proto file contains packages, you must prefix method calls with the package name (e.g., client.grpc.mypackage.MyService.myMethod).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"For secure connections, use a different gRPC client library that supports credentials.","message":"The library does not support SSL/TLS by default; connections are insecure.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.8.0':27 '8.9.0':90 'activ':34 'allow':18 'call':19 'client':5,13,60,93 'code':74 'command':48 'command-lin':47 'debug':82 'definit':86 'dynam':23 'file':67 'generat':58,75 'grpc':2,4,7,12,20,55,59,62,92 'grpc-man':1,6,61 'ideal':78 'invok':71 'javascript':91 'javascript/typescript':44 'latest':30 'librari':14 'lightweight':11 'line':49 'load':65 'mainten':35 'make':76 'man':3,8,63 'method':22,72 'node.js':16,89 'programmat':41 'project':45 'proto':66 'quick':52 'releas':32 'requir':88 'runtim':25,69 'server':21 'servic':56 'ship':84 'stabl':31 'support':39 'test':80 'typescript':85,94 'unlik':57 'updat':37 'usag':50 'use':42 'verif':53 'version':26 'without':73","created_at":"2026-06-07T16:54:39.170155+00:00","updated_at":"2026-06-07T16:54:39.170155+00:00","problems":[{"fix":"Use correct import: import GrpcClient from 'grpc-man/lib/Client';","cause":"Import path is incorrect; maybe using 'grpc-man' without '/lib/Client' or typo.","error":"Error: Cannot find module 'grpc-man/lib/Client'"},{"fix":"Provide the absolute or correct relative path to the .proto file.","cause":"Proto file path is incorrect or file missing.","error":"Error: ENOENT: no such file or directory, open '.../path/to/protofile.proto'"},{"fix":"Ensure the gRPC server is started and the endpoint (host:port) is correct.","cause":"gRPC server is not running or endpoint is wrong.","error":"Error: 14 UNAVAILABLE: failed to connect to all addresses"},{"fix":"Inspect the proto file for correct service and method names, and include package prefixes if any.","cause":"Proto file does not define the method or package path is incorrect.","error":"TypeError: client.grpc.helloworld.Greeter.sayHello is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Jeff-Tian/grpc-man#readme","github":"https://github.com/Jeff-Tian/grpc-man","docs":null,"changelog":null,"pypi":null,"npm":"grpc-man","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}