@bghitcode/bghitapp 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 +203 -0
- package/dist/cli.js +2995 -0
- package/package.json +104 -0
- package/src-tauri/Cargo.lock +5966 -0
- package/src-tauri/Cargo.toml +59 -0
- package/src-tauri/Info.plist +14 -0
- package/src-tauri/assets/macos/dmg/background.png +0 -0
- package/src-tauri/assets/main.wxs +350 -0
- package/src-tauri/bghitapp.json +42 -0
- package/src-tauri/build.rs +5 -0
- package/src-tauri/capabilities/default.json +29 -0
- package/src-tauri/entitlements.plist +7 -0
- package/src-tauri/icons/chatgpt.icns +0 -0
- package/src-tauri/icons/deepseek.icns +0 -0
- package/src-tauri/icons/excalidraw.icns +0 -0
- package/src-tauri/icons/flomo.icns +0 -0
- package/src-tauri/icons/gemini.icns +0 -0
- package/src-tauri/icons/grok.icns +0 -0
- package/src-tauri/icons/icon.icns +0 -0
- package/src-tauri/icons/icon.png +0 -0
- package/src-tauri/icons/lizhi.icns +0 -0
- package/src-tauri/icons/programmusic.icns +0 -0
- package/src-tauri/icons/qwerty.icns +0 -0
- package/src-tauri/icons/twitter.icns +0 -0
- package/src-tauri/icons/wechat.icns +0 -0
- package/src-tauri/icons/weekly.icns +0 -0
- package/src-tauri/icons/weread.icns +0 -0
- package/src-tauri/icons/xiaohongshu.icns +0 -0
- package/src-tauri/icons/youtube.icns +0 -0
- package/src-tauri/icons/youtubemusic.icns +0 -0
- package/src-tauri/rust_proxy.toml +10 -0
- package/src-tauri/src/app/config.rs +100 -0
- package/src-tauri/src/app/invoke.rs +242 -0
- package/src-tauri/src/app/menu.rs +324 -0
- package/src-tauri/src/app/mod.rs +6 -0
- package/src-tauri/src/app/setup.rs +172 -0
- package/src-tauri/src/app/window.rs +577 -0
- package/src-tauri/src/inject/auth.js +75 -0
- package/src-tauri/src/inject/custom.js +0 -0
- package/src-tauri/src/inject/event.js +1111 -0
- package/src-tauri/src/inject/find.js +708 -0
- package/src-tauri/src/inject/fullscreen.js +253 -0
- package/src-tauri/src/inject/offline.js +68 -0
- package/src-tauri/src/inject/splash-transition.js +13 -0
- package/src-tauri/src/inject/style.js +505 -0
- package/src-tauri/src/inject/theme_refresh.js +59 -0
- package/src-tauri/src/inject/toast.js +22 -0
- package/src-tauri/src/lib.rs +227 -0
- package/src-tauri/src/main.rs +8 -0
- package/src-tauri/src/util.rs +245 -0
- package/src-tauri/tauri.conf.json +20 -0
- package/src-tauri/tauri.linux.conf.json +12 -0
- package/src-tauri/tauri.macos.conf.json +28 -0
- package/src-tauri/tauri.windows.conf.json +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Tw93
|
|
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,203 @@
|
|
|
1
|
+
<h4 align="right"><strong>English</strong> | <a href="README_CN.md">简体中文</a></h4>
|
|
2
|
+
<p align="center">
|
|
3
|
+
<img src=https://gw.alipayobjects.com/zos/k/fa/logo-modified.png width=138/>
|
|
4
|
+
</p>
|
|
5
|
+
<h1 align="center">BghitApp</h1>
|
|
6
|
+
<p align="center"><strong>Turn any webpage into a desktop app with one command — by BghitCode. Supports macOS, Windows, and Linux</strong></p>
|
|
7
|
+
<div align="center">
|
|
8
|
+
<a href="https://github.com/BghitCode/bghitapp/releases" target="_blank">
|
|
9
|
+
<img alt="GitHub downloads" src="https://img.shields.io/github/downloads/BghitCode/Pake/total.svg?style=flat-square"></a>
|
|
10
|
+
<a href="https://github.com/BghitCode/bghitapp/commits" target="_blank">
|
|
11
|
+
<img alt="GitHub commit" src="https://img.shields.io/github/commit-activity/m/BghitCode/Pake?style=flat-square"></a>
|
|
12
|
+
<a href="https://github.com/BghitCode/bghitapp/issues?q=is%3Aissue+is%3Aclosed" target="_blank">
|
|
13
|
+
<img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/BghitCode/Pake.svg?style=flat-square"></a>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- 🎐 **Lightweight**: Nearly 20 times smaller than Electron packages, typically around 5M
|
|
19
|
+
- 🚀 **Fast**: Built with Rust Tauri, much faster than traditional JS frameworks with lower memory usage
|
|
20
|
+
- ⚡ **Easy to use**: One-command packaging via CLI or online building, no complex configuration needed
|
|
21
|
+
- 📦 **Feature-rich**: Supports shortcuts, immersive windows, drag & drop, style customization, ad removal
|
|
22
|
+
|
|
23
|
+
## Getting Started
|
|
24
|
+
|
|
25
|
+
- **Beginners**: Download ready-made [Popular Packages](#popular-packages) or use [Online Building](docs/github-actions-usage.md) with no environment setup required
|
|
26
|
+
- **Developers**: Install [CLI Tool](docs/cli-usage.md) for one-command packaging of any website with customizable icons, window settings, and more
|
|
27
|
+
- **Advanced Users**: Clone the project locally for [Custom Development](#development), or check [Advanced Usage](docs/advanced-usage.md) for style customization and feature enhancement
|
|
28
|
+
- **Troubleshooting**: Check [FAQ](docs/faq.md) for common issues and solutions
|
|
29
|
+
|
|
30
|
+
## Popular Packages
|
|
31
|
+
|
|
32
|
+
<table>
|
|
33
|
+
<tr>
|
|
34
|
+
<td>WeRead
|
|
35
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/WeRead.dmg">Mac</a>
|
|
36
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/WeRead_x64.msi">Windows</a>
|
|
37
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/WeRead_x86_64.deb">Linux</a>
|
|
38
|
+
</td>
|
|
39
|
+
<td>Twitter
|
|
40
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Twitter.dmg">Mac</a>
|
|
41
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Twitter_x64.msi">Windows</a>
|
|
42
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Twitter_x86_64.deb">Linux</a>
|
|
43
|
+
</td>
|
|
44
|
+
</tr>
|
|
45
|
+
<tr>
|
|
46
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/WeRead.jpg width=600/></td>
|
|
47
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/Twitter.jpg width=600/></td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr>
|
|
50
|
+
<td>Grok
|
|
51
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Grok.dmg">Mac</a>
|
|
52
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Grok_x64.msi">Windows</a>
|
|
53
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Grok_x86_64.deb">Linux</a>
|
|
54
|
+
</td>
|
|
55
|
+
<td>DeepSeek
|
|
56
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/DeepSeek.dmg">Mac</a>
|
|
57
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/DeepSeek_x64.msi">Windows</a>
|
|
58
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/DeepSeek_x86_64.deb">Linux</a>
|
|
59
|
+
</td>
|
|
60
|
+
</tr>
|
|
61
|
+
<tr>
|
|
62
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/Grok.png width=600/></td>
|
|
63
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/DeepSeek.png width=600/></td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<td>ChatGPT
|
|
67
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/ChatGPT.dmg">Mac</a>
|
|
68
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/ChatGPT_x64.msi">Windows</a>
|
|
69
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/ChatGPT_x86_64.deb">Linux</a>
|
|
70
|
+
</td>
|
|
71
|
+
<td>Gemini
|
|
72
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Gemini.dmg">Mac</a>
|
|
73
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Gemini_x64.msi">Windows</a>
|
|
74
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Gemini_x86_64.deb">Linux</a>
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/ChatGPT.png width=600/></td>
|
|
79
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/Gemini.png width=600/></td>
|
|
80
|
+
</tr>
|
|
81
|
+
<tr>
|
|
82
|
+
<td>YouTube Music
|
|
83
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/YouTubeMusic.dmg">Mac</a>
|
|
84
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/YouTubeMusic_x64.msi">Windows</a>
|
|
85
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/YouTubeMusic_x86_64.deb">Linux</a>
|
|
86
|
+
</td>
|
|
87
|
+
<td>YouTube
|
|
88
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/YouTube.dmg">Mac</a>
|
|
89
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/YouTube_x64.msi">Windows</a>
|
|
90
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/YouTube_x86_64.deb">Linux</a>
|
|
91
|
+
</td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/YouTubeMusic.png width=600 /></td>
|
|
95
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/YouTube.jpg width=600 /></td>
|
|
96
|
+
</tr>
|
|
97
|
+
<tr>
|
|
98
|
+
<td>LiZhi
|
|
99
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/LiZhi.dmg">Mac</a>
|
|
100
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/LiZhi_x64.msi">Windows</a>
|
|
101
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/LiZhi_x86_64.deb">Linux</a>
|
|
102
|
+
</td>
|
|
103
|
+
<td>ProgramMusic
|
|
104
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/ProgramMusic.dmg">Mac</a>
|
|
105
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/ProgramMusic_x64.msi">Windows</a>
|
|
106
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/ProgramMusic_x86_64.deb">Linux</a>
|
|
107
|
+
</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/LiZhi.jpg width=600/></td>
|
|
111
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/ProgramMusic.jpg width=600/></td>
|
|
112
|
+
</tr>
|
|
113
|
+
<tr>
|
|
114
|
+
<td>Excalidraw
|
|
115
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Excalidraw.dmg">Mac</a>
|
|
116
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Excalidraw_x64.msi">Windows</a>
|
|
117
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/Excalidraw_x86_64.deb">Linux</a>
|
|
118
|
+
</td>
|
|
119
|
+
<td>XiaoHongShu
|
|
120
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/XiaoHongShu.dmg">Mac</a>
|
|
121
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/XiaoHongShu_x64.msi">Windows</a>
|
|
122
|
+
<a href="https://github.com/BghitCode/bghitapp/releases/latest/download/XiaoHongShu_x86_64.deb">Linux</a>
|
|
123
|
+
</td>
|
|
124
|
+
</tr>
|
|
125
|
+
<tr>
|
|
126
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/Excalidraw.png width=600/></td>
|
|
127
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/main/pake/XiaoHongShu.png width=600/></td>
|
|
128
|
+
</tr>
|
|
129
|
+
</table>
|
|
130
|
+
|
|
131
|
+
<details>
|
|
132
|
+
<summary>🏂 You can download more applications from <a href="https://github.com/BghitCode/bghitapp/releases">Releases</a>. <b>Click here to expand the shortcuts reference!</b></summary>
|
|
133
|
+
|
|
134
|
+
<br/>
|
|
135
|
+
|
|
136
|
+
| Mac | Windows/Linux | Function |
|
|
137
|
+
| --------------------------------------------------------- | --------------------------------------------------- | ----------------------------------- |
|
|
138
|
+
| <kbd>⌘</kbd> + <kbd>[</kbd> | <kbd>Ctrl</kbd> + <kbd>←</kbd> | Return to the previous page |
|
|
139
|
+
| <kbd>⌘</kbd> + <kbd>]</kbd> | <kbd>Ctrl</kbd> + <kbd>→</kbd> | Go to the next page |
|
|
140
|
+
| <kbd>⌘</kbd> + <kbd>↑</kbd> | <kbd>Ctrl</kbd> + <kbd>↑</kbd> | Auto scroll to top of page |
|
|
141
|
+
| <kbd>⌘</kbd> + <kbd>↓</kbd> | <kbd>Ctrl</kbd> + <kbd>↓</kbd> | Auto scroll to bottom of page |
|
|
142
|
+
| <kbd>⌘</kbd> + <kbd>r</kbd> | <kbd>Ctrl</kbd> + <kbd>r</kbd> | Refresh Page |
|
|
143
|
+
| <kbd>⌘</kbd> + <kbd>w</kbd> | <kbd>Ctrl</kbd> + <kbd>w</kbd> | Hide window, not quit |
|
|
144
|
+
| <kbd>⌘</kbd> + <kbd>-</kbd> | <kbd>Ctrl</kbd> + <kbd>-</kbd> | Zoom out the page |
|
|
145
|
+
| <kbd>⌘</kbd> + <kbd>=</kbd> | <kbd>Ctrl</kbd> + <kbd>=</kbd> | Zoom in the Page |
|
|
146
|
+
| <kbd>⌘</kbd> + <kbd>0</kbd> | <kbd>Ctrl</kbd> + <kbd>0</kbd> | Reset the page zoom |
|
|
147
|
+
| <kbd>⌘</kbd> + <kbd>L</kbd> | <kbd>Ctrl</kbd> + <kbd>L</kbd> | Copy Current Page URL |
|
|
148
|
+
| <kbd>⌘</kbd> + <kbd>⇧</kbd> + <kbd>⌥</kbd> + <kbd>V</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | Paste and Match Style |
|
|
149
|
+
| <kbd>⌘</kbd> + <kbd>⇧</kbd> + <kbd>H</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>H</kbd> | Go to Home Page |
|
|
150
|
+
| <kbd>⌘</kbd> + <kbd>⌥</kbd> + <kbd>I</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd> | Toggle Developer Tools (Debug Only) |
|
|
151
|
+
| <kbd>⌘</kbd> + <kbd>⇧</kbd> + <kbd>⌫</kbd> | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Del</kbd> | Clear Cache & Restart |
|
|
152
|
+
|
|
153
|
+
In addition, double-click the title bar to switch to full-screen mode. For Mac users, you can also use the gesture to go to the previous or next page and drag the title bar to move the window. The new menu also offers options for navigation, zoom, and window controls.
|
|
154
|
+
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
## Command-Line Packaging
|
|
158
|
+
|
|
159
|
+

|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Install BghitApp CLI
|
|
163
|
+
pnpm install -g @bghitcode/bghitapp
|
|
164
|
+
|
|
165
|
+
# Basic usage - automatically fetches website icon
|
|
166
|
+
bghitapp https://github.com --name GitHub
|
|
167
|
+
|
|
168
|
+
# Advanced usage with custom options
|
|
169
|
+
bghitapp https://example.com --name MyApp --width 1200 --height 800 --hide-title-bar
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
First-time packaging requires environment setup and may be slower, subsequent builds are fast. For complete parameter documentation, see [CLI Usage Guide](docs/cli-usage.md). Don't want to use CLI? Try [GitHub Actions Online Building](docs/github-actions-usage.md).
|
|
173
|
+
|
|
174
|
+
## Development
|
|
175
|
+
|
|
176
|
+
Requires Rust `>=1.85` and Node `>=22` (recommended LTS; `>=18` also works). For detailed installation guide, see [Tauri documentation](https://v2.tauri.app/start/prerequisites/). If unfamiliar with development environment, use the CLI tool instead.
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Install dependencies
|
|
180
|
+
pnpm i
|
|
181
|
+
|
|
182
|
+
# Local development [right-click to open debug mode]
|
|
183
|
+
pnpm run dev
|
|
184
|
+
|
|
185
|
+
# Build application
|
|
186
|
+
pnpm run build
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
For style customization, feature enhancement, container communication and other advanced features, see [Advanced Usage Documentation](docs/advanced-usage.md).
|
|
190
|
+
|
|
191
|
+
## Developers
|
|
192
|
+
|
|
193
|
+
BghitApp's development can not be without these Hackers. They contributed a lot of capabilities for BghitApp. Also, welcome to follow them! ❤️
|
|
194
|
+
|
|
195
|
+
<a href="https://github.com/BghitCode/bghitapp/graphs/contributors">
|
|
196
|
+
<img src="./CONTRIBUTORS.svg?v=2" alt="Contributors" width="1000" />
|
|
197
|
+
</a>
|
|
198
|
+
|
|
199
|
+
## Support
|
|
200
|
+
|
|
201
|
+
- If BghitApp helped you, [share it](https://twitter.com/intent/tweet?url=https://github.com/BghitCode/bghitapp&text=BghitApp%20-%20Turn%20any%20webpage%20into%20a%20desktop%20app%20with%20one%20command.%20Nearly%2020x%20smaller%20than%20Electron%20packages,%20supports%20macOS%20Windows%20Linux) with friends or give it a star.
|
|
202
|
+
- Got ideas or bugs? Open an issue or PR, feel free to contribute.
|
|
203
|
+
- Built by <a href="https://bghitcode.com" target="_blank">BghitCode</a> — Sohail Koutari (<a href="https://github.com/reblox01" target="_blank">@reblox01</a>) — contact@bghitcode.com
|