@prasenjeet/shipli 1.0.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 -0
- package/README.md +143 -0
- package/package.json +42 -0
- package/src/auditor.js +524 -0
- package/src/config.js +42 -0
- package/src/guidelines.js +42 -0
- package/src/index.js +229 -0
- package/src/init.js +236 -0
- package/src/manifest-reader.js +33 -0
- package/src/plist-reader.js +30 -0
- package/src/pubspec-reader.js +30 -0
- package/src/reporter.js +170 -0
- package/src/rules/android-rules.md +3655 -0
- package/src/rules/appstore-rules.md +944 -0
- package/src/scanner.js +238 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
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
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# 🛡️ Shipli
|
|
2
|
+
|
|
3
|
+
Store rejections cost days of development time. **Shipli** is a local CLI tool that statically analyzes your Flutter source code against the latest **Apple App Store** and **Google Play** guidelines using an LLM.
|
|
4
|
+
|
|
5
|
+
Catch missing permissions, policy violations, and compliance issues *before* you submit.
|
|
6
|
+
|
|
7
|
+
## ✨ Features
|
|
8
|
+
|
|
9
|
+
* **Dual Store Support:** Audit against **Apple App Store** and **Google Play** — or both at once.
|
|
10
|
+
* **Two Audit Modes:** `--mode store` for compliance, `--mode code` for quality, or both (default).
|
|
11
|
+
* **Live Guidelines:** Fetches the latest store policies at runtime and caches them locally.
|
|
12
|
+
* **Auto-Detection:** Detects project type (app/package) and platform (ios/android) automatically.
|
|
13
|
+
* **Multi-Provider:** Choose between **Google Gemini** or **Anthropic Claude** as your AI backend.
|
|
14
|
+
* **Zero-Setup Artifacts:** No `.ipa` or `.apk` needed — reads `lib/`, `pubspec.yaml`, `Info.plist`, and `AndroidManifest.xml` directly.
|
|
15
|
+
* **CI-Friendly:** Exit code `1` on FAIL, `0` on PASS/WARNING.
|
|
16
|
+
|
|
17
|
+
## 🚀 Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g shipli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Requires **Node.js 18+**.
|
|
24
|
+
|
|
25
|
+
## 🛠️ Usage
|
|
26
|
+
|
|
27
|
+
### Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# One-time setup
|
|
31
|
+
shipli init
|
|
32
|
+
|
|
33
|
+
# Run full audit (auto-detects platform)
|
|
34
|
+
shipli --dir ./
|
|
35
|
+
|
|
36
|
+
# iOS App Store only
|
|
37
|
+
shipli --dir ./ --platform ios --mode store
|
|
38
|
+
|
|
39
|
+
# Google Play only
|
|
40
|
+
shipli --dir ./ --platform android --mode store
|
|
41
|
+
|
|
42
|
+
# Code quality only (platform-agnostic)
|
|
43
|
+
shipli --dir ./ --mode code
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Options
|
|
47
|
+
|
|
48
|
+
| Flag | Description | Default |
|
|
49
|
+
|------|-------------|---------|
|
|
50
|
+
| `--dir <path>` | Path to Flutter project root | *required* |
|
|
51
|
+
| `--key <key>` | API key | `.shipli` / env var |
|
|
52
|
+
| `--provider <name>` | `gemini` or `claude` | `gemini` |
|
|
53
|
+
| `--model <model>` | Model override | `gemini-2.5-flash` / `claude-sonnet-4-6` |
|
|
54
|
+
| `--type <type>` | `app` or `package` | auto-detected from pubspec |
|
|
55
|
+
| `--mode <mode>` | `store`, `code`, or `both` | `both` |
|
|
56
|
+
| `--platform <platform>` | `ios`, `android`, or `both` | auto-detected from project |
|
|
57
|
+
|
|
58
|
+
### Configuration: `.shipli`
|
|
59
|
+
|
|
60
|
+
Run `shipli init` to create a `.shipli` config file, or create one manually:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"provider": "claude",
|
|
65
|
+
"key": "sk-ant-...",
|
|
66
|
+
"model": "claude-sonnet-4-6",
|
|
67
|
+
"platform": "both"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The CLI looks for `.shipli` in two places:
|
|
72
|
+
1. **Project-level** — in the `--dir` path (highest priority)
|
|
73
|
+
2. **Global** — in your home directory `~/.shipli`
|
|
74
|
+
|
|
75
|
+
**Resolution order:** CLI flags > project `.shipli` > global `~/.shipli` > env vars > defaults
|
|
76
|
+
|
|
77
|
+
> **Note:** Add `.shipli` to your `.gitignore` — it contains your API key.
|
|
78
|
+
|
|
79
|
+
## 🧠 How it Works
|
|
80
|
+
|
|
81
|
+
1. **Detects Project & Platform:** Auto-detects app vs package from `pubspec.yaml`, and iOS/Android from project structure.
|
|
82
|
+
2. **Extracts Evidence:** Scans `lib/` for Dart files, keeping only the architectural skeleton. For packages, also scans `example/`.
|
|
83
|
+
3. **Gathers Metadata:** Reads `Info.plist` (iOS) and/or `AndroidManifest.xml` (Android) permissions.
|
|
84
|
+
4. **Fetches Live Guidelines:** Downloads the latest Apple App Store Review Guidelines and/or Google Play Developer Policies (cached for 7 days).
|
|
85
|
+
5. **AI Audit:** Sends evidence + live guidelines to the LLM with a tailored system prompt.
|
|
86
|
+
6. **Actionable Report:** Outputs a Pass/Warning/Fail checklist with specific guideline citations.
|
|
87
|
+
|
|
88
|
+
## 📱 App Store Audit Categories (iOS)
|
|
89
|
+
|
|
90
|
+
| Category | Examples |
|
|
91
|
+
|----------|---------|
|
|
92
|
+
| **Privacy & Permissions** | Missing Info.plist usage descriptions, undeclared APIs |
|
|
93
|
+
| **Data Collection & Tracking** | ATT requirements, analytics SDKs |
|
|
94
|
+
| **Content & Design** | Webview-only apps, minimum functionality |
|
|
95
|
+
| **In-App Purchases** | StoreKit/IAP vs third-party payment |
|
|
96
|
+
| **Legal & Compliance** | Privacy policy, encryption export, COPPA |
|
|
97
|
+
| **Forbidden Patterns** | Code push, dynamic code loading |
|
|
98
|
+
|
|
99
|
+
## 🤖 Play Store Audit Categories (Android)
|
|
100
|
+
|
|
101
|
+
| Category | Examples |
|
|
102
|
+
|----------|---------|
|
|
103
|
+
| **Permissions & Data Safety** | Unnecessary permissions, Data Safety compliance |
|
|
104
|
+
| **Data Collection & Privacy** | Privacy policy, User Data policy |
|
|
105
|
+
| **Content & Behavior** | Restricted content, deceptive behavior |
|
|
106
|
+
| **Billing & Monetization** | Google Play Billing Library requirements |
|
|
107
|
+
| **Target API & Compatibility** | Minimum API level, Android version issues |
|
|
108
|
+
| **Malware & Abuse** | Stalkerware, abusive notifications |
|
|
109
|
+
|
|
110
|
+
## 🔧 Code Quality Categories
|
|
111
|
+
|
|
112
|
+
| Category | Examples |
|
|
113
|
+
|----------|---------|
|
|
114
|
+
| **Security** | Hardcoded keys, insecure HTTP, injection |
|
|
115
|
+
| **Architecture** | State management, separation of concerns |
|
|
116
|
+
| **Error Handling** | try/catch, crash handling |
|
|
117
|
+
| **Performance** | Widget rebuilds, memory leaks |
|
|
118
|
+
| **Best Practices** | Dispose/lifecycle, null safety |
|
|
119
|
+
| **Dependencies** | Outdated packages, version constraints |
|
|
120
|
+
|
|
121
|
+
## 📦 Package Audit Categories
|
|
122
|
+
|
|
123
|
+
| Category | Examples |
|
|
124
|
+
|----------|---------|
|
|
125
|
+
| **API Surface & Documentation** | Export hygiene, clear entry points |
|
|
126
|
+
| **Platform Declarations** | MethodChannel consistency |
|
|
127
|
+
| **Consumer Permissions Guidance** | Undocumented permission requirements |
|
|
128
|
+
| **Dependency Hygiene** | Constraint quality, misplaced deps |
|
|
129
|
+
| **Example App Quality** | Missing example/, incomplete demos |
|
|
130
|
+
|
|
131
|
+
## 🔄 CI Integration
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
# GitHub Actions example
|
|
135
|
+
- name: Shipli Audit
|
|
136
|
+
run: npx shipli --dir ./ --platform both --provider claude --key ${{ secrets.ANTHROPIC_API_KEY }}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The CLI exits with code `1` if the audit result is **FAIL**, making it easy to gate deployments.
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prasenjeet/shipli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AI-powered App Store review audit for Flutter projects. Catch rejections before you submit.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"shipli": "src/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18.0.0"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"flutter",
|
|
18
|
+
"app-store",
|
|
19
|
+
"apple",
|
|
20
|
+
"review",
|
|
21
|
+
"audit",
|
|
22
|
+
"gemini",
|
|
23
|
+
"ai",
|
|
24
|
+
"cli",
|
|
25
|
+
"ios",
|
|
26
|
+
"static-analysis"
|
|
27
|
+
],
|
|
28
|
+
"author": "",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": ""
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"chalk": "^5.4.1",
|
|
36
|
+
"commander": "^13.1.0",
|
|
37
|
+
"fast-glob": "^3.3.3",
|
|
38
|
+
"js-yaml": "^4.1.0",
|
|
39
|
+
"ora": "^8.2.0",
|
|
40
|
+
"plist": "^3.1.0"
|
|
41
|
+
}
|
|
42
|
+
}
|