@rtorr/nah 1.0.15 → 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 +28 -81
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,25 +9,13 @@ 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 packages (auto-detects .nap/.nak)
15
+ # Install packages
24
16
  nah install vendor-sdk-2.1.0.nak
25
17
  nah install myapp-1.0.0.nap
26
18
 
27
- # Or install directly from URLs
28
- nah install https://example.com/vendor-sdk-2.1.0.nak
29
- nah install https://example.com/myapp-1.0.0.nap
30
-
31
19
  # Query the launch contract
32
20
  nah status com.example.myapp
33
21
  ```
@@ -38,87 +26,39 @@ 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 (NAH_*):
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
- ## CLI Overview
33
+ ## CLI
50
34
 
51
35
  ```
52
- nah install <source> Install app or NAK (auto-detected from .nap/.nak)
53
- nah uninstall <id> Remove an installed package
54
- nah list List installed apps and NAKs
55
- nah pack <dir> Create a .nap or .nak package
56
- nah status [target] Show status, validate files, diagnose issues
57
- nah init <type> <dir> Create new project (app, nak, or root)
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)
58
42
  nah profile list|set Manage host profiles
59
43
  ```
60
44
 
61
- ## Decision Flowchart
62
-
63
- ```
64
- What are you building?
65
-
66
- ├─ An application that uses an SDK
67
- │ └─ Create an app with: nah init app ./myapp
68
- │ Then install with: nah install myapp.nap
69
-
70
- ├─ An SDK/framework for apps to use
71
- │ └─ Create a NAK with: nah init nak ./mysdk
72
- │ Then install with: nah install mysdk.nak
73
-
74
- └─ A host to run NAH applications
75
- └─ Create a root with: nah init root ./my-nah
76
- Then install packages: nah install <package>
77
- Then check status: nah status
78
- ```
79
-
80
- ## Key Properties
81
-
82
- - **No network at launch time**: Contract composition uses only local state
83
- - **No dependency solving**: Apps declare requirements, hosts install SDKs, NAH matches them
84
- - **Version coexistence**: Multiple SDK versions installed side-by-side
85
- - **Install-time pinning**: SDK version locked when app is installed, not resolved at launch
86
- - **Host controls layout**: SDKs and apps go where the host decides, not where the app expects
87
-
88
- ## When to Use NAH
89
-
90
- NAH is designed for environments where:
91
-
92
- - Apps and SDKs come from different vendors or teams
93
- - Hosts need to control where software is installed
94
- - Multiple SDK versions must coexist for different apps
95
- - Launch configuration must be auditable
96
- - Apps must remain portable across different host configurations
97
-
98
45
  ## Installation
99
46
 
100
47
  ```bash
101
48
  # npm (recommended)
102
49
  npm install -g @rtorr/nah
103
50
 
104
- # Linux (manual)
51
+ # Linux
105
52
  curl -L https://github.com/rtorr/nah/releases/latest/download/nah-linux-x64.tar.gz | tar xz
106
53
  sudo mv nah /usr/local/bin/
107
54
 
108
- # macOS (manual)
55
+ # macOS
109
56
  curl -L https://github.com/rtorr/nah/releases/latest/download/nah-macos-arm64.tar.gz | tar xz
110
57
  sudo mv nah /usr/local/bin/
111
-
112
- # From source
113
- git clone https://github.com/rtorr/nah.git && cd nah
114
- cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build
115
- sudo cmake --install build
116
58
  ```
117
59
 
118
60
  ## Library Integration
119
61
 
120
- NAH can be embedded as a C++ library:
121
-
122
62
  ```cmake
123
63
  include(FetchContent)
124
64
  FetchContent_Declare(nah GIT_REPOSITORY https://github.com/rtorr/nah.git GIT_TAG v1.0.0)
@@ -126,19 +66,26 @@ FetchContent_MakeAvailable(nah)
126
66
  target_link_libraries(your_target PRIVATE nahhost)
127
67
  ```
128
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
+
129
78
  ## Documentation
130
79
 
131
- | Document | Description |
132
- |----------|-------------|
133
- | [How It Works](docs/how-it-works.md) | Internals of the launch contract system |
134
- | [Concepts](docs/concepts.md) | Core terminology: manifests, NAKs, profiles, contracts |
135
- | [Getting Started: Host](docs/getting-started-host.md) | Set up a host and deploy applications |
136
- | [Getting Started: SDK](docs/getting-started-nak.md) | Package an SDK for distribution |
137
- | [Getting Started: App](docs/getting-started-app.md) | Build an application with a manifest |
138
- | [CLI Reference](docs/cli.md) | Command-line interface documentation |
139
- | [Troubleshooting](docs/troubleshooting.md) | Common issues and solutions |
140
- | [Specification](SPEC.md) | Normative specification |
141
- | [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
142
89
 
143
90
  ## License
144
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtorr/nah",
3
- "version": "1.0.15",
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",