Xun ships four console scripts (declared under [project.scripts] in pyproject.toml), one for each session shape. They differ only in where the agent runs and how it interacts with you; the core execution logic is exactly the same.
work with the agent in the current directory, editing code and writing docs
xuns
Web service
current Python process
browser chat UI + file panel
you need browser tools, file upload/download, switching between sessions
xunc
Container session
xuns inside a Docker container
browser (port mapped to the host)
you want an isolated environment, or the host has no Python environment
xunx
Multi-user shared service
host orchestrator + one container per user
browser (routed by username prefix)
one server gives each person their own persistent environment
Both xunc and xunx run xuns inside a container, so the four entrypoints really come down to two ways of running the agent (terminal, web) plus two deployment wrappers (single container, multi-user gateway).
setup_agent(default_tools=True, default_commands=True) → agent.command.register(*cli_commands()) (adding /long, /render, /exit) → interactive_session(agent, instruction) on a TTY, or non_interactive_session when --non-interactive is given