{"id":23973535,"url":"https://github.com/innovatrics/sfcli","last_synced_at":"2025-02-24T15:48:38.571Z","repository":{"id":39638162,"uuid":"486909362","full_name":"innovatrics/sfcli","owner":"innovatrics","description":"CLI for SmartFace platform","archived":false,"fork":false,"pushed_at":"2022-05-30T07:39:21.000Z","size":182,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-07T04:59:04.451Z","etag":null,"topics":["cli","face-recognition","innovatrics","smartface"],"latest_commit_sha":null,"homepage":"https://www.innovatrics.com/face-recognition-solutions/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/innovatrics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-29T09:15:01.000Z","updated_at":"2024-01-16T17:05:07.000Z","dependencies_parsed_at":"2022-09-16T12:11:27.646Z","dependency_job_id":null,"html_url":"https://github.com/innovatrics/sfcli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatrics%2Fsfcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatrics%2Fsfcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatrics%2Fsfcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatrics%2Fsfcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/innovatrics","download_url":"https://codeload.github.com/innovatrics/sfcli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240509806,"owners_count":19813216,"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","face-recognition","innovatrics","smartface"],"created_at":"2025-01-07T04:59:23.457Z","updated_at":"2025-02-24T15:48:38.548Z","avatar_url":"https://github.com/innovatrics.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sfcli\n\nsfcli is a command-line utility which can be used to interact with SmartFace API.\nExit code of sfcli utility is 0 in case of success and nonzero number in case of any failure.\n\n### Syntax\n\n```\nsfcli command [subcommand] [option1, option2, ...]\n```\n\n##### Example:\nCommand `camera` with subcommand `get` with no options\n```\n sfcli camera get \n```\n\nWill list all existing camera processors. \n\n##### Options:\nOption are supported in long form prepended by double dash:\n```\nsfcli camera get --id 2976ac85-f570-4bec-9561-ce5b2ec1d234\n```\nas well in short form.\n```\nsfcli camera get -i:2976ac85-f570-4bec-9561-ce5b2ec1d234\nsfcli camera get -i=2976ac85-f570-4bec-9561-ce5b2ec1d234\nsfcli camera get -i 2976ac85-f570-4bec-9561-ce5b2ec1d234\n```\n\n### API location\n\n##### HTTP\n\nTarget HTTP API location can be defined by `--api-url` and `--odata-url` options. Default value for API URL is `http://localhost:8098` and default value for OData URL is `http://localhost:8099`.\n\n```sh\n$ sfcli --api-url http://localhost:8098 --odata-url http://localhost:8099\n```\n\nExample camera command with defined API url option:\n\n```sh\n$ sfcli --api-url http://localhost:8098 camera get\n```\n\nBoth URLs can overridden by setting `sfcli_url_api` and `sfcli_url_odata` environment variables.\n\n##### ZeroMQ\nSmartface notifications are published via ZeroMQ, sfcli utility uses non configurable default smartface port 2406. \nFor more info about notifications please see command `notifications`.\n\n### Commands\n\n```\nOptions:\n  --api-url        SmartFace REST API url (e.g. \"http://smartfaceserver:8098\"). Defaults to \"http://localhost:8098\". Can be overridden by environment\n                   variable sfcli_url_api\n  --odata-url      SmartFace ODATA API base url (e.g. \"http://smartfaceserver:8099\"). Defaults to \"http://localhost:8099\". Can be overridden by environment\n                   variable sfcli_url_odata\n  --zero-mq-host   Hostname where SFBase service is available\n  -?|-h|--help     Show help information\n\nCommands:\n  camera           View or edit properties of camera configuration\n  notifications    Receive and print notifications to console\n  query            Select entities using Language Integrated Query (LINQ)\n  watchlistmember  Operations with watchlist member\n```\n\n#### notifications\n\nCommand prints notifications of specific topic provided in option. Requires ctrl+c or new line to exit.\n\n```\nOptions:\n  -t|--topic    Specify topic of notifications [faces.insert, faces.extracted, grouping_progress.info,\n                inputFiles.update, tracklets.completed, matchResults.match, matchResults.nomatch,\n                matchResults.match.insert, liveness.result, heartbeat]\n  -?|-h|--help  Show help information\n```\n\nExample:\n```sh\n$ sfcli --zero-mq-host localhost notifications -t:matchResults.match.insert\n```\n\n#### watchlistmember\n\nThis command mnipulates with watchlistmember entities.\n\n```\nOptions:\n  -?|-h|--help     Show help information\n\nCommands:\n  register         Register single watchlist member\n  registerFromDir  Register WatchlistMember entities from photos in directory in format\n                   {watchlistmember_id}.(jpeg|jpg|png)\n```\n\n##### watchlistmember register\n\nCreate or update watchlist member with all required related entities. Unique ids are supposed to be generated by clients (e.g. GUIDs or external id from another system).\n\nCreate :\nIf Id of watchlist(s) or watchlist member do not exists in database, new ones with provided external id will be created for you automatically.\n\nReplace:\nIf you want to link watchlist member to other watchlist(s) or change photos of existing watchlist member, use existing external Ids of entities.\n\nNOTE: All watchlist member related data that exists before callling this method will be deleted/unlinked and new one by payload will be recreated.\n\n```\nOptions:\n  -i|--id\n  -w|--watchlistIds\n  -p|--photos \u003cFILE\u003e\n  -?|-h|--help        Show help information\n```\n\nExample:\n```sh\n$ sfcli watchlistmember register -i:external_wlMember_id -w:123 -w:567 -p:face1.jpg -p:face2.jpg\n```\nThis command will create/replace watchlist member with faces from photo files (face1.jpg, face2.jpg) and link this watchlist member to watchlists with external ids (123, 567).\n\n##### watchlistmember registerFromDir\n\nThis command will register multiple watchlist members from directory with photos. It will take all image files from given directory which name conforms with format  \"{watchlistmember_id}.(jpeg|jpg|png)\" and register photos for each id as watchlist member.\nExample file name \"ext123.jpeg\". \n\n###### Option --metaDataFile\nIf you need to fill additional data to watchlist member like FullName, DisplayName or Note then use option `-m`. \nWatchlistMember will be registred from json file which contains array of objects, where each object represents data for watchlist member.\nThis json file is expected to be in specified directory (option `--dirToPhotos`). Name of json file is irrelevant. \n\n```\nOptions:\nOptions:\n  -w|--watchlistIds\n  -d|--dirToPhotos\n  -m|--metaDataFile  Use this option when you can provide single json file in selected directory with meta data for WatchlistMember. In this case could be use any name for photo file\n                     [\n                     {\n                     \"Id\": \"120\",\n                     \"DisplayName\": \"Display name\",\n                     \"FullName\": \"Full name\",\n                     \"Note\": \"Example note\",\n                     \"PhotoFiles\": [\"file1.jpeg\", \"file2.jpeg\"]\n                     }\n                     ]\n\n  -p|--parallel      Max degree of parallelism, default value is 1\n  -?|-h|--help       Show help information\n```\n\nExample:\n```sh\nsfcli watchlistmember registerFromDir -w:fingera -d:\"d:\\Fingera Registration Photo\"\n```\n\n#### camera\n\nThis command allow to create, update, delete or view settings of a camera. Camera is domain entity which groups some data entities, workers and configs. That allows you to add live stream from IP camera and easily change processing properties.\n\nNOTE: camera id is a unique identifier of a camera\n\n```\nOptions:\n  -?|-h|--help  Show help information\n\nCommands:\n  add           Create new camera\n  get           Read properties of camera\n  delete        Delete a camera\n  set           Edit properties of a camera\n```\nExample (create camera):\n```sh\n$ sfcli camera add -s:c:\\temp\\wafs.mp4\n```\nExample (start camera):\n```sh\n$ sfcli camera set -e:true -i:2976ac85-f570-4bec-9561-ce5b2ec1d234\n```\n\n##### camera add\n\nCreate a camera. `--name` and `--source` options are required.\n\n```\nOptions:\n  -n|--name                           [Required] Name of the new camera.\n  -s|--source                         [Required] Url to video E.g. rtsp://server.example.org:8080/test.sdp\n  -e|--enabled                        Whether the stream is processed or not\n  -m|--minFaceSize                    Minimum count of pixels between eyes\n  -x|--maxFaceSize                    Maximum count of pixels between eyes\n  -r|--redetectionTime                Time between face re-detections in milliseconds\n  -p|--mpeg1PreviewPort               Port to processed stream MPEG1 preview\n  -tg|--templateGeneratorResourceId   Template generator resource id for the camera\n  -fd|--faceDetectorResourceId        Face detector resource id for the camera\n  -pd|--pedestrianDetectorResourceId  Pedestrian detector resource id for the camera\n  -mp|--minPedestrianSize             Minimum size of detected pedestrian in pixels (if \u003e= 1) or relative to the longer edge of the processed video (if \u003e 0 \u0026\u0026 \u003c 1)\n  -xp|--maxPedestrianSize             Maximum size of detected pedestrian in pixels (if \u003e= 1) or relative to the longer edge of the processed video (if \u003e 0 \u0026\u0026 \u003c 1)\n  -sd|--spoofDetectorResourceId       Spoof detector resource id for the camera\n  -?|-h|--help                        Show help information\n```\n\n##### camera get\n\nRead properties of a camera. If `--id` option is not provided then all cameras are listed.\n\n```\nOptions:\n  -i|--id  Id of camera to get. If empty, all cameras will be fetched.\n  -?|-h|--help   Show help information\n```\n\n##### camera delete\n\nDelete a camera.\n\n```\nOptions:\n  -i|--id         [Required] Id of camera to delete.\n  -?|-h|--help    Show help information\n```\n\n##### camera set\n\nChange properties of a camera. `--id` is required. Only filled properties will be changed on the camera.\n\n```\nOptions:\n  -i|--id                             [Required] Identifier of camera to edit\n  -n|--name                           Name of the camera\n  -s|--source                         Url to video E.g. rtsp://server.example.org:8080/test.sdp\n  -e|--enabled                        Whether the stream is processed or not\n  -m|--minFaceSize                    Minimum count of pixels between eyes\n  -x|--maxFaceSize                    Maximum count of pixels between eyes\n  -r|--redetectionTime                Time between face re-detections in milliseconds\n  -p|--mpeg1PreviewPort               Port to processed stream MPEG1 preview\n  -tg|--templateGeneratorResourceId   Template generator resource id for the camera\n  -fd|--faceDetectorResourceId        Face detector resource id for the camera\n  -pd|--pedestrianDetectorResourceId  Pedestrian detector resource id for the camera\n  -mp|--minPedestrianSize             Minimum size of detected pedestrian in pixels (if \u003e= 1) or relative to the longer edge of the processed video (if \u003e 0 \u0026\u0026 \u003c 1)\n  -xp|--maxPedestrianSize             Maximum size of detected pedestrian in pixels (if \u003e= 1) or relative to the longer edge of the processed video (if \u003e 0 \u0026\u0026 \u003c 1)\n  -sd|--spoofDetectorResourceId       Spoof detector resource id for the camera\n  -?|-h|--help                        Show help information\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovatrics%2Fsfcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnovatrics%2Fsfcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovatrics%2Fsfcli/lists"}