tool-tray 0.3.8__py3-none-any.whl
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.
- tool_tray/__init__.py +368 -0
- tool_tray/__main__.py +4 -0
- tool_tray/autostart.py +248 -0
- tool_tray/config.py +109 -0
- tool_tray/desktop.py +103 -0
- tool_tray/logging.py +76 -0
- tool_tray/manifest.py +61 -0
- tool_tray/setup_dialog.py +83 -0
- tool_tray/state.py +107 -0
- tool_tray/tray.py +414 -0
- tool_tray/updater.py +139 -0
- tool_tray-0.3.8.dist-info/METADATA +185 -0
- tool_tray-0.3.8.dist-info/RECORD +15 -0
- tool_tray-0.3.8.dist-info/WHEEL +4 -0
- tool_tray-0.3.8.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: tool-tray
|
|
3
|
+
Version: 0.3.8
|
|
4
|
+
Summary: System tray tool manager for private GitHub tools via uv
|
|
5
|
+
Author: Fredrik Averpil
|
|
6
|
+
Author-email: Fredrik Averpil <fredrik.averpil@gmail.com>
|
|
7
|
+
Requires-Dist: httpx>=0.28.1
|
|
8
|
+
Requires-Dist: pillow>=12.1.0
|
|
9
|
+
Requires-Dist: pyshortcuts>=1.9.7
|
|
10
|
+
Requires-Dist: pystray>=0.19.5
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# Tool Tray
|
|
15
|
+
|
|
16
|
+
System tray app to manage and update Python tools from private GitHub repos via uv.
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
### For Users
|
|
21
|
+
|
|
22
|
+
1. Install:
|
|
23
|
+
```bash
|
|
24
|
+
uv tool install tool-tray
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. Run the tray:
|
|
28
|
+
```bash
|
|
29
|
+
tooltray
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. On first run, setup dialog opens automatically - paste your config code
|
|
33
|
+
|
|
34
|
+
### For Admins
|
|
35
|
+
|
|
36
|
+
Generate a config code to share with your team:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
tooltray encode --token ghp_xxx --repo myorg/myapp
|
|
40
|
+
# Output: TB-eyJ0b2tlbi...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Each repo must have a `tooltray.toml` manifest (see below).
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
| Command | Description |
|
|
48
|
+
|---------|-------------|
|
|
49
|
+
| `tooltray` | Run tray app |
|
|
50
|
+
| `tooltray setup` | Configure via CLI (paste config code) |
|
|
51
|
+
| `tooltray reset` | Remove config and start fresh |
|
|
52
|
+
| `tooltray init` | Create `tooltray.toml` template in current dir |
|
|
53
|
+
| `tooltray encode` | Generate config code for sharing |
|
|
54
|
+
| `tooltray autostart` | Manage system startup |
|
|
55
|
+
| `tooltray logs` | View log file |
|
|
56
|
+
| `tooltray cleanup` | Remove orphaned desktop icons |
|
|
57
|
+
| `tooltray --help` | Show help |
|
|
58
|
+
| `tooltray --version` | Show version |
|
|
59
|
+
|
|
60
|
+
### Encode Options
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
tooltray encode --token TOKEN --repo ORG/REPO [--repo ...] [--prefix PREFIX]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Examples:
|
|
67
|
+
```bash
|
|
68
|
+
# Single repo (default TB- prefix)
|
|
69
|
+
tooltray encode --token ghp_xxx --repo myorg/myapp
|
|
70
|
+
|
|
71
|
+
# Multiple repos
|
|
72
|
+
tooltray encode --token ghp_xxx \
|
|
73
|
+
--repo acme/cli \
|
|
74
|
+
--repo acme/api
|
|
75
|
+
|
|
76
|
+
# Custom prefix for branding
|
|
77
|
+
tooltray encode --prefix ACME --token ghp_xxx --repo acme/cli
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Autostart
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
tooltray autostart --enable # Add to system startup
|
|
84
|
+
tooltray autostart --disable # Remove from startup
|
|
85
|
+
tooltray autostart --status # Check if enabled
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Logs
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
tooltray logs # Show last 50 lines
|
|
92
|
+
tooltray logs -f # Tail in real-time
|
|
93
|
+
tooltray logs --path # Print log file path
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Cleanup
|
|
97
|
+
|
|
98
|
+
Remove orphaned desktop icons (icons for tools no longer in config):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
tooltray cleanup --dry-run # Show what would be removed
|
|
102
|
+
tooltray cleanup # Prompt and remove
|
|
103
|
+
tooltray cleanup --force # Remove without prompting
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Tray Menu
|
|
107
|
+
|
|
108
|
+
When not configured:
|
|
109
|
+
| Item | Description |
|
|
110
|
+
|------|-------------|
|
|
111
|
+
| `[!] Not configured` | Status indicator |
|
|
112
|
+
| Setup... | Open setup dialog |
|
|
113
|
+
| Quit | Exit the app |
|
|
114
|
+
|
|
115
|
+
When configured:
|
|
116
|
+
| Item | Description |
|
|
117
|
+
|------|-------------|
|
|
118
|
+
| `> myapp 1.0.0` | Click to launch |
|
|
119
|
+
| `> myapp 1.0.0 -> 1.1.0 *` | Update available, click to launch |
|
|
120
|
+
| `myapp (not installed)` | Not yet installed |
|
|
121
|
+
| Orphaned Icons | Shows icons needing cleanup (if any) |
|
|
122
|
+
| Clean Up (n) | Remove orphaned icons |
|
|
123
|
+
| Update All | Install/update all tools |
|
|
124
|
+
| Check for Updates | Refresh version info |
|
|
125
|
+
| Configure... | Open setup dialog to reconfigure |
|
|
126
|
+
| Quit | Exit the app |
|
|
127
|
+
|
|
128
|
+
## Project Manifest (`tooltray.toml`)
|
|
129
|
+
|
|
130
|
+
Each managed repo must have a `tooltray.toml` in its root:
|
|
131
|
+
|
|
132
|
+
```toml
|
|
133
|
+
name = "databridge" # Display name (required)
|
|
134
|
+
type = "uv" # uv | git (required)
|
|
135
|
+
launch = "databridge" # Command to launch (optional)
|
|
136
|
+
build = "npm install" # Build command for git type (optional)
|
|
137
|
+
desktop_icon = true # Create desktop shortcut (default: false)
|
|
138
|
+
icon = "assets/icon.png" # Path to icon in repo (optional)
|
|
139
|
+
autostart = false # Add to system autostart (default: false)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Repos without `tooltray.toml` are skipped.
|
|
143
|
+
|
|
144
|
+
## Config Code Format
|
|
145
|
+
|
|
146
|
+
The config code is a prefix + base64-encoded JSON:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
TB-eyJ0b2tlbiI6ImdocF94eHgiLCJyZXBvcyI6WyJteW9yZy9teWFwcCJdfQ==
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Decodes to:
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"token": "ghp_xxx",
|
|
156
|
+
"repos": ["myorg/myapp"]
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Config is stored at:
|
|
161
|
+
- **Windows:** `%LOCALAPPDATA%\tooltray\config.json`
|
|
162
|
+
- **macOS:** `~/Library/Application Support/tooltray/config.json`
|
|
163
|
+
- **Linux:** `~/.config/tooltray/config.json`
|
|
164
|
+
|
|
165
|
+
## Requirements
|
|
166
|
+
|
|
167
|
+
- Python 3.12+
|
|
168
|
+
- uv
|
|
169
|
+
|
|
170
|
+
## Development
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Run directly
|
|
174
|
+
uv run tooltray
|
|
175
|
+
|
|
176
|
+
# Test encode command
|
|
177
|
+
uv run tooltray encode --token test123 --repo myorg/myapp
|
|
178
|
+
|
|
179
|
+
# Type check
|
|
180
|
+
uv run basedpyright src/
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
MIT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
tool_tray/__init__.py,sha256=XLe-TtIKjOmZRxc0AE6p-B57-quCUuB9oPNZBGDwcZI,10337
|
|
2
|
+
tool_tray/__main__.py,sha256=kPhKj3ISnfdEj_xNeV02OyVne5R22PDUJXBrFdCdw6c,66
|
|
3
|
+
tool_tray/autostart.py,sha256=ukgQoqvuMOtn9_toaLwMkDbDbU9aOXaIglScGFseO7Q,7684
|
|
4
|
+
tool_tray/config.py,sha256=sPD2BL4s9ONcOK0Gac-efkiFgHJvbHxD2-LK2nl5-uw,3154
|
|
5
|
+
tool_tray/desktop.py,sha256=87uBbZgE3pgZhjKfV1pKRrk83nuMKtBrR87enH_3eq0,3236
|
|
6
|
+
tool_tray/logging.py,sha256=cXO4mxZsQ2sSdCC1HyMbszBOzDH17GFzVnh_bpsk6-c,1939
|
|
7
|
+
tool_tray/manifest.py,sha256=lr13lcoaNsOi4E2_PCiomPN4-cQ05_bdNVuPyrONJeM,1915
|
|
8
|
+
tool_tray/setup_dialog.py,sha256=1IOifQdrpGWuVd27P0XcMXBriCv9QkK_gMvnWfTKs5c,2301
|
|
9
|
+
tool_tray/state.py,sha256=GEbXheWQeuw_IZGXBgccTxzP3jb_OEu-fh_o_4MrKQc,3079
|
|
10
|
+
tool_tray/tray.py,sha256=RbXWfNbLpVqIhrVRDRr2RXimwsZ6f-CwpzxZnN7qpOM,11910
|
|
11
|
+
tool_tray/updater.py,sha256=4yA1nvV2UKKY4POk_lPegpeXUhXsWVCXRHr5V-2DAjs,4354
|
|
12
|
+
tool_tray-0.3.8.dist-info/WHEEL,sha256=XV0cjMrO7zXhVAIyyc8aFf1VjZ33Fen4IiJk5zFlC3g,80
|
|
13
|
+
tool_tray-0.3.8.dist-info/entry_points.txt,sha256=8tdG3k77qXzGiU9GunLH2EkNwmiBg8dy2MnvMy5NaCA,45
|
|
14
|
+
tool_tray-0.3.8.dist-info/METADATA,sha256=HpRnjUmUahSzHZZV5yPZRu-nJZwNqXxgr9g4kET6P8A,4382
|
|
15
|
+
tool_tray-0.3.8.dist-info/RECORD,,
|