Expand description
A tinker-style interactive shell for sutegi apps — Laravel’s artisan tinker, reimagined for an agent-native framework.
This is not a Rust evaluator (that would need a compiler toolchain and third-party machinery). It is a command shell over the surfaces a sutegi app already exposes:
- the agent contract —
/__introspect,/__tools, tool invocation (streaming tools print their SSE frames live), and raw HTTP requests through the app’s own routes; - the data layer — raw SQL, a
where-clause query DSL, KV, the event store, and the job queue, when a [Backend] is attached.
Two transports, one command set:
use sutegi_repl::Repl;
use sutegi_web::App;
// In-process: consume the built App; data commands work via `.db(...)`.
let app = App::new("demo").get("/", "Health.", |_| "ok");
Repl::new(app).run().unwrap();Remote mode is the agent contract exercised by a human: it drives a
running app over plain HTTP with no source access — exactly the way an
LLM does — so sutegi repl <addr> works against any sutegi app:
sutegi_repl::Repl::connect("127.0.0.1:8080").run().unwrap();Line editing is deliberately plain stdin (zero deps, works everywhere);
wrap with rlwrap if you want history and arrow keys.
Structs§
- Repl
- The REPL: a [
Surface] to send requests through, plus an optional data backend for thesql/q/kv/… commands.