superthread 0.7.2

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.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +4 -0
  3. data/LICENSE +21 -0
  4. data/README.md +492 -0
  5. data/exe/suth +19 -0
  6. data/lib/superthread/cli/accounts.rb +240 -0
  7. data/lib/superthread/cli/activity.rb +210 -0
  8. data/lib/superthread/cli/base.rb +355 -0
  9. data/lib/superthread/cli/boards.rb +131 -0
  10. data/lib/superthread/cli/cards.rb +530 -0
  11. data/lib/superthread/cli/checklists.rb +223 -0
  12. data/lib/superthread/cli/comments.rb +86 -0
  13. data/lib/superthread/cli/completion.rb +306 -0
  14. data/lib/superthread/cli/concerns/board_resolvable.rb +70 -0
  15. data/lib/superthread/cli/concerns/confirmable.rb +55 -0
  16. data/lib/superthread/cli/concerns/date_parsable.rb +196 -0
  17. data/lib/superthread/cli/concerns/list_resolvable.rb +53 -0
  18. data/lib/superthread/cli/concerns/space_resolvable.rb +52 -0
  19. data/lib/superthread/cli/concerns/sprint_resolvable.rb +55 -0
  20. data/lib/superthread/cli/concerns/tag_resolvable.rb +49 -0
  21. data/lib/superthread/cli/concerns/user_resolvable.rb +52 -0
  22. data/lib/superthread/cli/concerns/workspace_resolvable.rb +83 -0
  23. data/lib/superthread/cli/config.rb +129 -0
  24. data/lib/superthread/cli/formatter.rb +388 -0
  25. data/lib/superthread/cli/lists.rb +85 -0
  26. data/lib/superthread/cli/main.rb +121 -0
  27. data/lib/superthread/cli/members.rb +19 -0
  28. data/lib/superthread/cli/notes.rb +64 -0
  29. data/lib/superthread/cli/pages.rb +128 -0
  30. data/lib/superthread/cli/projects.rb +124 -0
  31. data/lib/superthread/cli/replies.rb +94 -0
  32. data/lib/superthread/cli/search.rb +34 -0
  33. data/lib/superthread/cli/setup.rb +253 -0
  34. data/lib/superthread/cli/spaces.rb +141 -0
  35. data/lib/superthread/cli/sprints.rb +32 -0
  36. data/lib/superthread/cli/tags.rb +86 -0
  37. data/lib/superthread/cli/ui/gum_prompt.rb +58 -0
  38. data/lib/superthread/cli/ui/plain_prompt.rb +73 -0
  39. data/lib/superthread/cli/ui.rb +263 -0
  40. data/lib/superthread/cli/workspaces.rb +105 -0
  41. data/lib/superthread/cli.rb +12 -0
  42. data/lib/superthread/client.rb +207 -0
  43. data/lib/superthread/configuration.rb +354 -0
  44. data/lib/superthread/connection.rb +57 -0
  45. data/lib/superthread/error.rb +164 -0
  46. data/lib/superthread/mention_formatter.rb +96 -0
  47. data/lib/superthread/model.rb +178 -0
  48. data/lib/superthread/models/board.rb +59 -0
  49. data/lib/superthread/models/card.rb +321 -0
  50. data/lib/superthread/models/checklist.rb +91 -0
  51. data/lib/superthread/models/checklist_item.rb +69 -0
  52. data/lib/superthread/models/comment.rb +71 -0
  53. data/lib/superthread/models/concerns/archivable.rb +32 -0
  54. data/lib/superthread/models/concerns/presentable.rb +113 -0
  55. data/lib/superthread/models/concerns/timestampable.rb +91 -0
  56. data/lib/superthread/models/list.rb +67 -0
  57. data/lib/superthread/models/member.rb +40 -0
  58. data/lib/superthread/models/note.rb +56 -0
  59. data/lib/superthread/models/page.rb +70 -0
  60. data/lib/superthread/models/project.rb +83 -0
  61. data/lib/superthread/models/space.rb +71 -0
  62. data/lib/superthread/models/sprint.rb +53 -0
  63. data/lib/superthread/models/tag.rb +52 -0
  64. data/lib/superthread/models/team.rb +68 -0
  65. data/lib/superthread/models/user.rb +76 -0
  66. data/lib/superthread/models.rb +12 -0
  67. data/lib/superthread/object.rb +285 -0
  68. data/lib/superthread/objects/collection.rb +179 -0
  69. data/lib/superthread/resources/base.rb +204 -0
  70. data/lib/superthread/resources/boards.rb +150 -0
  71. data/lib/superthread/resources/cards.rb +363 -0
  72. data/lib/superthread/resources/comments.rb +163 -0
  73. data/lib/superthread/resources/notes.rb +61 -0
  74. data/lib/superthread/resources/pages.rb +110 -0
  75. data/lib/superthread/resources/projects.rb +117 -0
  76. data/lib/superthread/resources/search.rb +46 -0
  77. data/lib/superthread/resources/spaces.rb +104 -0
  78. data/lib/superthread/resources/sprints.rb +37 -0
  79. data/lib/superthread/resources/tags.rb +52 -0
  80. data/lib/superthread/resources/users.rb +29 -0
  81. data/lib/superthread/version.rb +6 -0
  82. data/lib/superthread/version_checker.rb +174 -0
  83. data/lib/superthread.rb +30 -0
  84. metadata +259 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 578f908b003a64b7d061ad4ffcb88a0e40b6ddf71a497760d5ffedd2bbd66b18
4
+ data.tar.gz: 5abed6edadbccf70ddf0b011378011d0416688e5e88f37b8ea1b2bec1b2b8c19
5
+ SHA512:
6
+ metadata.gz: 92bc828807fec58f52dfa499f9facc797b5bf15f1f6f4f848425494716944b4ce152b891344b2d8bbf43b4d726a23a53444f0129de938b315efb9d15e41b3111
7
+ data.tar.gz: 33cb693e6e8dc7716f5fa1b8e4326f9a452cd224e89a573df3852c7f8371eb5ebe2b9ba1e085351aea27c7eee1630a7e9e30a0702d85cfa7d1ed198f1c495bbe
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented via
4
+ [GitHub Releases](https://github.com/steveclarke/superthread/releases).
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Stephen Clarke
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.
data/README.md ADDED
@@ -0,0 +1,492 @@
1
+ # Superthread
2
+
3
+ A Ruby gem and CLI to manage your [Superthread](https://superthread.com) projects from the terminal.
4
+
5
+ Create cards, move tasks, search your workspace, and run scripts — right from the terminal. Works great with AI agents too.
6
+
7
+ > [!WARNING]
8
+ > **Pre-Release Software**
9
+ >
10
+ > This project is not made by Superthread. It is built and kept up by the community.
11
+ >
12
+ > We made this for our own work and use it every day. But it may still have bugs or missing features. Things may change without notice.
13
+ >
14
+ > **Test in a safe place first** before you depend on it. Bug reports and pull requests are welcome.
15
+
16
+ ## Table of Contents
17
+
18
+ - [Install](#install)
19
+ - [Setup](#setup)
20
+ - [CLI Usage](#cli-usage)
21
+ - [Library Usage](#library-usage)
22
+ - [Key Terms](#key-terms)
23
+ - [Agents and Scripts](#agents-and-scripts)
24
+ - [Development](#development)
25
+ - [License](#license)
26
+
27
+ ## Install
28
+
29
+ ### Homebrew (best option)
30
+
31
+ ```bash
32
+ brew install steveclarke/tap/superthread
33
+ ```
34
+
35
+ ### RubyGems
36
+
37
+ ```bash
38
+ gem install superthread
39
+ ```
40
+
41
+ Or add to your Gemfile:
42
+
43
+ ```ruby
44
+ gem "superthread"
45
+ ```
46
+
47
+ ## Setup
48
+
49
+ ### Quick Setup
50
+
51
+ Run the setup wizard:
52
+
53
+ ```bash
54
+ suth setup
55
+ ```
56
+
57
+ It will:
58
+ 1. Ask for an account name (like "personal" or "work")
59
+ 2. Ask for your API key (find it in Superthread Settings → API)
60
+ 3. Find your workspace
61
+ 4. Save your settings
62
+
63
+ Then try these commands:
64
+ ```bash
65
+ suth spaces list
66
+ suth boards list -s SPACE
67
+ suth cards assigned me
68
+ ```
69
+
70
+ ### More Than One Account
71
+
72
+ You can set up more than one account:
73
+
74
+ ```bash
75
+ # Add another account
76
+ suth accounts add work
77
+
78
+ # See all accounts
79
+ suth accounts list
80
+
81
+ # Switch accounts
82
+ suth accounts use work
83
+
84
+ # Use a specific account for one command
85
+ suth --account personal cards assigned me
86
+ ```
87
+
88
+ ### Config Files
89
+
90
+ Settings live in two files:
91
+
92
+ **Config file** (`~/.config/superthread/config.yaml`) — your keys:
93
+ ```yaml
94
+ accounts:
95
+ personal:
96
+ api_key: stp_xxxxxxxxxxxx
97
+ work:
98
+ api_key: stp_yyyyyyyyyyyy
99
+
100
+ format: table
101
+ ```
102
+
103
+ **State file** (`~/.local/state/superthread/context.yaml`) — your active session:
104
+ ```yaml
105
+ current_account: personal
106
+ accounts:
107
+ personal:
108
+ workspace_id: t4k7Wa2e
109
+ workspace_name: "My Team"
110
+ ```
111
+
112
+ You can also create a blank config file by hand:
113
+
114
+ ```bash
115
+ suth config init
116
+ ```
117
+
118
+ ### Env Vars
119
+
120
+ | Variable | What it does |
121
+ |----------|-------------|
122
+ | `SUPERTHREAD_API_KEY` | API key (wins over config file) |
123
+ | `SUPERTHREAD_WORKSPACE_ID` | Default workspace ID |
124
+ | `SUPERTHREAD_ACCOUNT` | Account name to use |
125
+ | `SUPERTHREAD_API_BASE_URL` | API endpoint (default: `https://api.superthread.com/v1`) |
126
+
127
+ ## CLI Usage
128
+
129
+ The CLI command is `suth`.
130
+
131
+ ### Global Options
132
+
133
+ ```
134
+ -a, --account NAME Use a specific account
135
+ -w, --workspace ID Set the workspace (ID or name)
136
+ -y, --yes Skip "are you sure?" prompts
137
+ -v, --verbose Show more detail
138
+ -q, --quiet Show less detail
139
+ --json Output as JSON (default is a table)
140
+ ```
141
+
142
+ ### Commands
143
+
144
+ ```bash
145
+ # Setup & Configuration
146
+ suth version # Show version
147
+ suth setup # Run the setup wizard
148
+ suth config init # Create a config file
149
+ suth config show # Show your settings
150
+ suth config set KEY VALUE # Change a setting
151
+ suth config path # Show config file path
152
+
153
+ # Accounts
154
+ suth accounts list # List all accounts
155
+ suth accounts show # Show current account
156
+ suth accounts use NAME # Switch to an account
157
+ suth accounts add NAME # Add a new account
158
+ suth accounts remove NAME # Remove an account
159
+
160
+ # Workspaces
161
+ suth workspaces list # List workspaces
162
+ suth workspaces use WORKSPACE # Set your workspace
163
+ suth workspaces current # Show current workspace
164
+
165
+ # Current User & Members
166
+ suth me # Your user info
167
+ suth members list # List workspace members
168
+
169
+ # Cards
170
+ suth cards list -b BOARD # List cards on a board
171
+ suth cards list --sprint SPRINT -s SPACE # List cards in a sprint
172
+ suth cards get CARD_ID # Get card details
173
+ suth cards create --title "Task" -l LIST -b BOARD
174
+ suth cards create --title "Task" -l LIST --sprint SPRINT -s SPACE
175
+ suth cards update CARD_ID --title "New title"
176
+ suth cards update CARD_ID --sprint SPRINT -s SPACE # Move to sprint
177
+ suth cards update CARD_ID -l "Done" # Move card to a list
178
+ suth cards delete CARD_ID
179
+ suth cards duplicate CARD_ID # Copy a card
180
+ suth cards assigned USER # Cards for a user
181
+ suth cards assign CARD_ID USER # Assign someone to a card
182
+ suth cards unassign CARD_ID USER # Remove someone from a card
183
+ suth cards link --card CARD --related OTHER --type blocks
184
+ suth cards unlink --card CARD --related OTHER
185
+
186
+ # Card Tags
187
+ suth cards tag CARD_ID TAG1,TAG2 # Add tags
188
+ suth cards untag CARD_ID TAG # Remove a tag
189
+
190
+ # Boards
191
+ suth boards list -s SPACE # List boards in a space
192
+ suth boards get BOARD # Get board details
193
+ suth boards create --title "Board" -s SPACE
194
+ suth boards update BOARD --title "New name"
195
+ suth boards duplicate BOARD # Copy a board
196
+ suth boards delete BOARD
197
+
198
+ # Lists (Board Columns)
199
+ suth lists list -b BOARD # List columns on a board
200
+ suth lists create -b BOARD --title "Column"
201
+ suth lists update LIST_ID --title "New name"
202
+ suth lists delete LIST_ID
203
+
204
+ # Projects (Epics)
205
+ suth projects list # List all projects
206
+ suth projects get PROJECT_ID # Get project details
207
+ suth projects create --title "Q1 Roadmap" -l LIST [-b BOARD]
208
+ suth projects update PROJECT_ID --title "New title"
209
+ suth projects delete PROJECT_ID
210
+ suth projects add-card PROJECT_ID CARD_ID # Add a card to a project
211
+ suth projects remove-card PROJECT_ID CARD_ID # Remove a card
212
+
213
+ # Spaces
214
+ suth spaces list # List all spaces
215
+ suth spaces get SPACE # Get space details
216
+ suth spaces create --title "Engineering"
217
+ suth spaces update SPACE --title "New name"
218
+ suth spaces delete SPACE
219
+ suth spaces add-member SPACE USER [--role ROLE]
220
+ suth spaces remove-member SPACE USER
221
+
222
+ # Pages
223
+ suth pages list [-s SPACE] # List pages
224
+ suth pages get PAGE_ID # Get page details
225
+ suth pages create -s SPACE [--title "Wiki"]
226
+ suth pages update PAGE_ID --title "New title"
227
+ suth pages duplicate PAGE_ID -s SPACE
228
+ suth pages archive PAGE_ID
229
+ suth pages delete PAGE_ID
230
+
231
+ # Comments
232
+ suth comments get COMMENT_ID # Get a comment
233
+ suth comments create --content "Looks good!" --card CARD
234
+ suth comments update COMMENT_ID --content "Updated"
235
+ suth comments delete COMMENT_ID
236
+
237
+ # Replies
238
+ suth replies list --comment COMMENT_ID # List replies
239
+ suth replies get REPLY_ID # Get a reply
240
+ suth replies create --comment COMMENT_ID --content "Reply text"
241
+ suth replies update REPLY_ID --comment COMMENT_ID --content "Updated"
242
+ suth replies delete REPLY_ID --comment COMMENT_ID
243
+
244
+ # Checklists
245
+ suth checklists list -c CARD_ID # List checklists on a card
246
+ suth checklists get CHECKLIST_ID -c CARD_ID
247
+ suth checklists create -c CARD_ID --title "Tasks"
248
+ suth checklists update CHECKLIST_ID -c CARD_ID --title "New title"
249
+ suth checklists delete CHECKLIST_ID -c CARD_ID
250
+ suth checklists add-item CHECKLIST_ID -c CARD_ID --title "Item"
251
+ suth checklists update-item ITEM_ID -c CARD_ID --checklist CL_ID --title "New"
252
+ suth checklists remove-item ITEM_ID -c CARD_ID --checklist CL_ID
253
+ suth checklists check ITEM_ID -c CARD_ID --checklist CL_ID
254
+ suth checklists uncheck ITEM_ID -c CARD_ID --checklist CL_ID
255
+
256
+ # Notes
257
+ suth notes list
258
+ suth notes get NOTE_ID
259
+ suth notes create --title "Meeting notes" [--transcript "..."]
260
+ suth notes delete NOTE_ID
261
+
262
+ # Sprints
263
+ suth sprints list -s SPACE
264
+ suth sprints get SPRINT_ID -s SPACE
265
+
266
+ # Search
267
+ suth search query "bug fix" [--types card,page] [-s SPACE] [--grouped]
268
+
269
+ # Tags
270
+ suth tags list # List all tags
271
+ suth tags list --all # Include unused tags
272
+ suth tags list -s SPACE # Filter by space
273
+ suth tags create --name "urgent" --color "#ff0000"
274
+ suth tags update TAG --name "critical"
275
+ suth tags delete TAG
276
+
277
+ # Shell Completion
278
+ suth completion bash
279
+ suth completion zsh
280
+ suth completion fish
281
+ ```
282
+
283
+ ### Shell Completion
284
+
285
+ Set up tab help for your shell:
286
+
287
+ **zsh:**
288
+ ```bash
289
+ # Load now
290
+ source <(suth completion zsh)
291
+
292
+ # Load every time (macOS with Homebrew)
293
+ suth completion zsh > $(brew --prefix)/share/zsh/site-functions/_suth
294
+ ```
295
+
296
+ **bash:**
297
+ ```bash
298
+ # Load now
299
+ source <(suth completion bash)
300
+
301
+ # Load every time (macOS with Homebrew)
302
+ suth completion bash > $(brew --prefix)/etc/bash_completion.d/suth
303
+ ```
304
+
305
+ **fish:**
306
+ ```bash
307
+ suth completion fish > ~/.config/fish/completions/suth.fish
308
+ ```
309
+
310
+ ### Option Aliases
311
+
312
+ Common options have short forms:
313
+
314
+ | Long | Short | What it means |
315
+ |------|-------|-------------|
316
+ | `--space` | `-s` | Space (ID or name) |
317
+ | `--board` | `-b` | Board (ID or name) |
318
+ | `--list` | `-l` | List (ID or name) |
319
+ | `--card` | `-c` | Card ID |
320
+ | `--related` | `-r` | Related card ID |
321
+ | `--owner` | `-o` | Owner (user ID, name, or email) |
322
+ | `--yes` | `-y` | Skip prompts |
323
+
324
+ > [!TIP]
325
+ > - Most commands accept **names or IDs** for spaces, boards, lists, sprints, users, and tags
326
+ > - Use `-s SPACE` to help when board or list names are unclear
327
+ > - Use `--json` for scripted output: `suth cards assigned me --json`
328
+ > - Use `me` as a shortcut: `suth cards assigned me`
329
+ > - Priority levels: 1=Urgent, 2=High, 3=Medium, 4=Low
330
+
331
+ ## Library Usage
332
+
333
+ You can also use Superthread as a Ruby gem in your code:
334
+
335
+ ```ruby
336
+ require "superthread"
337
+
338
+ # Set up
339
+ Superthread.configure do |config|
340
+ config.api_key = "stp_xxxxxxxxxxxx"
341
+ end
342
+
343
+ # Or use env vars — they work on their own
344
+
345
+ # Create a client
346
+ client = Superthread::Client.new
347
+
348
+ # Users
349
+ me = client.users.me
350
+ members = client.users.members(workspace_id)
351
+
352
+ # Cards
353
+ card = client.cards.find(workspace_id, "crd_xxx")
354
+ card = client.cards.create(workspace_id,
355
+ title: "New task",
356
+ list_id: "lst_xxx",
357
+ content: "Task description"
358
+ )
359
+ client.cards.update(workspace_id, "crd_xxx", title: "Updated title")
360
+ client.cards.delete(workspace_id, "crd_xxx")
361
+ cards = client.cards.assigned(workspace_id, user_id: "usr_xxx")
362
+
363
+ # Boards
364
+ boards = client.boards.list(workspace_id, space_id: "spc_xxx")
365
+ board = client.boards.create(workspace_id,
366
+ title: "Sprint Board",
367
+ space_id: "spc_xxx"
368
+ )
369
+
370
+ # Projects
371
+ projects = client.projects.list(workspace_id)
372
+ client.projects.add_card(workspace_id, "prj_xxx", "crd_xxx")
373
+
374
+ # Search
375
+ results = client.search.query(workspace_id,
376
+ query: "bug",
377
+ types: ["card", "page"],
378
+ grouped: true
379
+ )
380
+ ```
381
+
382
+ ## Key Terms
383
+
384
+ Superthread uses these terms:
385
+
386
+ | Term | What it is |
387
+ |------|------------|
388
+ | Workspace | Your team or company account |
389
+ | Space | A folder that holds boards, pages, and sprints |
390
+ | Board | A kanban board with columns |
391
+ | Project | A big goal (epic) that holds many cards |
392
+ | Card | A task or issue on a board |
393
+ | Page | A wiki or document |
394
+ | Note | A quick note in a space |
395
+
396
+ ## Agents and Scripts
397
+
398
+ This CLI works well with AI agents, scripts, and CI jobs. Every command can give you JSON and run with no prompts.
399
+
400
+ ### Built for automation
401
+
402
+ - **`--json` on every command** — Get JSON instead of tables. Easy for agents to read.
403
+ - **`-y` to skip prompts** — Delete and remove ask "are you sure?" by default. Pass `-y` to skip that. Scripts can run with no waiting.
404
+ - **Env vars for setup** — Set `SUPERTHREAD_API_KEY` and `SUPERTHREAD_WORKSPACE_ID` and you are ready. No config files. No wizard.
405
+ - **Clear errors** — Bad commands return non-zero exit codes. With `--json`, errors come back as JSON too.
406
+
407
+ ### Example: create a card from a script
408
+
409
+ ```bash
410
+ export SUPERTHREAD_API_KEY="stp_xxxxxxxxxxxx"
411
+ export SUPERTHREAD_WORKSPACE_ID="t4k7Wa2e"
412
+
413
+ # Create a card and get the new ID
414
+ suth cards create \
415
+ --title "Deploy v2.1 to staging" \
416
+ --list "To Do" \
417
+ --board "Sprint Board" \
418
+ -s "Engineering" \
419
+ --json | jq -r '.id'
420
+ ```
421
+
422
+ Agents can chain commands — create a card, assign it, add a checklist, post a comment — all with no human input.
423
+
424
+ ### Claude Code skill
425
+
426
+ A [Claude Code](https://docs.anthropic.com/en/docs/claude-code) skill is included. It teaches agents every CLI command. With the skill, agents don't need to run `--help` first.
427
+
428
+ ```bash
429
+ npx skills add steveclarke/superthread
430
+ ```
431
+
432
+ Once installed, type `/superthread` in any Claude Code session. It also starts on its own when you work with Superthread tasks.
433
+
434
+ ## Development
435
+
436
+ ```bash
437
+ git clone https://github.com/steveclarke/superthread.git
438
+ cd superthread
439
+ bundle install
440
+
441
+ # Run tests
442
+ bundle exec rspec
443
+
444
+ # Check code style
445
+ bundle exec standardrb
446
+
447
+ # Check docs
448
+ rake yard:lint
449
+
450
+ # Run the CLI
451
+ bundle exec bin/suth version
452
+ ```
453
+
454
+ See [CONTRIBUTING.md](CONTRIBUTING.md) to learn more.
455
+
456
+ ### Key Files and Folders
457
+
458
+ | Path | What's inside |
459
+ |------|--------------|
460
+ | `lib/superthread/` | The Ruby gem (models, resources, client) |
461
+ | `lib/superthread/cli/` | CLI commands (one file per group) |
462
+ | `exe/suth` | The CLI entry point |
463
+ | `spec/` | Tests (RSpec) |
464
+ | `skills/superthread/` | Claude Code skill for the CLI |
465
+ | `docs/` | Guides for devs |
466
+
467
+ ### Git Hooks
468
+
469
+ This project uses [Lefthook](https://github.com/evilmartians/lefthook) to check code before each commit:
470
+
471
+ ```bash
472
+ brew install lefthook
473
+ lefthook install
474
+ ```
475
+
476
+ The hook checks code style (StandardRB) and docs (yard-lint) on staged files before each commit.
477
+
478
+ ### Releasing
479
+
480
+ ```bash
481
+ # Bump version
482
+ rake bump:patch # 0.0.x
483
+ rake bump:minor # 0.x.0
484
+ rake bump:major # x.0.0
485
+
486
+ # Release (creates a tag, pushes it, GitHub Actions does the rest)
487
+ rake release
488
+ ```
489
+
490
+ ## License
491
+
492
+ MIT License — see [LICENSE](LICENSE) for details.
data/exe/suth ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "superthread"
5
+
6
+ begin
7
+ Superthread::Cli::Main.start(ARGV)
8
+ rescue Superthread::Error => e
9
+ warn " \e[31mERROR: #{e.message}\e[0m"
10
+ exit 1
11
+ ensure
12
+ # Check for updates (cached, at most once per day, silent on failure)
13
+ begin
14
+ Superthread::VersionChecker.check_if_stale!
15
+ notice = Superthread::VersionChecker.update_notice
16
+ $stderr.print notice if notice && $stderr.tty?
17
+ rescue # rubocop:disable Lint/SuppressedException
18
+ end
19
+ end