+30
-20
README.md
+30
-20
README.md
···
2
2
3
3
**Upload images to the blue sky** ☁️
4
4
5
-
A fast CLI tool for uploading images to your AT Protocol PDS and getting instant CDN URLs through [images.blue](https://tangled.sh/@evan.jarrett.net/imgs.blue).
5
+
A fast CLI tool for uploading images to your AT Protocol PDS and getting instant CDN URLs through [imgs.blue](https://imgs.blue).
6
6
7
7
## Features
8
8
9
9
- 📤 Upload images directly to your Bluesky/AT Protocol PDS
10
-
- 🔗 Get instant CDN URLs from images.blue
10
+
- 📸 Take screenshots and upload instantly with `blup capture`
11
+
- 🔗 Get instant CDN URLs from imgs.blue
11
12
- 📋 Automatic URL copying to clipboard
12
13
- 🎨 Supports JPEG, PNG, WebP, GIF formats
13
14
- 🔐 Secure OAuth authentication
···
23
24
## Quick Start
24
25
25
26
```bash
26
-
# 2. Authenticate
27
-
blup auth
27
+
# Authenticate
28
+
blup login
28
29
29
-
# 3. Upload an image
30
+
# Upload an image
30
31
blup upload cat.jpg
32
+
33
+
# Or take a screenshot and upload it
34
+
blup capture
31
35
```
32
36
33
37
## Commands
34
-
### ```blup auth```
35
-
Authenticate with your AT Protocol account via OAuth
38
+
### ```blup login```
39
+
Authenticate with your AT Protocol account via OAuth. You can optionally pass `--handle` to skip the prompt.
36
40
37
41
### ```blup upload [file]```
38
42
Upload an image and get the CDN URL
39
43
```bash
40
44
$ blup upload avatar.png
41
-
🚀 Uploading to alice.bsky.social...
42
-
✅ Upload complete!
45
+
https://imgs.blue/alice.bsky.social/1TpTNotr6YUww6cD6SLyWi2A2uFkH1lVEnqMXvwdjrwkAU4k
46
+
```
43
47
44
-
📋 CDN URL (copied to clipboard):
45
-
https://images.blue/alice.bsky.social/1TpTNotr6YUww6cD6SLyWi2A2uFkH1lVEnqMXvwdjrwkAU4k
48
+
### ```blup capture```
49
+
Take a screenshot using your desktop's screenshot dialog, upload it, and copy the URL to clipboard
50
+
```bash
51
+
$ blup capture
52
+
Opening screenshot dialog...
53
+
https://imgs.blue/alice.bsky.social/2XyZAbc123...
46
54
```
47
55
48
56
### ```blup status```
49
57
Check your current authentication status
50
58
```bash
51
59
$ blup status
52
-
✅ Authenticated as alice.bsky.social
53
-
PDS: https://bsky.social
60
+
Authenticated: Yes
61
+
Account: did:plc:abc123...
62
+
PDS: https://bsky.social
54
63
```
55
64
56
65
### ```blup logout```
57
66
Remove stored credentials
58
67
```bash
59
68
$ blup logout
60
-
✅ Logged out successfully
69
+
Logged out successfully
61
70
```
62
71
63
72
## Usage Examples
···
66
75
# Upload a profile picture
67
76
blup upload profile.jpg
68
77
69
-
# Upload a screenshot
70
-
blup upload screenshot.png
78
+
# Take a screenshot and upload it
79
+
blup capture
71
80
72
81
# The URL is automatically copied to your clipboard!
73
82
# Just paste directly into your blog, documentation, or chat
···
77
86
78
87
blup uses OAuth for secure authentication:
79
88
80
-
1. Run ```blup auth``` to authenticate
89
+
1. Run ```blup login``` to authenticate
81
90
2. Your browser will open for authorization
82
91
3. You're ready to upload!
83
92
84
93
## Building from source
85
94
86
95
```bash
87
-
git clone https://github.com/yourusername/blup.git
96
+
git clone https://tangled.sh/evan.jarrett.net/blup
88
97
cd blup
89
-
go build -o blup cmd/blup/main.go
98
+
go build -o blup ./cmd/blup
90
99
```
91
100
92
101
## Why blup?
93
102
94
103
- **Dead simple** - Authenticate once, upload with a single command
95
-
- **Instant CDN URLs** - Powered by the global images.blue CDN
104
+
- **Screenshot to URL** - Capture and share screenshots instantly
105
+
- **Instant CDN URLs** - Powered by the global imgs.blue CDN
96
106
- **Clipboard ready** - URL copied automatically, just paste and go
97
107
- **Lightweight** - Single binary, no dependencies
98
108
+6
-6
internal/auth/storage.go
+6
-6
internal/auth/storage.go
···
11
11
)
12
12
13
13
const (
14
-
keyringService = "blup"
15
-
currentSessionKey = "current-session"
16
-
sessionKeyPrefix = "session:"
17
-
authRequestPrefix = "auth-request:"
18
-
pendingAuthStateKey = "pending-auth-state"
19
-
loginIdentifierKey = "login-identifier"
14
+
keyringService = "blup"
15
+
currentSessionKey = "current-session"
16
+
sessionKeyPrefix = "session:"
17
+
authRequestPrefix = "auth-request:"
18
+
pendingAuthStateKey = "pending-auth-state"
19
+
loginIdentifierKey = "login-identifier"
20
20
)
21
21
22
22
// KeyringAuthStore implements oauth.ClientAuthStore using the system keyring
-16
internal/schemas/image.go
-16
internal/schemas/image.go
···
1
-
package schemas
2
-
3
-
import (
4
-
lexutil "github.com/bluesky-social/indigo/lex/util"
5
-
)
6
-
7
-
type blupImage struct {
8
-
LexiconTypeID string `json:"$type" cborgen:"$type"`
9
-
Blob *lexutil.LexBlob `json:"blob" cborgen:"blob"`
10
-
CreatedAt string `json:"createdAt" cborgen:"createdAt"`
11
-
ExpiresAt string `json:"expiresAt" cborgen:"expiresAt"`
12
-
Filename string `json:"filename" cborgen:"filename"`
13
-
ContentType string `json:"contentType" cborgen:"contentType"`
14
-
Size int `json:"size" cborgen:"size"`
15
-
Metadata map[string]interface{} `json:"metadata,omitempty" cborgen:"metadata,omitempty"`
16
-
}