Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Added `cjules dash` (alias `dashboard`): production-grade interactive TUI for power users. Split view with scrollable/filterable session list (states, ages, repo) on the left and live activity tail for the selected session on the right. In-TUI actions: `a` to approve plans, `m` to compose/send messages, `/` filter, `f` active-only toggle, `r` refresh, `l` follow, Tab focus, vim-style nav, resize-aware, SIGINT-safe terminal restore (alternate screen + raw mode). Implements the core request from issue #6.
- Internal refactoring: extracted `Help.show_help` to remove duplicated `--help` footer logic across all subcommands. All command help output now routes through the helper.
- Internal: renamed `Commands::SourcesCmd` → `Commands::Sources` for naming consistency with other command modules.
- Continued error centralization: several commands now raise `Cjules::UsageError` for argument problems (central handler in `CLI.run` prints + exits with code 2). Reduces per-command boilerplate.
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ A scriptable CLI for [Jules](https://jules.google), written in Crystal.
- **Pipe-friendly** — `-f table|json|jsonl|yaml` on every list command.
- **Multi-account** — aliases via `cjules accounts use`, or one-shot with `--account`.
- **Pick** — `cjules pick` (uses `fzf` if available) with `--action show|watch|pr|delete`.
- **Dash** — `cjules dash` launches an interactive split-screen TUI: live session list (filterable, active-only), per-session activity tail, and in-place `a` approve / `m` message without leaving the dashboard.
- **Retry** — `cjules retry <id>` re-runs a session by cloning its prompt, repo, branch, and flags; `--with-failure-reason` carries the original failure message into the new prompt.
- **Templates** — drop reusable prompts into `~/.config/cjules/templates/` and reference them via `--template <name>` on `new` or `retry`. Templates support dynamic variables: `{{.File "path"}}`, `{{.GitDiff}}`, and `{{.Var "name"}}` for powerful prompt generation.

Expand Down Expand Up @@ -110,6 +111,27 @@ echo "Please add tests for the error path" | cjules msg <session-id> -
cjules approve <session-id>
```

### Dashboard (TUI)

```sh
# Full-screen live dashboard for many sessions at once
cjules dash

# Slower poll if you have lots of sessions
cjules dash --interval 5
```

Inside `dash`:
- `↑` `↓` / `j` `k` — navigate list
- `a` — approve plan (when AWAITING_PLAN_APPROVAL)
- `m` — compose and send a message (when awaiting feedback or anytime)
- `/` — incremental filter on title/prompt/id/repo
- `f` — toggle active-only view (hides COMPLETED/FAILED/CANCELLED)
- `r` — force refresh
- `l` — toggle log tail follow
- `Tab` — switch focus between list and logs pane
- `q` or `Ctrl-C` — quit (always restores terminal)

### Listing, filtering, piping

```sh
Expand Down
1 change: 1 addition & 0 deletions skills/cjules/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ If no account exists: `cjules login --alias <name>` (prompts for the key with hi
| `cjules watch <ID>` | Tail activities until session reaches a terminal state. `--interval N` to change polling. |
| `cjules msg <ID> <TEXT\|->` | Send a follow-up message into an active session. |
| `cjules approve <ID>` | Approve a plan. Aborts unless state is `AWAITING_PLAN_APPROVAL`; pass `--force` to skip the precheck. |
| `cjules dash` | Interactive TUI dashboard. Live list of sessions + split view of logs for the selected one. Approve (`a`) and message (`m`) without leaving the TUI. |
| `cjules logs <ID> [-f md\|json\|text]` | Export the full activity log. Markdown is the default and the most useful format for a human report. |
| `cjules patch <ID> [--list\|--apply\|--interactive\|--index N]` | Print, list, `git apply`, or interactively apply the session's gitPatch artifacts. |
| `cjules pr <ID> [--open]` | Print (or open) the pull-request URL produced by the session. |
Expand Down
3 changes: 3 additions & 0 deletions src/cjules/cli.cr
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ require "./commands/login"
require "./commands/logout"
require "./commands/accounts"
require "./commands/completion"
require "./commands/dash"

module Cjules
module CLI
Expand Down Expand Up @@ -103,6 +104,7 @@ module Cjules
when "logout" then Commands::Logout.run(argv)
when "accounts", "account" then Commands::Accounts.run(argv)
when "completion" then Commands::Completion.run(argv)
when "dash", "dashboard" then Commands::Dash.run(argv)
else
STDERR.puts "error: unknown command: #{cmd}"
STDERR.puts ""
Expand Down Expand Up @@ -150,6 +152,7 @@ module Cjules
pr <ID> Print PR URL (--open to launch browser)
pick Interactive picker (uses fzf if installed)
retry <ID> Re-run a session by cloning its prompt/repo/branch
dash Interactive TUI dashboard: list + live logs + approve/msg in-terminal

SOURCES:
sources ls
Expand Down
Loading
Loading