Skip to Content
Referenceoo CLI

oo code

Work with OpenOrange Code sessions.

Start OpenOrange Code sessions, send them messages and wait for their runs.

A session is a coding workspace with its own transcript, the same one web chat shows in Code mode. It runs on a machine, a VM of the Sunport your team shares, with what is installed there. Every message starts a run: start and send return its IDs at once, and --wait follows it until it completes, fails or is aborted. A wait that times out (exit 124) never cancels the run; resume it with oo code wait SESSION_ID.

The other commands do what the chat and Code settings do: rename a session, change its model, share it, move its files and manage its queued prompts, and import and choose the environments sessions start in.

oo code environments

List the environments a session can start in

oo code environments

It also takes the connection options.

oo code machines

List the machines a session can start on: the Sunport's VMs that people made machines, which you work on. Each one's code.status says whether a session starts there: ready, getting_ready (a start sets it up), setup_failed (code.message says why; a start tries again) or unavailable (code.error and code.message say why). oo machines members shows who else works on one.

oo code machines

It also takes the connection options.

oo code folders

List the folders in a folder of a machine you work on, where a session there may work, as its account sees them (as root with --root): the account's home without PATH.

oo code folders [options] machine [path]
ArgumentRequiredDefaultChoicesDescription
machineyesthe machine's name or ID, from oo code machines
pathnoa folder on it, by its full path or from the account's home (default the home)
--rootnoas root sees them, for whoever may run a session as root

It also takes the connection options.

oo code list

List Code sessions

oo code list [options]
ArgumentRequiredDefaultChoicesDescription
--filter FILTERnomine, shared, archived
--q Qno
--limit LIMITno
--offset OFFSETno

It also takes the connection options.

oo code start

Create a session on --machine, by its name or ID, or on the one machine you work on, and send its first message from --message or stdin. The session works there as the machine's account, which everyone on it shares (oo code machines shows its account and home), with what is installed on it; --root runs it as root instead, for an administrator or the owner of the VM's agents. It works in --folder: any folder on the machine by its full path (/srv/app), or one from the account's home (api); the home without it. It works in that folder itself, with no copy or branch of its own; --create-folder makes the folder first when it isn't there. --environment chooses its packages, instructions and model, and its setup commands don't run on a machine. Prints the session, message and run IDs; --wait follows that run to its end.

oo code start [options]
ArgumentRequiredDefaultChoicesDescription
--attachment ATTACHMENTnoattachment ID from oo files upload --for code
--message MESSAGEnoMessage text; otherwise read UTF-8 text from stdin
--waitnoWait for this message's returned run_id
--title TITLEno
--machine MACHINEnothe machine's name or ID, from oo code machines; omit when you work on one
--folder FOLDERnothe machine's folder it works in, from oo code folders: a full path, or from the account's home (default the home)
--rootnowork as root instead of the machine's account
--create-foldernomake --folder first when it isn't there
--environment ENVIRONMENTnoCode config UUID; omit for the server default
--timeout TIMEOUTno300.0Wait deadline in seconds (default: 300); timeout never cancels the run
--interval INTERVALno1.0Polling interval in seconds (default: 1)

It also takes the connection options.

oo code send

