@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 CHANGED
@@ -1,101 +1,127 @@
1
- # nrz ONREZA Platform CLI
1
+ # nrz - ONREZA Platform CLI
2
2
 
3
3
  [![CI](https://github.com/ONREZA/nrz-cli/actions/workflows/release.yml/badge.svg)](https://github.com/ONREZA/nrz-cli/actions)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
5
 
6
- > Analog of `vercel` / `wrangler` for ONREZA platform. Rust-based, single binary.
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
- ### Quick Install
11
-
12
- **Linux/macOS:**
10
+ ### Linux/macOS
13
11
  ```bash
14
- curl -fsSL https://raw.githubusercontent.com/ONREZA/nrz-cli/main/install.sh | bash
12
+ curl -fsSL https://raw.githubusercontent.com/onreza/nrz-cli/main/install.sh | bash
15
13
  ```
16
14
 
17
- **Windows (PowerShell):**
15
+ ### Windows (PowerShell 7+)
18
16
  ```powershell
19
- iwr -useb https://raw.githubusercontent.com/ONREZA/nrz-cli/main/install.ps1 | iex
17
+ iwr -useb https://raw.githubusercontent.com/onreza/nrz-cli/main/install.ps1 | iex
20
18
  ```
21
19
 
22
- ### From Source
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/ONREZA/nrz-cli
27
+ cargo install --git https://github.com/onreza/nrz-cli
26
28
  ```
27
29
 
28
- ## Usage
30
+ ## Quick Start
29
31
 
30
32
  ```bash
31
- # Development mode with platform emulation
32
- nrz dev
33
+ # 1) Authenticate (or pass --token / NRZ_TOKEN in CI)
34
+ nrz login
33
35
 
34
- # Validate build output
35
- nrz build
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
- # Deploy to platform
38
- nrz deploy
42
+ # 3) Detect framework and persist it to onreza.toml
43
+ nrz detect --save
39
44
 
40
- # Manage KV store
41
- nrz kv set mykey "my value"
42
- nrz kv get mykey
43
- nrz kv list
45
+ # 4) Local development with ONREZA emulation (KV + DB)
46
+ nrz dev
44
47
 
45
- # Manage D1-compatible SQLite database
46
- nrz db execute "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)"
47
- nrz db info
48
+ # 5) Validate build output
49
+ nrz build
48
50
 
49
- # Self-update
50
- nrz upgrade
51
+ # 6) Deploy
52
+ nrz deploy --prod
51
53
  ```
52
54
 
53
- ## Supported Platforms
55
+ ## Core Commands
54
56
 
55
- | Platform | Binary |
56
- |----------|--------|
57
- | Linux x64 | `nrz-linux-x64` |
58
- | macOS x64 | `nrz-macos-x64` |
59
- | macOS ARM64 | `nrz-macos-arm64` |
60
- | Windows x64 | `nrz-windows-x64.exe` |
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
- ## Features
68
+ ## Agent Skills
63
69
 
64
- - 🚀 **Dev Server** Local development with KV, DB, and Context emulation
65
- - 📦 **Build Validation** — Verify output against BUILD_OUTPUT_SPEC v1
66
- - ☁️ **Deploy** — Push to ONREZA platform
67
- - 🔄 **Self-update** — Built-in upgrade mechanism
68
- - 🔧 **Framework Detection** — Auto-detect Astro, Nuxt, SvelteKit, Nitro
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
- # Run tests
74
- cargo test
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
- # Build release binary
77
- cargo build --release
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
- # Generate changelog
80
- git-cliff -o CHANGELOG.md
91
+ Example:
92
+ ```bash
93
+ nrz deploy --json --token "$NRZ_TOKEN" --workspace my-team --env production
81
94
  ```
82
95
 
83
- ## Commit Convention
96
+ ## Configuration
84
97
 
85
- This project follows [Conventional Commits](https://www.conventionalcommits.org/):
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
- ## Related
114
+ Commit messages are validated with Conventional Commits via `commitlint` + `lefthook`, format: `type(scope): subject`.
115
+
116
+ ## Supported Binary Targets
95
117
 
96
- - [onreza/adapters](https://github.com/onreza/adapters) — TypeScript adapters
97
- - [onreza/deployment](https://github.com/onreza/deployment) — Platform infrastructure
118
+ | Target |
119
+ |--------|
120
+ | `linux-x64` |
121
+ | `darwin-x64` |
122
+ | `darwin-arm64` |
123
+ | `win32-x64` |
98
124
 
99
125
  ## License
100
126
 
101
- MIT © ONREZA
127
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onreza/nrz",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "private": false,
5
5
  "description": "ONREZA platform CLI — dev, build, deploy",
6
6
  "files": [
@@ -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.14.0/nrz-linux-x64.tar.gz",
17
- "darwin-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.14.0/nrz-darwin-x64.tar.gz",
18
- "darwin-arm64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.14.0/nrz-darwin-arm64.tar.gz",
19
- "win32-x64": "https://github.com/ONREZA/nrz-cli/releases/download/v0.14.0/nrz-win32-x64.tar.gz"
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.14.0"
22
+ "version": "0.16.0"
23
23
  };
24
24
 
25
25
  const platformKey = `${platform}-${arch}`;