hiiro 0.1.149 → 0.1.150
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.
- checksums.yaml +4 -4
- data/CLAUDE.md +151 -3
- data/README.md +10 -0
- data/lib/hiiro/service_manager.rb +1 -0
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 10f2a86eb2689dd8fa57d4f90c5dbb4cad8cdfff2607a0b382eb26a941a31775
|
|
4
|
+
data.tar.gz: ac6de045418d116c85f336c2926bd8c959b6b52cd9d6493f30c29bcea59a90d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eaf5e0269292073af2e4b2ea9015ed9ebb13376aa2756513d6a1eb14a84ea9706bf600159bbd38d72436f29ebcbdfb2b51e0994457949e3a7a921c704459e109
|
|
7
|
+
data.tar.gz: 757f05788e7fa28a6a998a218cfaa8e672461a296e646f4919611138fc1d20054171eed3e054ae1bb5693ffb0e65f2b000be3c5f9523ad555f195fe1767f61f0
|
data/CLAUDE.md
CHANGED
|
@@ -277,13 +277,153 @@ Hiiro::Notification.show(hiiro) # Show notification based on hiiro.args
|
|
|
277
277
|
# Supports: -m message, -t title, -l link, -c command, -s sound
|
|
278
278
|
```
|
|
279
279
|
|
|
280
|
+
### Hiiro::Queue (lib/hiiro/queue.rb)
|
|
281
|
+
|
|
282
|
+
Task queue that pipes prompts to `claude` via tmux. Tasks are markdown files with optional YAML frontmatter (`task_name`, `tree_name`, `session_name`) that flow through statuses: `wip` -> `pending` -> `running` -> `done`/`failed`.
|
|
283
|
+
|
|
284
|
+
Subcommands (`h queue <subcmd>`):
|
|
285
|
+
- `ls`/`list` - List all tasks with status, elapsed time, and preview
|
|
286
|
+
- `status` - Detailed status with working directory info
|
|
287
|
+
- `add` - Create a new prompt (opens editor or accepts stdin/args, supports `-t <task>` flag)
|
|
288
|
+
- `wip` - Create/edit a work-in-progress prompt
|
|
289
|
+
- `ready` - Move wip task to pending
|
|
290
|
+
- `run [name]` - Launch pending task(s) in tmux windows
|
|
291
|
+
- `watch` - Continuously poll and launch pending tasks
|
|
292
|
+
- `attach [name]` - Switch to running task's tmux window (fuzzy select if no name)
|
|
293
|
+
- `kill [name]` - Kill running task's tmux window, move to failed
|
|
294
|
+
- `retry [name]` - Move failed/done task back to pending
|
|
295
|
+
- `clean` - Remove all done/failed task files
|
|
296
|
+
- `dir` - Print queue directory path
|
|
297
|
+
|
|
298
|
+
Config: `~/.config/hiiro/queue/{wip,pending,running,done,failed}/`
|
|
299
|
+
|
|
300
|
+
Key internals:
|
|
301
|
+
- `Queue::Prompt` - Parses frontmatter to resolve task/tree/session for working directory
|
|
302
|
+
- Tasks launch in tmux windows within the task's session (from frontmatter) or default `hq` session
|
|
303
|
+
- Launcher script runs `cat prompt | claude`, then moves files to done/failed based on exit code
|
|
304
|
+
|
|
305
|
+
### Hiiro::ServiceManager (lib/hiiro/service_manager.rb)
|
|
306
|
+
|
|
307
|
+
Manages background development services with tmux integration, env file management, and service groups.
|
|
308
|
+
|
|
309
|
+
Subcommands (`h service <subcmd>`):
|
|
310
|
+
- `ls`/`list` - List all services with running status, port, and base_dir
|
|
311
|
+
- `start <name> [--use VAR=variation ...]` - Start a service or group; prepares env file first
|
|
312
|
+
- `stop <name>` - Stop a running service (sends C-c to tmux pane or runs stop command)
|
|
313
|
+
- `attach <name>` - Switch to service's tmux pane
|
|
314
|
+
- `open <name>` - Open service URL in browser
|
|
315
|
+
- `url <name>` / `port <name>` - Print service URL or port
|
|
316
|
+
- `status <name>` - Show detailed service info (pid, pane, task, started_at)
|
|
317
|
+
- `add` - Add new service via editor template
|
|
318
|
+
- `rm`/`remove <name>` - Remove a service
|
|
319
|
+
- `config` - Edit services.yml
|
|
320
|
+
- `groups` - List all service groups and their members
|
|
321
|
+
- `env <name>` - Show env_vars, their variation options, and base_env/env_file config
|
|
322
|
+
|
|
323
|
+
Service config (`~/.config/hiiro/services.yml`):
|
|
324
|
+
```yaml
|
|
325
|
+
my-rails:
|
|
326
|
+
base_dir: apps/myapp
|
|
327
|
+
host: localhost
|
|
328
|
+
port: 3000
|
|
329
|
+
init: ["bundle install"]
|
|
330
|
+
start: bundle exec rails s -p 3000
|
|
331
|
+
stop: ""
|
|
332
|
+
cleanup: []
|
|
333
|
+
env_file: .env.development # destination in base_dir
|
|
334
|
+
base_env: my-rails.env # template in ~/.config/hiiro/env_templates/
|
|
335
|
+
env_vars:
|
|
336
|
+
GRAPHQL_URL:
|
|
337
|
+
variations:
|
|
338
|
+
local: http://localhost:4000/graphql
|
|
339
|
+
staging: https://graphql.staging.example.com/graphql
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Service group config (same file, distinguished by `services:` key):
|
|
343
|
+
```yaml
|
|
344
|
+
my-stack:
|
|
345
|
+
services:
|
|
346
|
+
- name: my-rails
|
|
347
|
+
use:
|
|
348
|
+
GRAPHQL_URL: staging
|
|
349
|
+
- name: my-graphql
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Key internals:
|
|
353
|
+
- `prepare_env(svc_name, variation_overrides:)` - Copies base_env template from `~/.config/hiiro/env_templates/` to `base_dir/env_file`, then injects variation values
|
|
354
|
+
- `find_group(name)` / `start_group(name, ...)` - Detect and start service groups, applying per-member `use:` overrides
|
|
355
|
+
- Default variation is `local` when not specified
|
|
356
|
+
- State tracked in `~/.config/hiiro/services/running.yml`
|
|
357
|
+
|
|
358
|
+
### Hiiro::RunnerTool (lib/hiiro/runner_tool.rb)
|
|
359
|
+
|
|
360
|
+
Run dev tools (linters, formatters, test suites) against changed files.
|
|
361
|
+
|
|
362
|
+
Subcommands (`h run [change_set] [tool_type] [file_group]`):
|
|
363
|
+
- Default (no subcmd) - Run matching tools with positional filters
|
|
364
|
+
- `ls` - List configured tools with type, group, extensions, and variations
|
|
365
|
+
- `add` - Add new tool via editor template
|
|
366
|
+
- `rm <name>` - Remove a tool
|
|
367
|
+
- `config` - Edit tools.yml
|
|
368
|
+
|
|
369
|
+
Arguments (positional, any order):
|
|
370
|
+
- **change_set**: `dirty` (default, git status), `branch` (diff from main), `all`
|
|
371
|
+
- **tool_type**: `lint`, `test`, `format`
|
|
372
|
+
- **file_type_group**: custom group identifier (e.g., `ruby`, `frontend`)
|
|
373
|
+
- `--variation`/`-v <name>` - Use a named tool variation
|
|
374
|
+
|
|
375
|
+
Config (`~/.config/hiiro/tools.yml`):
|
|
376
|
+
```yaml
|
|
377
|
+
rubocop:
|
|
378
|
+
tool_type: lint
|
|
379
|
+
command: "rubocop [FILENAMES]"
|
|
380
|
+
file_type_group: ruby
|
|
381
|
+
file_extensions: "rb"
|
|
382
|
+
variations:
|
|
383
|
+
quick: "rubocop --only Style [FILENAMES]"
|
|
384
|
+
fix: "rubocop -A [FILENAMES]"
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
`[FILENAMES]` is replaced with the space-joined list of matching files.
|
|
388
|
+
|
|
389
|
+
### Hiiro::AppFiles (lib/hiiro/app_files.rb)
|
|
390
|
+
|
|
391
|
+
Track frequently-used files per application, open them together in your editor.
|
|
392
|
+
|
|
393
|
+
Subcommands (`h file <subcmd>`):
|
|
394
|
+
- `ls [app_name]` - List tracked files (all apps or specific app)
|
|
395
|
+
- `add <app> <file1> [file2 ...]` - Add files to an app's file list
|
|
396
|
+
- `rm <app> <file1> [file2 ...]` - Remove files
|
|
397
|
+
- `edit <app>` - Open all tracked files in editor (vim uses `-O` for vertical splits)
|
|
398
|
+
|
|
399
|
+
Config: `~/.config/hiiro/app_files.yml`
|
|
400
|
+
|
|
401
|
+
Files are resolved relative to the current task's tree root when an environment is available.
|
|
402
|
+
|
|
403
|
+
### Jumplist (bin/h-jumplist)
|
|
404
|
+
|
|
405
|
+
Vim-style navigation history for tmux. Records pane/window/session changes and lets you jump backward/forward through your navigation history.
|
|
406
|
+
|
|
407
|
+
Subcommands (`h jumplist <subcmd>`):
|
|
408
|
+
- `setup` - Install tmux hooks and keybindings (`Ctrl-B` back, `Ctrl-F` forward)
|
|
409
|
+
- `record` - Record current position (called automatically by tmux hooks)
|
|
410
|
+
- `back` - Navigate to previous position
|
|
411
|
+
- `forward` - Navigate to next position
|
|
412
|
+
- `ls`/`list` - Show history with timestamps and current position marker
|
|
413
|
+
- `clear` - Clear history
|
|
414
|
+
- `path` - Print jumplist file path
|
|
415
|
+
|
|
416
|
+
Config: `~/.config/hiiro/jumplist/` (per-client entries and position files, max 50 entries)
|
|
417
|
+
|
|
418
|
+
Dead panes are automatically pruned. Duplicate consecutive entries are deduplicated. Forward history is truncated when navigating to a new location (like vim).
|
|
419
|
+
|
|
280
420
|
## Key Files
|
|
281
421
|
|
|
282
|
-
- `
|
|
283
|
-
- `bin/h-*` - External subcommands (tmux wrappers, git helpers,
|
|
422
|
+
- `exe/h` - Entry point that loads lib/hiiro.rb
|
|
423
|
+
- `bin/h-*` - External subcommands (tmux wrappers, git helpers, jumplist, etc.)
|
|
284
424
|
- `plugins/*.rb` - Reusable plugin modules (Pins, Project, Tasks, Notify)
|
|
285
425
|
- `lib/hiiro.rb` - Main Hiiro class and Runners
|
|
286
|
-
- `lib/hiiro/*.rb` - Supporting classes (Git, Matcher, Fuzzyfind, Todo, Shell, Options, Notification, Tmux)
|
|
426
|
+
- `lib/hiiro/*.rb` - Supporting classes (Git, Matcher, Fuzzyfind, Todo, Shell, Options, Notification, Tmux, Queue, ServiceManager, RunnerTool, AppFiles)
|
|
287
427
|
|
|
288
428
|
## External Dependencies
|
|
289
429
|
|
|
@@ -292,6 +432,7 @@ Hiiro::Notification.show(hiiro) # Show notification based on hiiro.args
|
|
|
292
432
|
- `sk` (skim) or `fzf` for fuzzy finding
|
|
293
433
|
- `gh` CLI for GitHub operations (h-pr)
|
|
294
434
|
- `terminal-notifier` for macOS notifications (notify plugin)
|
|
435
|
+
- `claude` CLI for queue task execution
|
|
295
436
|
|
|
296
437
|
## Configuration Locations
|
|
297
438
|
|
|
@@ -299,8 +440,15 @@ All config lives in `~/.config/hiiro/`:
|
|
|
299
440
|
- `plugins/` - Auto-loaded plugin files
|
|
300
441
|
- `pins/` - Per-command YAML key-value storage
|
|
301
442
|
- `tasks/` - Task metadata for worktree management
|
|
443
|
+
- `queue/` - Prompt queue (wip, pending, running, done, failed)
|
|
444
|
+
- `services/` - Service runtime state
|
|
445
|
+
- `jumplist/` - Per-client tmux navigation history
|
|
446
|
+
- `env_templates/` - Base .env template files for services
|
|
302
447
|
- `projects.yml` - Project directory aliases
|
|
303
448
|
- `apps.yml` - App directory mappings for task plugin
|
|
449
|
+
- `services.yml` - Service and service group definitions
|
|
450
|
+
- `tools.yml` - Runner tool definitions
|
|
451
|
+
- `app_files.yml` - Per-app tracked file lists
|
|
304
452
|
|
|
305
453
|
|
|
306
454
|
# Groups of files
|
data/README.md
CHANGED
|
@@ -83,6 +83,10 @@ h ping
|
|
|
83
83
|
| `h pr` | GitHub PR management via gh CLI |
|
|
84
84
|
| `h project` | Project navigation with tmux session management |
|
|
85
85
|
| `h queue` | Claude prompt queue with tmux-based task execution |
|
|
86
|
+
| `h jumplist` | Vim-style tmux navigation history (back/forward through panes) |
|
|
87
|
+
| `h service` | Manage background dev services with env variations and groups |
|
|
88
|
+
| `h file` | Track and open frequently-used files per app |
|
|
89
|
+
| `h run` | Run dev tools (lint/test/format) against changed files |
|
|
86
90
|
| `h session` | Tmux session management |
|
|
87
91
|
| `h sha` | Extract short SHA from git log |
|
|
88
92
|
| `h todo` | Todo list management with tags and task association |
|
|
@@ -214,9 +218,15 @@ All configuration lives in `~/.config/hiiro/`:
|
|
|
214
218
|
plugins/ # Plugin files (auto-loaded)
|
|
215
219
|
pins/ # Pin storage (per command)
|
|
216
220
|
queue/ # Prompt queue (wip, pending, running, done, failed)
|
|
221
|
+
services/ # Service runtime state
|
|
222
|
+
jumplist/ # Per-client tmux navigation history
|
|
223
|
+
env_templates/ # Base .env templates for services
|
|
217
224
|
tasks/ # Task metadata
|
|
218
225
|
projects.yml # Project aliases
|
|
219
226
|
apps.yml # App directory mappings
|
|
227
|
+
services.yml # Service and service group definitions
|
|
228
|
+
tools.yml # Runner tool definitions
|
|
229
|
+
app_files.yml # Per-app tracked file lists
|
|
220
230
|
todo.yml # Todo items
|
|
221
231
|
```
|
|
222
232
|
|
data/lib/hiiro/version.rb
CHANGED
data/lib/hiiro.rb
CHANGED