Send a message from --message or stdin, with --attachment IDs from oo files upload --for code. Prints the message and run IDs; --wait follows that run to its end. The session's owner sends, and so do the people it is shared with as contributors: a contributor's run acts within both their permissions and the owner's, with the contributor's own GitHub identity (model_alias_not_allowed when they may not use the session's model). A viewer only reads.

oo code send [options] session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
--attachment ATTACHMENTnoattachment ID from oo files upload --for code
--message MESSAGEnoMessage text; otherwise read UTF-8 text from stdin
--waitnoWait for this message's returned run_id
--timeout TIMEOUTno300.0Wait deadline in seconds (default: 300); timeout never cancels the run
--interval INTERVALno1.0Polling interval in seconds (default: 1)

It also takes the connection options.

oo code get

Show a session with its messages and events; --history-cursor reads further back in a long history. Each prompt names who wrote it (author_employee_id, author_name); can_send says whether you may send to it.

oo code get [options] session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
--history-cursor HISTORY_CURSORnoContinue the previous response's history_page.next_cursor
--history-limit HISTORY_LIMITno

It also takes the connection options.

oo code wait

Follow a run until it completes, fails or is aborted: the latest run by default, --run-id for an exact run, or --message-id for the run an accepted message started. Exit 0 complete, 1 failed or aborted, 124 timed out while the run continues.

oo code wait [options] session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
--run-id RUN_IDnoExact run to await; defaults to latest observed run
--message-id MESSAGE_IDnoFollow an accepted message, including web steering into another run
--timeout TIMEOUTno300.0Wait deadline in seconds (default: 300); timeout never cancels the run
--interval INTERVALno1.0Polling interval in seconds (default: 1)

It also takes the connection options.

oo code cancel

Stop the session's current run, which cannot undo what it already did. Its owner stops any run, a contributor only one they started.

oo code cancel session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list

It also takes the connection options.

oo code fork

Start your own private copy of a session, with its files and transcript, from --message-id when given. The copy does not carry the source person's GitHub authorization.

oo code fork [options] session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
--title TITLEno
--message-id MESSAGE_IDno

It also takes the connection options.

oo code archive

Archive a session

oo code archive [options] session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat

It also takes the connection options.

oo code delete

Delete a session for good, as Delete in its menu in the chat's sidebar does: the Sunport archives it, removes its sandbox's files and checkpoints, and then its messages. Only the session's owner deletes it, with code.manage as for deleting a project, and it cannot be undone; oo code archive keeps it instead.

oo code delete [options] session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat

It also takes the connection options.

oo code rename

Change a session's title

oo code rename session_id title
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
titleyesthe new title, at most 200 characters

It also takes the connection options.

oo code model

Change the model a session runs on, its thinking level, or both, as the selectors above the chat do: off, minimal, low, medium, high, xhigh or max, as the model offers them, or auto for the model's own. oo code settings lists the models you may choose. Not while a run is active or prompts wait.

oo code model [options] session_id [model]
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
modelnothe model, as oo code settings lists it
--thinking LEVELnothe thinking level, or auto

It also takes the connection options.

oo code share

Without PERSON_ID, list who has the session and whom you may add (candidates). With it, give that person the session, as Share in the chat does: viewer sees it, contributor also writes to it and forks it; --remove takes it away. Changing who has it is for the session's owner or an administrator, with code.manage.

oo code share [options] session_id [PERSON_ID]
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
PERSON_IDnothe person's ID: employeeId in oo people list, or a candidate's id
--role ROLEnoviewerviewer, contributorviewer (the default) or contributor
--removenotake the session away from them
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat

It also takes the connection options.

oo code warm

Start a session's sandbox ahead of its first message, as opening the session in the chat does, so its commands can be listed and the first run need not wait for it. The Sunport skips it (status skipped) while a run is active, the session is archived or used from a terminal, or it warmed lately. Only the session's owner warms it.

oo code warm session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list

It also takes the connection options.

oo code commands

List the slash commands the session's sandbox runs, as the composer's command palette does. sandbox_running false means no sandbox is running, so none are listed: oo code warm starts one.

oo code commands session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list

It also takes the connection options.

oo code processes

List what a session's commands run on its machine now, as its Processes panel does: what they leave running, such as a dev server, goes on after their run and after the session stops, until someone stops it. Each has its pid, command, folder (cwd), start time and the TCP ports it, or what it started, listens on. --stop PID stops one and what it started; only the session's owner does. A session on the Sunport host has none (code_machine_required).

oo code processes [options] session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
--stop PIDnostop this process, from the list, and what it started
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat

It also takes the connection options.

oo code web

Continue in web chat a session with retained terminal (TUI) history, as Continue in Web does: the terminal's messages join its transcript. Not while a run is active or prompts wait; only the session's owner does it.

oo code web session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list

It also takes the connection options.

oo code settings

Print your Code settings as JSON: the environment your new sessions start in (settings.config_id) and the models you may choose (allowed_model_aliases, with each one's thinking levels in allowed_model_profiles). --environment chooses the environment new sessions start in, as Environment for new chats does.

oo code settings [options]
ArgumentRequiredDefaultChoicesDescription
--environment CONFIG_IDnoan environment's ID, from oo code environments

It also takes the connection options.

oo code workspace

List, read, upload, download and delete the files in a session's workspace, as its Files panel does. Paths are relative to the workspace's root. A transfer is one file of up to 8 MiB, sent and saved as it is. Only the session's owner uploads or deletes, and not while it runs or prompts wait; an existing file is replaced only with --overwrite. A download goes into a new protected file here. Delete removes a file, or a folder with everything in it, and a symlink itself, never what it points to: it is how to free a session whose disk is full (session_disk_full), since no message can start a run there.

oo code workspace [COMMAND]

It also takes the connection options.

oo code workspace ls

List a folder, the root by default

oo code workspace ls session_id [path]
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
pathnothe folder

It also takes the connection options.

oo code workspace show

Show a file's text, or an image, as JSON

oo code workspace show session_id path
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
pathyesthe file

It also takes the connection options.

oo code workspace upload

Upload a file into the workspace

oo code workspace upload [options] session_id FILE [path]
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
FILEyesthe local file, or - for standard input
pathnowhere it goes: a file, or a folder ending in /; its own name at the root by default
--overwritenoreplace a file that is there

It also takes the connection options.

oo code workspace download

Download a file from the workspace

oo code workspace download [options] session_id path [FILE]
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
pathyesthe file
FILEnowhere to save it: a file, or a folder; its own name here by default
--overwritenoreplace a file that is there

It also takes the connection options.

oo code workspace delete

Delete a file or folder from the workspace

oo code workspace delete [options] session_id path
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
pathyesthe file or folder
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat

It also takes the connection options.

oo code queue

Prompts sent while a run is active wait in the session's queue, as the chat shows them: resume starts the queue again after it stopped, steer sends a waiting prompt into the active run now, and remove takes it out. MESSAGE_ID is the message_id oo code send printed, or a queued message's id in oo code get. The session's owner and its contributors do these: a contributor steers and removes only their own prompts and resumes only at one of their own, and a prompt joins only a run its own author started (run_queued_by_another_person).

oo code queue [COMMAND]

It also takes the connection options.

oo code queue resume

Start the queue again

oo code queue resume session_id
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list

It also takes the connection options.

oo code queue steer

Send a waiting prompt into the active run now

oo code queue steer session_id MESSAGE_ID
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
MESSAGE_IDyesthe waiting prompt's message ID

It also takes the connection options.

oo code queue remove

Take a waiting prompt out of the queue

oo code queue remove session_id MESSAGE_ID
ArgumentRequiredDefaultChoicesDescription
session_idyessession ID from oo code list
MESSAGE_IDyesthe waiting prompt's message ID

It also takes the connection options.

oo code configs

Import an environment from a package's GitHub address, change one you own, update its package or archive it, as Code settings does. oo code environments lists them with their IDs; a session keeps the environment it started with. It takes code.manage.

oo code configs [COMMAND]

It also takes the connection options.

oo code configs import

Import an environment from a package's GitHub address

oo code configs import [options] source
ArgumentRequiredDefaultChoicesDescription
sourceyesthe package's GitHub address, such as https://github.com/owner/repository
--name NAMEyesits name
--description DESCRIPTIONnowhat it is for
--visibility VISIBILITYnoprivate, sunportprivate (yours, the default) or sunport (everyone here may start in it)
--model MODELnothe model its sessions start on, as oo code settings lists it
--thinking LEVELnoits sessions' thinking level, or auto
--setup COMMANDnoa command run when a session starts; repeat for more, in order; replaces the list

It also takes the connection options.

oo code configs edit

Change an environment you own

oo code configs edit [options] CONFIG_ID
ArgumentRequiredDefaultChoicesDescription
CONFIG_IDyesthe environment's ID, from oo code environments
--name NAMEnoits name
--description DESCRIPTIONnowhat it is for
--visibility VISIBILITYnoprivate, sunportprivate (yours, the default) or sunport (everyone here may start in it)
--model MODELnothe model its sessions start on, as oo code settings lists it
--thinking LEVELnoits sessions' thinking level, or auto
--setup COMMANDnoa command run when a session starts; repeat for more, in order; replaces the list
--no-setupnorun no setup commands

It also takes the connection options.

oo code configs archive

Archive an environment; new sessions no longer start in it

oo code configs archive [options] CONFIG_ID
ArgumentRequiredDefaultChoicesDescription
CONFIG_IDyesthe environment's ID, from oo code environments
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat

It also takes the connection options.

oo code configs update

Update an environment's package to its newest version

oo code configs update CONFIG_ID
ArgumentRequiredDefaultChoicesDescription
CONFIG_IDyesthe environment's ID, from oo code environments

It also takes the connection options.

On this page