The hos command and the SDK
What @hos-ai/cli and @hos-ai/sdk do, which one you need, and what they do not do.
On this page
In short
HOS gives hotel systems one way to say what happened, and rules that every system applies the same way. Two free tools check that a system follows them: the hos command, which needs no code, and the SDK, for developers who build in TypeScript or JavaScript. Both are alphas, like the HOS 0.1 draft they check.
Two tools
The hos command, @hos-ai/cli | The SDK, @hos-ai/sdk | |
|---|---|---|
| For | anyone who can open a terminal | developers who write TypeScript or JavaScript |
| What it does | checks files, tests a system in any language, checks a producer, signs manifests | the same checks inside your code, and helps build facts and adapters |
| Runs | in a terminal, on Windows, macOS and Linux | in Node.js, and in a browser through a bundler |
| Needs | Node.js 22 or later | Node.js 22 or later |
What the hos command does:
hos validatechecks HOS files and streams against the schemas and rules of HOS 0.1.hos replayplays a stream back and shows what a consumer does with each fact.hos conformance runtests a system that receives HOS facts against the conformance scenarios, whatever language it is written in.hos conformance producerchecks what a system publishes against its manifest.hos manifestcreates keys, signs a producer's manifest and verifies it.
Both carry the HOS schemas and the conformance scenarios, so they work offline.
Which one do I need?
- You want to check files, test a system written in any language, or sign a manifest: the hos command. Start with the Quickstart.
- You write TypeScript or JavaScript, and want the checks inside your code or your tests, or you build a producer: the SDK. Install it.
- You received a report and want to understand it: Read a HOS report.
- You are new to HOS: Concepts explains the ideas in plain language.
Where they fit
Producers
HOS facts
Consumers
Check a producer
hos validate, hos conformance producer, hos manifest; in code, createFactWriter and checkProducer.Check a consumer
hos conformance run, in any language; in code, the processing rules of the SDK.Systems that publish HOS facts, the producersProducerA system that publishes HOS facts, such as a property management system (PMS) or a housekeeping app. Its manifest says what it publishes., such as a PMS or a housekeeping app, send them to systems that receive them, the consumersConsumerA system that receives HOS facts and decides what to do with each one., such as an operations dashboard. The tools check both sides:
- a producer: its manifestManifestA producer's declaration: the facts it publishes and for which properties, the values it is the authority for, how it delivers, replays and keeps them, and its known limitations. The producer signs it., the facts it publishes, and what it publishes again when it restarts;
- a consumer: the dispositionsDispositionWhat a consumer does with a fact it receives: applied, or set aside as a duplicate, superseded by a later fact, non_authoritative when its producer is not the authority, or undeclared_capability when its producer did not declare it. it gives each fact of the conformance scenarios, and optionally how it reads arrivals.
What they do not do
- They do not certify. Passing the scenarios or the producer checks is a self-check. No HOS certification exists yet. See what a report proves.
- They do not connect hotel systems. Nothing here receives, stores or forwards live facts between systems, and the packages contain no connector to a real PMS. The Mews, Apaleo and Cloudbeds mappings on this site are unofficial adapters, shown in the demos.
- They check a draft. HOS 0.1 is a draft: names and fields may still change, and the tools with it.
- Their arrival reading is an example. The readiness and situations they compute come from a reference projection that is not normative.
Versions
| What | Version | Note |
|---|---|---|
| @hos-ai/cli | 0.1.0-alpha.1 | The hos command |
| @hos-ai/sdk | 0.1.0-alpha.1 | The SDK, always the same version as the command |
| HOS | 0.1.0-draft.2 | The draft of the specification both implement |
| Conformance protocol | hos-conformance/1 | How hos talks to the program it tests |
| Node.js | 22 or later | What both need to run |
The command and the SDK are released together, with the same number, 0.1.0-alpha.N until HOS 0.1 is final. Each package's changelog lists the changes: the command, the SDK.
Next steps
- Install the tools, or check that Node.js 22 is there.
- Follow the Quickstart: ten minutes, no code.
- Then the guide for your role, from the list above.