Claude Code, as a Ref.
Declare a PromptRef on a Service, bind it with options once, then prompt Claude Code from inside your Nu tree.
See it.
Ask Claude Code anything, right from your Nu program. Wrap a few asks in a Session and it remembers what you said before.
Prompts from inside your Nu tree.
PromptRef.method() declares the endpoint; nu.cc.bind(Agent, ...) hands it a ClaudeAgentOptions template — model, cwd, tools, system prompt, permissions.
nu.cc.Session(...) is a bracket. The first prompt starts a fresh cc session, the rest continue it via resume=session_id. Sibling brackets stay independent.
What you can do with it.
Everything cc can do — tools, agent loops, edits, custom system prompts — reachable from a plain Ref call.
options template
Bind once, prompt many times.
Model, cwd, allowed_tools, system_prompt, permission_mode, max_turns — set on bind, override per call when you need to.
sessions
Scope multi-turn work with a bracket.
nu.cc.Session wraps a subtree. Prompts inside share one cc session so context carries. Two sibling brackets = two clean contexts.
text + meta
Every call returns cost, turns, session id.
Prompt yields a dict: text, session_id, total_cost_usd, duration_ms, num_turns. Log it, cache it, put it in a UI — like any Ref result.
Combines well with.
nu.cc drives cc. Other fabrics hold the surrounding context and put the answers to work.
Try Nu.
One command gets you the wheel with every fabric. Then follow the movies tutorial to build a real app in an afternoon.
01 Install
pip install "nustack-py[all]"02 Run the demo
nu demo movies03 Build your app
Browse examplesLike what you see?
The project is young. Star it, join the room, watch what we ship next.