Skip to content

univeros/tinker — interactive REPL exploration #85

@tonydspaniard

Description

@tonydspaniard

Out-of-scope follow-up from #71's "What about REPL exploration?" question.

#71 covers the static introspection case ("what's wired into this project?"). REPL exploration is the dynamic case ("let me poke at the live Container"). It's a separate, larger package that doesn't share much code with #71.

Scope (high-level)

  • New sub-package `univeros/tinker` (`Altair\Tinker`)
  • `bin/altair tinker` command — drops into an interactive PHP shell with the booted Container in scope
  • `>>> $container->make(UserRepository::class)` and similar
  • History + tab-completion via PsySH (battle-tested, ~PsySH-vendor-equivalent footprint)
  • Doctor-style preamble: print container/route/listener summary at startup so the user knows what's available

Why a separate package

  • Pulls in PsySH (or equivalent) as a runtime dep — only host apps that want REPL pay for it
  • Has its own configuration surface (history file location, blacklisted classes, custom commands)
  • Different audience: developers debugging locally, not agents in production

Why deferred (out of scope for #71)

#71's CLI commands cover the 80% case for both agents and humans. REPL is a separate UX with its own implementation cost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions