@pushizo/cli 0.1.0 → 0.2.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/LICENSE +21 -21
- package/README.md +92 -104
- package/dist/cli.js +18 -18
- package/package.json +42 -42
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Pushizo contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pushizo contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,104 +1,92 @@
|
|
|
1
|
-
<!-- pushizo:header -->
|
|
2
|
-
<p align="center">
|
|
3
|
-
<a href="https://pushizo.com"><img src="https://raw.githubusercontent.com/pushizo/.github/main/profile/assets/mark.svg" alt="Pushizo" width="56" height="56"></a>
|
|
4
|
-
</p>
|
|
5
|
-
<p align="center">
|
|
6
|
-
<a href="https://docs.pushizo.com/docs/integrations/cli-sdks"><img src="https://img.shields.io/badge/docs-docs.pushizo.com-5b4bdb" alt="Docs"></a>
|
|
7
|
-
<a href="https://docs.pushizo.com/docs/api"><img src="https://img.shields.io/badge/API-reference-b44fc4" alt="API reference"></a>
|
|
8
|
-
<a href="https://github.com/pushizo/pushizo-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-16130f" alt="License: MIT"></a>
|
|
9
|
-
</p>
|
|
10
|
-
<p align="center"><a href="#english">English</a> · <a href="#türkçe">Türkçe</a></p>
|
|
11
|
-
|
|
12
|
-
## English
|
|
13
|
-
|
|
14
|
-
**Pushizo CLI** — The `pushizo` command for scripts and terminals. Lists apps, segments and templates as JSON and sends a notification to subscribed users. Reads PUSHIZO_API_KEY, PUSHIZO_APP_ID and PUSHIZO_API_URL from the environment; the key is never printed. Node.js 20+, no dependencies.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
pushizo
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- **Bugs & ideas · Hata ve öneri:** [Issues](https://github.com/pushizo/pushizo-cli/issues)
|
|
94
|
-
- **Security · Güvenlik:** please do not open public issues; email [security@pushizo.com](mailto:security@pushizo.com) ·
|
|
95
|
-
herkese açık issue açmayın, bu adrese yazın.
|
|
96
|
-
- **Help · Destek:** [support@pushizo.com](mailto:support@pushizo.com)
|
|
97
|
-
|
|
98
|
-
This repository is mirrored automatically from the Pushizo main repository on every release. Please open an issue
|
|
99
|
-
instead of a pull request; fixes land in the main repository and ship with the next release.
|
|
100
|
-
Bu depo her sürümde Pushizo ana deposundan otomatik yansıtılır. Pull request yerine issue açın; düzeltmeler ana depoda
|
|
101
|
-
yapılır ve bir sonraki sürümle buraya gelir.
|
|
102
|
-
|
|
103
|
-
Released under the MIT License · MIT lisanslıdır — [LICENSE](https://github.com/pushizo/pushizo-cli/blob/main/LICENSE).
|
|
104
|
-
<!-- /pushizo:footer -->
|
|
1
|
+
<!-- pushizo:header -->
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://pushizo.com"><img src="https://raw.githubusercontent.com/pushizo/.github/main/profile/assets/mark.svg" alt="Pushizo" width="56" height="56"></a>
|
|
4
|
+
</p>
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://docs.pushizo.com/docs/integrations/cli-sdks"><img src="https://img.shields.io/badge/docs-docs.pushizo.com-5b4bdb" alt="Docs"></a>
|
|
7
|
+
<a href="https://docs.pushizo.com/docs/api"><img src="https://img.shields.io/badge/API-reference-b44fc4" alt="API reference"></a>
|
|
8
|
+
<a href="https://github.com/pushizo/pushizo-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-16130f" alt="License: MIT"></a>
|
|
9
|
+
</p>
|
|
10
|
+
<p align="center"><a href="#english">English</a> · <a href="#türkçe">Türkçe</a></p>
|
|
11
|
+
|
|
12
|
+
## English
|
|
13
|
+
|
|
14
|
+
**Pushizo CLI** — The `pushizo` command for scripts and terminals. Lists apps, segments and templates as JSON and sends a notification to subscribed users. Reads PUSHIZO_API_KEY, PUSHIZO_APP_ID and PUSHIZO_API_URL from the environment; the key is never printed. Node.js 20+, no dependencies.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @pushizo/cli
|
|
18
|
+
pushizo --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The detailed guide below is in Turkish; code samples are language-neutral. Full documentation:
|
|
22
|
+
[docs.pushizo.com/docs/integrations/cli-sdks](https://docs.pushizo.com/docs/integrations/cli-sdks) · API reference: [docs.pushizo.com/docs/api](https://docs.pushizo.com/docs/api).
|
|
23
|
+
|
|
24
|
+
## Türkçe
|
|
25
|
+
<!-- /pushizo:header -->
|
|
26
|
+
|
|
27
|
+
# Pushizo CLI
|
|
28
|
+
|
|
29
|
+
Betikler ve terminal için `pushizo` komutu. App, segment ve şablonları JSON olarak listeler; abone kullanıcılara
|
|
30
|
+
bildirim gönderir. Node.js 20+; bağımlılığı yoktur.
|
|
31
|
+
|
|
32
|
+
## Kurulum
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g @pushizo/cli
|
|
36
|
+
pushizo --help
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Kurmadan çalıştırmak için: `npx @pushizo/cli --help`.
|
|
40
|
+
|
|
41
|
+
## Ortam değişkenleri
|
|
42
|
+
|
|
43
|
+
| Değişken | Açıklama |
|
|
44
|
+
|----------|----------|
|
|
45
|
+
| `PUSHIZO_API_KEY` | App veya organizasyon API anahtarı (zorunlu). Çıktıya ve hata mesajlarına yazılmaz. |
|
|
46
|
+
| `PUSHIZO_APP_ID` | `segments`, `templates` ve `send` için app kimliği |
|
|
47
|
+
| `PUSHIZO_API_URL` | API adresi (varsayılan `https://api.pushizo.com`; yerelde `http://localhost:4000`) |
|
|
48
|
+
|
|
49
|
+
Anahtarı komut satırı argümanı olarak vermeyin; kabuk geçmişine düşer. Ortam değişkeni veya gizli bilgi yöneticisi
|
|
50
|
+
kullanın.
|
|
51
|
+
|
|
52
|
+
## Komutlar
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pushizo apps # app listesi
|
|
56
|
+
pushizo segments # PUSHIZO_APP_ID segmentleri
|
|
57
|
+
pushizo templates # PUSHIZO_APP_ID şablonları
|
|
58
|
+
pushizo send "Başlık" "Gövde metni" # "Subscribed Users" segmentine bildirim (en + tr aynı metin)
|
|
59
|
+
pushizo --version
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Çıktı biçimlendirilmiş JSON'dur; `jq` ile işlenebilir:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pushizo segments | jq -r '.data[].name'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Çıkış kodu başarıda `0`, eksik ayar, ağ veya HTTP hatasında `1`'dir; hata ayrıntısı standart hataya yazılır.
|
|
69
|
+
|
|
70
|
+
Daha geniş kullanım (kullanıcılar, kampanyalar, analitik) için sunucu SDK'larını veya REST API'yi kullanın:
|
|
71
|
+
[docs.pushizo.com/docs/api](https://docs.pushizo.com/docs/api).
|
|
72
|
+
|
|
73
|
+
<!-- pushizo:footer -->
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Support · Destek
|
|
77
|
+
|
|
78
|
+
- **Guide · Rehber:** [docs.pushizo.com/docs/integrations/cli-sdks](https://docs.pushizo.com/docs/integrations/cli-sdks)
|
|
79
|
+
- **API reference & OpenAPI · API referansı ve OpenAPI:** [docs.pushizo.com/docs/api](https://docs.pushizo.com/docs/api) ·
|
|
80
|
+
[pushizo-openapi](https://github.com/pushizo/pushizo-openapi)
|
|
81
|
+
- **Bugs & ideas · Hata ve öneri:** [Issues](https://github.com/pushizo/pushizo-cli/issues)
|
|
82
|
+
- **Security · Güvenlik:** please do not open public issues; email [security@pushizo.com](mailto:security@pushizo.com) ·
|
|
83
|
+
herkese açık issue açmayın, bu adrese yazın.
|
|
84
|
+
- **Help · Destek:** [support@pushizo.com](mailto:support@pushizo.com)
|
|
85
|
+
|
|
86
|
+
This repository is mirrored automatically from the Pushizo main repository on every release. Please open an issue
|
|
87
|
+
instead of a pull request; fixes land in the main repository and ship with the next release.
|
|
88
|
+
Bu depo her sürümde Pushizo ana deposundan otomatik yansıtılır. Pull request yerine issue açın; düzeltmeler ana depoda
|
|
89
|
+
yapılır ve bir sonraki sürümle buraya gelir.
|
|
90
|
+
|
|
91
|
+
Released under the MIT License · MIT lisanslıdır — [LICENSE](https://github.com/pushizo/pushizo-cli/blob/main/LICENSE).
|
|
92
|
+
<!-- /pushizo:footer -->
|
package/dist/cli.js
CHANGED
|
@@ -6,24 +6,24 @@
|
|
|
6
6
|
import { readFileSync } from 'node:fs';
|
|
7
7
|
export const DEFAULT_API_URL = 'https://api.pushizo.com';
|
|
8
8
|
export const VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
|
|
9
|
-
export const HELP = `Pushizo CLI ${VERSION}
|
|
10
|
-
|
|
11
|
-
Usage:
|
|
12
|
-
pushizo apps List apps
|
|
13
|
-
pushizo segments List segments of PUSHIZO_APP_ID
|
|
14
|
-
pushizo templates List templates of PUSHIZO_APP_ID
|
|
15
|
-
pushizo send "<title>" "<body>" Send a notification to subscribed users of PUSHIZO_APP_ID
|
|
16
|
-
pushizo --help | --version
|
|
17
|
-
|
|
18
|
-
Environment:
|
|
19
|
-
PUSHIZO_API_KEY App or organization API key (required; never printed)
|
|
20
|
-
PUSHIZO_APP_ID App id for segments, templates and send
|
|
21
|
-
PUSHIZO_API_URL API base URL (default ${DEFAULT_API_URL})
|
|
22
|
-
|
|
23
|
-
Türkçe: komutlar aynıdır. apps → app listesi, segments → segmentler, templates → şablonlar,
|
|
24
|
-
send "<başlık>" "<gövde>" → abone kullanıcılara bildirim. Ortam değişkenleri yukarıdaki gibidir; anahtar çıktıya yazılmaz.
|
|
25
|
-
|
|
26
|
-
Docs: https://docs.pushizo.com/docs/integrations/cli-sdks
|
|
9
|
+
export const HELP = `Pushizo CLI ${VERSION}
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
pushizo apps List apps
|
|
13
|
+
pushizo segments List segments of PUSHIZO_APP_ID
|
|
14
|
+
pushizo templates List templates of PUSHIZO_APP_ID
|
|
15
|
+
pushizo send "<title>" "<body>" Send a notification to subscribed users of PUSHIZO_APP_ID
|
|
16
|
+
pushizo --help | --version
|
|
17
|
+
|
|
18
|
+
Environment:
|
|
19
|
+
PUSHIZO_API_KEY App or organization API key (required; never printed)
|
|
20
|
+
PUSHIZO_APP_ID App id for segments, templates and send
|
|
21
|
+
PUSHIZO_API_URL API base URL (default ${DEFAULT_API_URL})
|
|
22
|
+
|
|
23
|
+
Türkçe: komutlar aynıdır. apps → app listesi, segments → segmentler, templates → şablonlar,
|
|
24
|
+
send "<başlık>" "<gövde>" → abone kullanıcılara bildirim. Ortam değişkenleri yukarıdaki gibidir; anahtar çıktıya yazılmaz.
|
|
25
|
+
|
|
26
|
+
Docs: https://docs.pushizo.com/docs/integrations/cli-sdks
|
|
27
27
|
`;
|
|
28
28
|
class CliError extends Error {
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pushizo/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Pushizo command-line tool: list apps, segments and templates, send notifications",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"homepage": "https://docs.pushizo.com/docs/integrations/cli-sdks",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/pushizo/pushizo-cli.git"
|
|
10
|
-
},
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/pushizo/pushizo-cli/issues",
|
|
13
|
-
"email": "support@pushizo.com"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"pushizo",
|
|
17
|
-
"cli",
|
|
18
|
-
"push",
|
|
19
|
-
"notifications",
|
|
20
|
-
"command-line"
|
|
21
|
-
],
|
|
22
|
-
"publishConfig": {
|
|
23
|
-
"access": "public",
|
|
24
|
-
"provenance": true
|
|
25
|
-
},
|
|
26
|
-
"type": "module",
|
|
27
|
-
"bin": {
|
|
28
|
-
"pushizo": "./dist/index.js"
|
|
29
|
-
},
|
|
30
|
-
"files": [
|
|
31
|
-
"dist",
|
|
32
|
-
"README.md",
|
|
33
|
-
"LICENSE"
|
|
34
|
-
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
|
|
37
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
38
|
-
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=20"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@pushizo/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Pushizo command-line tool: list apps, segments and templates, send notifications",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://docs.pushizo.com/docs/integrations/cli-sdks",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/pushizo/pushizo-cli.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/pushizo/pushizo-cli/issues",
|
|
13
|
+
"email": "support@pushizo.com"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"pushizo",
|
|
17
|
+
"cli",
|
|
18
|
+
"push",
|
|
19
|
+
"notifications",
|
|
20
|
+
"command-line"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public",
|
|
24
|
+
"provenance": true
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"bin": {
|
|
28
|
+
"pushizo": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"README.md",
|
|
33
|
+
"LICENSE"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
|
|
37
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20"
|
|
41
|
+
}
|
|
42
|
+
}
|