Skip to content

feat: read the log from the terminal with interactive tui and git dag - #198

Closed
prateekbhujel wants to merge 1 commit into
dev-null-sh:productionfrom
prateekbhujel:feat/cli-feed
Closed

prateekbhujel wants to merge 1 commit into
dev-null-sh:productionfrom
prateekbhujel:feat/cli-feed

Conversation

@prateekbhujel

@prateekbhujel prateekbhujel commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Hey @nunomaduro, @paulinevos and @mnapoli! 👋

Following your suggestion, the terminal client is now 100% powered by php-tui/php-tui! PHP FOREVERRR! 🔥🐘

It is pure PHP out of the box — zero required compilation or C extensions, running seamlessly on macOS, Linux, and Windows. For power users with ext-terminal (linked to the PHP Core RFC: io_terminal), it seamlessly bridges as an optional zero-latency raw POSIX I/O driver.


🖥️ Interactive TUI Capabilities (php artisan log)

1. Live Timeline & ASCII Git DAG Rails

  • Browse the latest commits interactively with ↑ / k and ↓ / j (or jump with g / G).
  • Switch feeds seamlessly with 1 (Everyone) and 2 (Following).
  • Dynamic layout: Left pane displays the timeline with TrueColor developer lane tags; Right pane shows detailed commit inspection, relative time, star counts, and reply indicators.
  • Non-interactive / pipe fallback: automatically renders a clean ASCII Git DAG rail when piped or run with --no-tui.
/dev/null.sh                                                         @prateekbhujel
[1] Everyone  [2] Following  [3] Thread  [4] New Post  [5] Profile & Ranks  [?] Help
╭─ Everyone Feed ────────────────────────╮╭─ Commit Details ─────────────────────────╮
│ * [8f1a2c3] @nunomaduro · 2m ago       ││ @nunomaduro (Nuno Maduro) [8f1a2c3]      │
│ | YOOOO CHAT W PR BROOOO THAT'S FIREEEE││ Posted Fri, Oct 16, 2026 1:15 PM         │
│ * [7b3d1e9] @mnapoli · 14m ago         ││                                          │
│ | Clean refactor on terminal pipelines ││ YOOOO CHAT W PR BROOOO THAT'S FIREEEE    │
│ * [01a144d] @prateekbhujel · 1h ago    ││                                          │
│   Powering dev-null terminal w/ php-tui││ ★ 42 stars · ⤿ 8 replies                 │
│                                        ││ [Enter] Thread  [r] Reply  [s] Star      │
╰────────────────────────────────────────╯╰──────────────────────────────────────────╯
 ↑/↓ Nav · Enter Thread · p Post · r Reply · s Star · 1-5 Tabs · q Quit

2. Interactive Thread Inspector (3 / Enter)

  • Press Enter on any commit to view full thread context.
  • Traverses ancestor nodes and renders all nested replies in an interactive tree.

3. Live Commit Composer (4 / p / r)

  • Press p to compose a new root commit or r to reply to the selected commit.
  • Real-time 280-character counter that turns yellow/red as you approach limits.
  • Submits directly on Enter with instant live feed refresh.
╭─ Compose New Commit ───────────────────────────────────────────────────────────────╮
│ What are you shipping?                                                             │
│ Shipping php-tui integration to dev-null.sh! Pure PHP terminal experience!_       │
│                                                                                    │
│                                                            [ 74 / 280 characters ] │
│ [Enter] Commit to log  ·  [Esc] Cancel                                             │
╰────────────────────────────────────────────────────────────────────────────────────╯

4. Developer Profiles & Unix Ranks (5 / u)

  • Inspect any developer's public profile card with u (or php artisan log @username).
  • Displays public stats: Bio, UID, Commits, Stars Given / Received, and Active Streak.
  • Features Unix Ranks:
    • nobody (UID 65534, Level 1)
    • daemon (UID 1, Level 2)
    • operator (UID 11, Level 3)
    • wheel (UID 10, Level 4)
    • staff (UID 20, Level 5)
    • root (UID 0, Level 6)
  • Visual XP progress bar to the next rank and unlocked achievement badges.
╭─ Developer Profile & Unix Ranks ───────────────────────────────────────────────────╮
│ @prateekbhujel (Pratik Bhujel)                                                     │
│ Bio: Building terminal tools and contributing to open-source PHP.                  │
│                                                                                    │
│ Rank: daemon (Level 2) · UID 1                                                     │
│ XP Progress: [====================--------------------] 450 / 1000 XP              │
│ Streak: 🔥 12 days active                                                          │
│ Stats: 128 Commits · 342 Stars Received · 89 Stars Given                           │
│ Badges: [First Commit] [Night Owl] [Streak Master] [TUI Pioneer]                   │
╰────────────────────────────────────────────────────────────────────────────────────╯

5. Non-Interactive CLI Posting

  • Directly commit or reply without entering TUI mode:
    php artisan log --post="Shipping pure PHP TUI" --as=@username
    php artisan log --post="Replying via CLI" --as=@username --reply=8f1a2c3

🛡️ Quality & Verification

  • 100.0% Code Coverage: Verified strictly with pest --coverage --exactly=100.0 (all terminal components, commands, models, and queries 100% covered).
  • 100.0% Type Coverage: Verified with pest --type-coverage --min=100.
  • 0 PHPStan Errors: Max level analysis passing cleanly.
  • Pint & Code Style: 100% conformant with project style rules.
  • Zero Required Extensions: Pure PHP php-tui/php-tui out of the box; ext-terminal suggested optionally.

@nunomaduro

Copy link
Copy Markdown
Member

YOOOO CHAT
W PR BROOOO THAT'S FIREEEE 🔥🔥🔥🔥

CAN YOU USE php-tui????? PHP FOREVERRR!!!

@xHeaven

xHeaven commented Oct 18, 2026

Copy link
Copy Markdown
Member

@nunomaduro This PR touches new services and new third-party dependencies. Could you take a look?

Provide a pure-PHP terminal interface for browsing everyone's and
following feeds, inspecting threads, composing posts and replies,
and viewing developer profiles with Unix ranks. Fall back to
non-interactive ASCII rendering for pipelines and headless terminals.

Use php-tui with optional ext-terminal acceleration, typed service
boundaries, accessibility-minded keyboard navigation and tests.

Rebase onto current production and consolidate feature history into
one reviewable commit without dropping upstream changes.
@nunomaduro

nunomaduro commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

I don't think an "cli" should be mixed together with the "web" app, just like we don't see the native php app here. However, you can do your own open-source repo with this!

@nunomaduro nunomaduro closed this Oct 20, 2026
@prateekbhujel
prateekbhujel deleted the feat/cli-feed branch October 20, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants