@hiyve/cli 1.0.10 → 1.0.11

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 CHANGED
@@ -1,4 +1,4 @@
1
- # hiyve-cli
1
+ # @hiyve/cli
2
2
 
3
3
  Command-line tool for configuring npm to use the private Hiyve SDK registry.
4
4
 
@@ -6,10 +6,10 @@ Command-line tool for configuring npm to use the private Hiyve SDK registry.
6
6
 
7
7
  ```bash
8
8
  # One command to authenticate and configure npm
9
- npx hiyve-cli login
9
+ npx @hiyve/cli login
10
10
  ```
11
11
 
12
- After login, you can install Hiyve packages normally:
12
+ After login, install Hiyve packages normally:
13
13
 
14
14
  ```bash
15
15
  npm install @hiyve/rtc-client
@@ -18,37 +18,56 @@ npm install @hiyve/react @hiyve/react-ui
18
18
 
19
19
  ## Commands
20
20
 
21
- ### `hiyve login`
21
+ ### `login`
22
22
 
23
23
  Authenticate with Hiyve and configure npm for @hiyve packages.
24
24
 
25
25
  ```bash
26
26
  # Interactive mode (prompts for API key)
27
- npx hiyve-cli login
27
+ npx @hiyve/cli login
28
28
 
29
- # With API key as argument
30
- npx hiyve-cli login --key sk_live_your_secret_key_here
29
+ # Non-interactive (CI/CD)
30
+ npx @hiyve/cli login --key sk_live_your_secret_key_here
31
31
  ```
32
32
 
33
- ### `hiyve logout`
33
+ ### `logout`
34
34
 
35
35
  Remove Hiyve configuration from your ~/.npmrc file.
36
36
 
37
37
  ```bash
38
- npx hiyve-cli logout
38
+ npx @hiyve/cli logout
39
39
  ```
40
40
 
41
- ### `hiyve whoami`
41
+ ### `whoami`
42
42
 
43
43
  Show current authentication status.
44
44
 
45
45
  ```bash
46
- npx hiyve-cli whoami
46
+ npx @hiyve/cli whoami
47
47
  ```
48
48
 
49
+ ### `list`
50
+
51
+ List all available @hiyve packages.
52
+
53
+ ```bash
54
+ npx @hiyve/cli list
55
+ ```
56
+
57
+ ### `init`
58
+
59
+ Scaffold a new Hiyve project from a template.
60
+
61
+ ```bash
62
+ npx @hiyve/cli init my-app
63
+ npx @hiyve/cli init my-app --template ai
64
+ ```
65
+
66
+ Templates: `basic`, `ai`, `full`
67
+
49
68
  ## Getting Your API Key
50
69
 
51
- 1. Log in to the [Hiyve SDK Admin Portal](https://console.hiyve.dev)
70
+ 1. Log in to the [Hiyve Developer Console](https://console.hiyve.dev)
52
71
  2. Navigate to **API Keys** in the sidebar
53
72
  3. Copy your secret key (starts with `sk_test_` or `sk_live_`)
54
73
 
@@ -58,17 +77,30 @@ The `login` command:
58
77
 
59
78
  1. Validates your API key with the Hiyve registry
60
79
  2. Adds two lines to your `~/.npmrc` file:
61
- - `@hiyve:registry=https://api.hiyve.dev/registry/`
62
- - `//:_authToken=your_api_key`
80
+ ```
81
+ @hiyve:registry=https://api.hiyve.dev/registry/
82
+ //api.hiyve.dev/registry/:_authToken=sk_live_...
83
+ ```
63
84
 
64
85
  This tells npm to fetch `@hiyve/*` packages from the private Hiyve registry instead of the public npm registry.
65
86
 
87
+ ## CI/CD Setup
88
+
89
+ For automated deployments, add registry credentials as environment variables in your CI/CD pipeline. Your project `.npmrc` should use variable expansion:
90
+
91
+ ```ini
92
+ @hiyve:registry=https://api.hiyve.dev/registry/
93
+ //api.hiyve.dev/registry/:_authToken=${HIYVE_API_KEY}
94
+ ```
95
+
96
+ Set `HIYVE_API_KEY` in your CI environment (GitHub Actions secrets, AWS SSM, etc.). npm natively expands `${ENV_VAR}` in `.npmrc` files — no custom tooling needed.
97
+
66
98
  ## Troubleshooting
67
99
 
68
100
  ### "Invalid API key" error
69
101
 
70
102
  - Make sure your key starts with `sk_test_` or `sk_live_`
71
- - Verify your account is active in the admin portal
103
+ - Verify your account is active in the developer console
72
104
 
73
105
  ### "Connection failed" error
74
106
 
@@ -80,7 +112,7 @@ This tells npm to fetch `@hiyve/*` packages from the private Hiyve registry inst
80
112
  After login, verify your configuration:
81
113
 
82
114
  ```bash
83
- npx hiyve-cli whoami
115
+ npx @hiyve/cli whoami
84
116
  ```
85
117
 
86
118
  Or check your `~/.npmrc` manually:
@@ -92,8 +124,8 @@ cat ~/.npmrc | grep hiyve
92
124
  ## Security
93
125
 
94
126
  - Your API key is stored in `~/.npmrc` (standard npm token storage)
95
- - The API key is sent only to `api.hiyve.dev`
96
- - Run `hiyve logout` to remove your credentials
127
+ - The key is sent only to the Hiyve registry during npm operations
128
+ - Run `npx @hiyve/cli logout` to remove your credentials
97
129
 
98
130
  ## Support
99
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiyve/cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Hiyve SDK CLI - Configure npm for private @hiyve packages",
5
5
  "type": "module",
6
6
  "bin": {
@@ -218,7 +218,7 @@ export default defineConfig({
218
218
 
219
219
  function generateEnvExample(template) {
220
220
  let env = `# Hiyve API Key (from console.hiyve.dev)
221
- HIYVE_API_KEY=sk_live_your_secret_key_here
221
+ HIYVE_API_KEY=pk_live_your_api_key_here
222
222
 
223
223
  # Room configuration
224
224
  HIYVE_SIGNALING_URL=https://signal.hiyve.dev