@harveyrandall/bsky-cli 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.md +21 -0
- package/README.md +229 -0
- package/dist/index.js +1620 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Harvey Randall
|
|
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,229 @@
|
|
|
1
|
+
# bsky-cli
|
|
2
|
+
|
|
3
|
+
<!-- badges -->
|
|
4
|
+
[](https://github.com/harveyrandall/bsky-cli/actions/workflows/ci.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/@harveyrandall/bsky-cli)
|
|
6
|
+
[](LICENSE.md)
|
|
7
|
+
[](https://www.npmjs.com/package/@harveyrandall/bsky-cli)
|
|
8
|
+
|
|
9
|
+
A command-line client for [Bluesky](https://bsky.app), built with TypeScript.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
### npm / yarn / pnpm / bun
|
|
14
|
+
|
|
15
|
+
Requires Node.js >= 22.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g @harveyrandall/bsky-cli
|
|
19
|
+
# or
|
|
20
|
+
yarn global add @harveyrandall/bsky-cli
|
|
21
|
+
# or
|
|
22
|
+
pnpm add -g @harveyrandall/bsky-cli
|
|
23
|
+
# or
|
|
24
|
+
bun add -g @harveyrandall/bsky-cli
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Homebrew (macOS / Linux)
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
brew install harveyrandall/bsky-cli
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Download a binary
|
|
34
|
+
|
|
35
|
+
Standalone binaries for macOS, Linux, and Windows are attached to every
|
|
36
|
+
[GitHub Release](https://github.com/harveyrandall/bsky-cli/releases).
|
|
37
|
+
|
|
38
|
+
<details>
|
|
39
|
+
<summary>Build from source</summary>
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
git clone https://github.com/harveyrandall/bsky-cli.git
|
|
43
|
+
cd bsky-cli
|
|
44
|
+
corepack enable
|
|
45
|
+
yarn install
|
|
46
|
+
yarn build
|
|
47
|
+
yarn link:global # registers `bsky` globally
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To uninstall:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
yarn unlink:global
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
</details>
|
|
57
|
+
|
|
58
|
+
## Authentication
|
|
59
|
+
|
|
60
|
+
### Interactive login
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
bsky login alice.bsky.social # prompts for password (hidden input)
|
|
64
|
+
bsky login alice.bsky.social mypassword # or pass directly
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Environment variables
|
|
68
|
+
|
|
69
|
+
All configuration can be set via environment variables, useful for CI and scripts:
|
|
70
|
+
|
|
71
|
+
| Variable | Description |
|
|
72
|
+
|----------|-------------|
|
|
73
|
+
| `BSKY_HANDLE` | Bluesky handle |
|
|
74
|
+
| `BSKY_PASSWORD` | App password |
|
|
75
|
+
| `BSKY_HOST` | PDS host URL (default: `https://bsky.social`) |
|
|
76
|
+
| `BSKY_BGS` | BGS host URL (default: `https://bsky.network`) |
|
|
77
|
+
| `BSKY_PROFILE` | Profile name (same as `--profile`) |
|
|
78
|
+
|
|
79
|
+
Precedence: CLI args > environment variables > config file.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# No login needed - authenticate directly from env
|
|
83
|
+
BSKY_HANDLE=alice.bsky.social BSKY_PASSWORD=secret bsky tl
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Piped input
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
echo "$APP_PASSWORD" | bsky login alice.bsky.social
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Multiple accounts
|
|
93
|
+
|
|
94
|
+
Use `--profile` / `-p` to manage separate accounts:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
bsky login alice.bsky.social -p personal
|
|
98
|
+
bsky login bob.bsky.social -p work
|
|
99
|
+
|
|
100
|
+
bsky tl -p personal
|
|
101
|
+
bsky tl -p work
|
|
102
|
+
bsky -p ? tl # list all profiles
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Commands
|
|
106
|
+
|
|
107
|
+
### Feed
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
bsky timeline|tl [-H handle] [-n count]
|
|
111
|
+
bsky stream [--cursor] [-H handle] [--pattern regex] [--pattern-flags flags]
|
|
112
|
+
bsky thread <uri> [-n depth]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Posting
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
bsky post <text> [--stdin] [-i image...] [--image-alt alt...] [--video path] [--video-alt alt]
|
|
119
|
+
bsky reply <uri> <text>
|
|
120
|
+
bsky quote <uri> <text>
|
|
121
|
+
bsky delete <uri...>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Engagement
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
bsky like <uri...>
|
|
128
|
+
bsky likes <uri>
|
|
129
|
+
bsky repost <uri...>
|
|
130
|
+
bsky reposts <uri>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Bookmarks
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
bsky bookmarks create <uri...>
|
|
137
|
+
bsky bookmarks delete <uri...>
|
|
138
|
+
bsky bookmarks get [-n count]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Social
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
bsky follow <handle...>
|
|
145
|
+
bsky unfollow <handle...>
|
|
146
|
+
bsky follows [-H handle]
|
|
147
|
+
bsky followers [-H handle]
|
|
148
|
+
bsky block <handle...>
|
|
149
|
+
bsky unblock <handle...>
|
|
150
|
+
bsky blocks
|
|
151
|
+
bsky mute <handle...>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Discovery
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
bsky search <terms...> [-n count]
|
|
158
|
+
bsky search-users <terms...> [-n count]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Account
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
bsky profile [-H handle]
|
|
165
|
+
bsky profile-update [displayname] [description] [--avatar file] [--banner file]
|
|
166
|
+
bsky session
|
|
167
|
+
bsky notifs|notification [-a]
|
|
168
|
+
bsky invite-codes [--used]
|
|
169
|
+
bsky app-password list|add|revoke
|
|
170
|
+
bsky report <handle> [--comment text]
|
|
171
|
+
bsky mod-list <handles...> [--name] [--desc]
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Utilities
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
bsky completions bash|zsh|fish
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Global flags
|
|
181
|
+
|
|
182
|
+
| Flag | Description |
|
|
183
|
+
|------|-------------|
|
|
184
|
+
| `--json` | Output as JSON |
|
|
185
|
+
| `-p, --profile <name>` | Use a named profile |
|
|
186
|
+
| `-v, --verbose` | Verbose output |
|
|
187
|
+
| `--version` | Show version |
|
|
188
|
+
|
|
189
|
+
## Shell completions
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# Bash
|
|
193
|
+
bsky completions bash >> ~/.bashrc
|
|
194
|
+
|
|
195
|
+
# Zsh
|
|
196
|
+
bsky completions zsh >> ~/.zshrc
|
|
197
|
+
|
|
198
|
+
# Fish
|
|
199
|
+
bsky completions fish > ~/.config/fish/completions/bsky.fish
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Development
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
yarn dev # run via tsx (no build needed)
|
|
206
|
+
yarn build # build to dist/
|
|
207
|
+
yarn typecheck # tsc --noEmit
|
|
208
|
+
yarn test:run # run tests once
|
|
209
|
+
yarn test:coverage # run tests with coverage
|
|
210
|
+
yarn link:global # build + register globally
|
|
211
|
+
yarn unlink:global # remove global symlink
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide.
|
|
215
|
+
|
|
216
|
+
## Roadmap
|
|
217
|
+
|
|
218
|
+
- [ ] Direct messages
|
|
219
|
+
- [ ] List creation and management
|
|
220
|
+
- [ ] Starter packs
|
|
221
|
+
- [ ] Moderation lists
|
|
222
|
+
- [ ] Post labels
|
|
223
|
+
- [ ] Auto alt-text for images and videos
|
|
224
|
+
- [ ] OAuth login support
|
|
225
|
+
- [ ] Docker BuildKit for standalone binary builds
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
[MIT](LICENSE.md)
|