{"id":19230644,"url":"https://github.com/ctron/hat","last_synced_at":"2025-04-21T03:31:13.023Z","repository":{"id":140053001,"uuid":"157575327","full_name":"ctron/hat","owner":"ctron","description":"Eclipse Hono™ Admin Tool","archived":false,"fork":false,"pushed_at":"2020-07-17T16:35:31.000Z","size":210,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T08:26:20.641Z","etag":null,"topics":["eclipse-hono","eclipse-iot","iot"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ctron"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-11-14T16:09:25.000Z","updated_at":"2023-10-29T20:44:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b456c2f-d8b0-4d3d-a065-8d937287256d","html_url":"https://github.com/ctron/hat","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fhat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fhat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fhat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fhat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctron","download_url":"https://codeload.github.com/ctron/hat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249990916,"owners_count":21357169,"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":["eclipse-hono","eclipse-iot","iot"],"created_at":"2024-11-09T15:39:59.233Z","updated_at":"2025-04-21T03:31:13.001Z","avatar_url":"https://github.com/ctron.png","language":"Rust","funding_links":["https://github.com/sponsors/ctron"],"categories":[],"sub_categories":[],"readme":"# HAT – Hono Admin Tool [![GitHub release](https://img.shields.io/github/release/ctron/hat.svg)](https://github.com/ctron/hat/releases)\n\nGetting help:\n\n    hat --help\n\n## Global switches\n\nTemporarily use a different context (with `-c` or `--context`):\n\n    hat -c context2 device create …\n\nOr override a tenant (with `-t` or `--tenant`):\n\n    hat -t my.tenant device get …\n\n## Managing contexts\n\nCreate a new context:\n\n    hat context create foo https://device-registry.hono.my\n\nCreate a new context with credentials:\n\n    hat context create foo https://device-registry.hono.my --username \u003cusername\u003e --password \u003cpassword\u003e\n\nCreate a new context, using local Kubernetes token:\n\n    hat context create foo https://device-registry.hono.my --use-kubernetes\n\nUpdate an existing context:\n\n    hat context update foo --url https://device-registry.hono.my\n    hat context update foo --username \u003cusername\u003e --password \u003cpassword\u003e\n    hat context update foo --use-kubernetes\n\nDelete an existing context:\n\n    hat context delete foo\n\nSwitch to an existing context:\n\n    hat context switch foo\n\nList existing contexts:\n\n    hat context list\n\n### Default tenant\n\nIt is possible to set a *default tenant*, which is used on all calls when using\nthis context.\n\nSet a default tenant when creating a context:\n\n    hat context create foo https://device-registry.hono.my --tenant \u003ctenant\u003e\n\nOr update later:\n\n    hat context update foo https://device-registry.hono.my --tenant \u003ctenant\u003e\n\nIt is possible to override the default tenant with `-t` or `--tenant`:\n\n    hat device create -t my-tenant 4711\n\nOr by setting the environment variable `HAT_TENANT`:\n\n    HAT_TENANT=foo hat device create 4711\n\n## Tenants\n\nCreating a new tenant:\n\n    hat tenant create my-tenant\n\nCreating a new tenant with payload:\n\n    hat tenant create my-tenant '{\"enabled\": false}'\n\nGetting a tenant:\n\n    hat tenant get my-tenant\n\nDeleting a tenant:\n\n    hat tenant delete my-tenant\n\nEnable/Disable a tenant:\n\n    hat tenant enable my-tenant\n    hat tenant disable my-tenant\n    \n## Device registrations\n\nRegister a new device:\n\n    hat device create 4711\n\nRegister a new device with payload:\n\n    hat device create 4711 '{…}'\n\nInspect the device:\n\n    hat device get 4711\n\nEnable/Disable a device:\n\n    hat device enable 4711\n    hat device disable 4711\n\n### Set via\n\nYou can also set the \"via\" attribute directly:\n\n    hat device set-via 4711 my-gw\n\n### Set defaults entry\n\nSet a defaults entry using:\n\n    hat device set-defaults 4711 key value\n\nThe value will be converted into a JSON value. If it cannot\nbe parsed, it will be stored as a string (depending on the\nshell you are using, you might need different quotation marks):\n\n    hat device set-defaults 4711 key true           # Booolean: true\n    hat device set-defaults 4711 key '\"true\"'       # String: true\n    hat device set-defaults 4711 key 123            # Number: 123\n    hat device set-defaults 4711 key '\"123\"'        # String: 123\n    hat device set-defaults 4711 key foobar         # String: foobar\n    hat device set-defaults 4711 key '{\"foo\":123}'  # Object: {\"foo\":123}\n\nDelete an entry by omitting the value:\n\n    hat device set-defaults 4711 key value\n\n## Credentials\n\nReplace credentials:\n\n    hat creds set device1 '[]'\n\nClear all credentials:\n\n    hat creds set device1\n\nAdd a password:\n\n    hat creds add-password device1 sensor1 password\n\nSet password as only password:\n\n    hat creds set-password device1 sensor1 password\n\nSet password with pre-hashed password:\n\n    hat creds set-password device1 sensor1 password --hash sha-512\n\nSet PSK:\n\n    hat creds set-psk device1 sensor1 PSK\n\nEnable X509:\n\n    hat creds enable-x509 device1 sensor1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fhat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctron%2Fhat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fhat/lists"}