@rtorr/nah 1.0.13 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +35 -55
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,60 +9,38 @@ When you deploy a native application, someone must figure out how to launch it:
9
9
 
10
10
  NAH eliminates this by making applications self-describing. Apps declare what they need. SDKs declare what they provide. Hosts declare policy. NAH composes these into a launch contract - the exact parameters needed to run the application.
11
11
 
12
- ## What NAH Provides
13
-
14
- **For host operators**: Install an app, query its launch contract. No need to read documentation or reverse-engineer scripts. The contract tells you the binary path, library paths, environment variables, and working directory.
15
-
16
- **For app developers**: Embed a manifest declaring your SDK requirement and entrypoint. Ship one package that works on any host with a compatible SDK, regardless of where the SDK is installed.
17
-
18
- **For SDK developers**: Package your libraries once. Multiple versions coexist on the same host. Apps pin to compatible versions at install time. Update the SDK without breaking existing apps.
19
-
20
12
  ## Example
21
13
 
22
14
  ```bash
23
- # Install from local files
24
- nah --root /opt/nah nak install vendor-sdk-2.1.0.nak
25
- nah --root /opt/nah app install myapp-1.0.0.nap
26
-
27
- # Or install directly from URLs
28
- nah --root /opt/nah nak install https://example.com/vendor-sdk-2.1.0.nak
29
- nah --root /opt/nah app install https://example.com/myapp-1.0.0.nap
15
+ # Install packages
16
+ nah install vendor-sdk-2.1.0.nak
17
+ nah install myapp-1.0.0.nap
30
18
 
31
19
  # Query the launch contract
32
- nah --root /opt/nah contract show com.example.myapp
20
+ nah status com.example.myapp
33
21
  ```
34
22
 
35
23
  ```
36
24
  Application: com.example.myapp v1.0.0
37
- SDK: com.vendor.sdk v2.1.0
25
+ NAK: com.vendor.sdk v2.1.0
38
26
  Binary: /opt/nah/apps/com.example.myapp-1.0.0/bin/myapp
39
27
  CWD: /opt/nah/apps/com.example.myapp-1.0.0
40
28
  Library Paths: /opt/nah/naks/com.vendor.sdk/2.1.0/lib
41
- Environment:
42
- NAH_APP_ID=com.example.myapp
43
- NAH_APP_VERSION=1.0.0
44
- NAH_NAK_ROOT=/opt/nah/naks/com.vendor.sdk/2.1.0
45
29
  ```
46
30
 
47
31
  The contract is deterministic. Same inputs, same output. Auditable before execution.
48
32
 
49
- ## Key Properties
50
-
51
- - **No network at launch time**: Contract composition uses only local state
52
- - **No dependency solving**: Apps declare requirements, hosts install SDKs, NAH matches them
53
- - **Version coexistence**: Multiple SDK versions installed side-by-side
54
- - **Install-time pinning**: SDK version locked when app is installed, not resolved at launch
55
- - **Host controls layout**: SDKs and apps go where the host decides, not where the app expects
56
-
57
- ## When to Use NAH
33
+ ## CLI
58
34
 
59
- NAH is designed for environments where:
60
-
61
- - Apps and SDKs come from different vendors or teams
62
- - Hosts need to control where software is installed
63
- - Multiple SDK versions must coexist for different apps
64
- - Launch configuration must be auditable
65
- - Apps must remain portable across different host configurations
35
+ ```
36
+ nah install <source> Install app (.nap) or SDK (.nak)
37
+ nah uninstall <id> Remove a package
38
+ nah list List installed packages
39
+ nah pack <dir> Create a package
40
+ nah status [target] Show status and diagnose issues
41
+ nah init <type> <dir> Create new project (app, nak, root)
42
+ nah profile list|set Manage host profiles
43
+ ```
66
44
 
67
45
  ## Installation
68
46
 
@@ -70,24 +48,17 @@ NAH is designed for environments where:
70
48
  # npm (recommended)
71
49
  npm install -g @rtorr/nah
72
50
 
73
- # Linux (manual)
51
+ # Linux
74
52
  curl -L https://github.com/rtorr/nah/releases/latest/download/nah-linux-x64.tar.gz | tar xz
75
53
  sudo mv nah /usr/local/bin/
76
54
 
77
- # macOS (manual)
55
+ # macOS
78
56
  curl -L https://github.com/rtorr/nah/releases/latest/download/nah-macos-arm64.tar.gz | tar xz
79
57
  sudo mv nah /usr/local/bin/
80
-
81
- # From source
82
- git clone https://github.com/rtorr/nah.git && cd nah
83
- cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build
84
- sudo cmake --install build
85
58
  ```
86
59
 
87
60
  ## Library Integration
88
61
 
89
- NAH can be embedded as a C++ library:
90
-
91
62
  ```cmake
92
63
  include(FetchContent)
93
64
  FetchContent_Declare(nah GIT_REPOSITORY https://github.com/rtorr/nah.git GIT_TAG v1.0.0)
@@ -95,17 +66,26 @@ FetchContent_MakeAvailable(nah)
95
66
  target_link_libraries(your_target PRIVATE nahhost)
96
67
  ```
97
68
 
69
+ ## Platform Support
70
+
71
+ | Platform | Status |
72
+ |----------|--------|
73
+ | Linux (x64, arm64) | Supported |
74
+ | macOS (x64, arm64) | Supported |
75
+ | Windows | Code exists, not actively tested |
76
+ | Android | Planned for future release |
77
+
98
78
  ## Documentation
99
79
 
100
- | Document | Description |
101
- |----------|-------------|
102
- | [Concepts](docs/concepts.md) | Core terminology: manifests, NAKs, profiles, contracts |
103
- | [Getting Started: Host](docs/getting-started-host.md) | Set up a host and deploy applications |
104
- | [Getting Started: SDK](docs/getting-started-nak.md) | Package an SDK for distribution |
105
- | [Getting Started: App](docs/getting-started-app.md) | Build an application with a manifest |
106
- | [CLI Reference](docs/cli.md) | Command-line interface documentation |
107
- | [Specification](SPEC.md) | Normative specification |
108
- | [Contributing](CONTRIBUTING.md) | Development setup and releasing |
80
+ - [How It Works](docs/how-it-works.md) - Internals of the launch contract system
81
+ - [Concepts](docs/concepts.md) - Core terminology: manifests, NAKs, profiles, contracts
82
+ - [Getting Started: Host](docs/getting-started-host.md) - Set up a host and deploy applications
83
+ - [Getting Started: SDK](docs/getting-started-nak.md) - Package an SDK for distribution
84
+ - [Getting Started: App](docs/getting-started-app.md) - Build an application with a manifest
85
+ - [CLI Reference](docs/cli.md) - Command-line interface documentation
86
+ - [Troubleshooting](docs/troubleshooting.md) - Common issues and solutions
87
+ - [Specification](SPEC.md) - Normative specification
88
+ - [Contributing](CONTRIBUTING.md) - Development setup and releasing
109
89
 
110
90
  ## License
111
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtorr/nah",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "description": "Native Application Host - Manage native applications, NAKs, profiles, and launch contracts",
5
5
  "keywords": [
6
6
  "native",