@onreza/nrz 0.14.0 → 0.16.0
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.
- package/README.md.bak +84 -58
- package/package.json +1 -1
- package/scripts/postinstall.js +5 -5
package/README.md.bak
CHANGED
|
@@ -1,101 +1,127 @@
|
|
|
1
|
-
# nrz
|
|
1
|
+
# nrz - ONREZA Platform CLI
|
|
2
2
|
|
|
3
3
|
[](https://github.com/ONREZA/nrz-cli/actions)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
`nrz` is a Rust CLI for ONREZA project lifecycle: detect, dev, build, deploy, database, KV, env vars, domains, and releases.
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
|
-
###
|
|
11
|
-
|
|
12
|
-
**Linux/macOS:**
|
|
10
|
+
### Linux/macOS
|
|
13
11
|
```bash
|
|
14
|
-
curl -fsSL https://raw.githubusercontent.com/
|
|
12
|
+
curl -fsSL https://raw.githubusercontent.com/onreza/nrz-cli/main/install.sh | bash
|
|
15
13
|
```
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
### Windows (PowerShell 7+)
|
|
18
16
|
```powershell
|
|
19
|
-
iwr -useb https://raw.githubusercontent.com/
|
|
17
|
+
iwr -useb https://raw.githubusercontent.com/onreza/nrz-cli/main/install.ps1 | iex
|
|
20
18
|
```
|
|
21
19
|
|
|
22
|
-
###
|
|
20
|
+
### npm
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g @onreza/nrz
|
|
23
|
+
```
|
|
23
24
|
|
|
25
|
+
### From source
|
|
24
26
|
```bash
|
|
25
|
-
cargo install --git https://github.com/
|
|
27
|
+
cargo install --git https://github.com/onreza/nrz-cli
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
##
|
|
30
|
+
## Quick Start
|
|
29
31
|
|
|
30
32
|
```bash
|
|
31
|
-
#
|
|
32
|
-
nrz
|
|
33
|
+
# 1) Authenticate (or pass --token / NRZ_TOKEN in CI)
|
|
34
|
+
nrz login
|
|
33
35
|
|
|
34
|
-
#
|
|
35
|
-
nrz
|
|
36
|
+
# 2) Create local scaffold and optionally link/create platform project
|
|
37
|
+
nrz init
|
|
38
|
+
# alternatives:
|
|
39
|
+
# nrz init --create --name my-app
|
|
40
|
+
# nrz init --project-id proj_abc123
|
|
36
41
|
|
|
37
|
-
#
|
|
38
|
-
nrz
|
|
42
|
+
# 3) Detect framework and persist it to onreza.toml
|
|
43
|
+
nrz detect --save
|
|
39
44
|
|
|
40
|
-
#
|
|
41
|
-
nrz
|
|
42
|
-
nrz kv get mykey
|
|
43
|
-
nrz kv list
|
|
45
|
+
# 4) Local development with ONREZA emulation (KV + DB)
|
|
46
|
+
nrz dev
|
|
44
47
|
|
|
45
|
-
#
|
|
46
|
-
nrz
|
|
47
|
-
nrz db info
|
|
48
|
+
# 5) Validate build output
|
|
49
|
+
nrz build
|
|
48
50
|
|
|
49
|
-
#
|
|
50
|
-
nrz
|
|
51
|
+
# 6) Deploy
|
|
52
|
+
nrz deploy --prod
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
##
|
|
55
|
+
## Core Commands
|
|
54
56
|
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
57
|
+
| Area | Commands |
|
|
58
|
+
|------|----------|
|
|
59
|
+
| Project | `nrz init`, `nrz link`, `nrz projects list`, `nrz projects create --name <slug>` |
|
|
60
|
+
| Build/Deploy | `nrz detect`, `nrz build`, `nrz deploy`, `nrz rollback` |
|
|
61
|
+
| Runtime | `nrz deployments`, `nrz logs` |
|
|
62
|
+
| Database | `nrz db shell`, `nrz db execute "<sql>"`, `nrz db migrate create <name>`, `nrz db migrate apply` |
|
|
63
|
+
| KV | `nrz kv get <key>`, `nrz kv set <key> <value> --ttl 60`, `nrz kv list --prefix app_` |
|
|
64
|
+
| Environment | `nrz env list`, `nrz env pull`, `nrz env push .env.local --declared-only`, `nrz env validate` |
|
|
65
|
+
| Domains | `nrz domains list`, `nrz domains add example.com`, `nrz domains verify <domain_id>` |
|
|
66
|
+
| Account | `nrz whoami`, `nrz workspace list`, `nrz workspace switch <slug>`, `nrz upgrade` |
|
|
61
67
|
|
|
62
|
-
##
|
|
68
|
+
## Agent Skills
|
|
63
69
|
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
## Development
|
|
70
|
+
This repository includes reusable skills for AI coding assistants in `skills/`:
|
|
71
|
+
- `nrz-cli-deploy`
|
|
72
|
+
- `nrz-cli-ci-automation`
|
|
73
|
+
- `nrz-cli-env-db-kv`
|
|
74
|
+
- `nrz-cli-project-bootstrap`
|
|
71
75
|
|
|
76
|
+
Install from Context7:
|
|
72
77
|
```bash
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
npx ctx7 skills install /onreza/nrz-cli nrz-cli-deploy
|
|
79
|
+
npx ctx7 skills install /onreza/nrz-cli nrz-cli-ci-automation
|
|
80
|
+
npx ctx7 skills install /onreza/nrz-cli nrz-cli-env-db-kv
|
|
81
|
+
npx ctx7 skills install /onreza/nrz-cli nrz-cli-project-bootstrap
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Automation and JSON Mode
|
|
75
85
|
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
The CLI is designed for both human and machine usage:
|
|
87
|
+
- Global flags: `--json`, `--token`, `--workspace`, `--env`.
|
|
88
|
+
- Env vars: `NRZ_JSON`, `NRZ_TOKEN`, `NRZ_WORKSPACE`, `NRZ_ENV`.
|
|
89
|
+
- In JSON mode, commands return structured output in `stdout`; errors are JSON with exit code `1`.
|
|
78
90
|
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
Example:
|
|
92
|
+
```bash
|
|
93
|
+
nrz deploy --json --token "$NRZ_TOKEN" --workspace my-team --env production
|
|
81
94
|
```
|
|
82
95
|
|
|
83
|
-
##
|
|
96
|
+
## Configuration
|
|
84
97
|
|
|
85
|
-
|
|
98
|
+
Project configuration is stored in `onreza.toml` (committed to git). Local runtime state is stored in `.onreza/` (must stay gitignored).
|
|
86
99
|
|
|
100
|
+
Reference:
|
|
101
|
+
- [`docs/onreza-toml.md`](docs/onreza-toml.md)
|
|
102
|
+
- [`onreza.schema.json`](onreza.schema.json)
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npm run prepare # install git hooks (lefthook)
|
|
108
|
+
cargo fmt # format Rust code
|
|
109
|
+
cargo clippy -- -D warnings # strict lint
|
|
110
|
+
cargo test # all tests
|
|
111
|
+
cargo build --release # release build
|
|
87
112
|
```
|
|
88
|
-
feat(scope): add new feature
|
|
89
|
-
fix(scope): fix bug
|
|
90
|
-
docs(scope): update documentation
|
|
91
|
-
perf(scope): optimize performance
|
|
92
|
-
```
|
|
93
113
|
|
|
94
|
-
|
|
114
|
+
Commit messages are validated with Conventional Commits via `commitlint` + `lefthook`, format: `type(scope): subject`.
|
|
115
|
+
|
|
116
|
+
## Supported Binary Targets
|
|
95
117
|
|
|
96
|
-
|
|
97
|
-
|
|
118
|
+
| Target |
|
|
119
|
+
|--------|
|
|
120
|
+
| `linux-x64` |
|
|
121
|
+
| `darwin-x64` |
|
|
122
|
+
| `darwin-arm64` |
|
|
123
|
+
| `win32-x64` |
|
|
98
124
|
|
|
99
125
|
## License
|
|
100
126
|
|
|
101
|
-
MIT
|
|
127
|
+
MIT
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -13,13 +13,13 @@ const __dirname = dirname(__filename);
|
|
|
13
13
|
|
|
14
14
|
const MANIFEST = {
|
|
15
15
|
"assets": {
|
|
16
|
-
"linux-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.
|
|
17
|
-
"darwin-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.
|
|
18
|
-
"darwin-arm64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.
|
|
19
|
-
"win32-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.
|
|
16
|
+
"linux-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.16.0/nrz-linux-x64.tar.gz",
|
|
17
|
+
"darwin-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.16.0/nrz-darwin-x64.tar.gz",
|
|
18
|
+
"darwin-arm64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.16.0/nrz-darwin-arm64.tar.gz",
|
|
19
|
+
"win32-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.16.0/nrz-win32-x64.tar.gz"
|
|
20
20
|
},
|
|
21
21
|
"binName": "nrz",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.16.0"
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const platformKey = `${platform}-${arch}`;
|