RolitRolit Docs
Rolit CLI

Workspace tools

Files, commands, web, media, deploy, and memory tools the agent uses in your workspace.

Files and commands (local.*)

The agent works inside one workspace folder. Paths are workspace-relative. Absolute paths, .. traversal, and symlinks that point outside are rejected, and credential files are protected.

Commands run with your own operating-system permissions. There is no OS-level filesystem or network isolation, so approval modes are your control.

ToolWhat it does
local.readReads one file per call. Supports offset and limit (1-based line numbers), query to search within a file, mode (outline or diff), and byteOffset for paging.
local.writeWrites a file. mode is checked (default), overwrite, append, or create. dryRun previews without writing.
local.editEdits one file, by exact old and new text (with replaceAll for every occurrence) or by a unified-diff patch.
local.run_commandRuns a command, or a program with args. Takes cwd, timeoutSeconds, and environment. Returns exit_code, stdout, stderr, and timed_out.
local.searchRegex search across the workspace. Supports glob, definitions (declaration sites only), pathsOnly, countOnly, and offset for paging. Deferred.
local.delete_directoryDeletes a directory. Deferred.
local.ask_userAsks you a question with 2 to 6 options. Never needs approval.
local.todoKeeps the session checklist. Only changes session memory, never a file.
local.contextReports how much context is used (status), compacts it (compact), or recalls an earlier tool result (recall).

How reads work

  • Every read returns each line prefixed with its number (12→). The prefix isn't part of the file.
  • A read returns at most 1,000 lines and 50 KiB at a time. When the file is longer, the result says so and includes the offset to continue from.
  • PNG, JPEG, GIF, and WebP files (up to 20 MiB) are returned as viewable images, so the agent can check a screenshot or a render.
  • Binary files, pipes, and sockets are refused.

How edits work

  • The agent must read a file in this session before editing it.
  • old is matched exactly first, then with line-number prefixes removed, then with whitespace differences ignored. If more than one place matches, the edit fails as ambiguous_match rather than guessing.
  • A patch is validated in full before the file is replaced atomically.
  • Writes check the file's version, so a file changed outside the session isn't silently overwritten.

Deleting, moving, and listing files go through local.run_command (for example rg --files, mv, rm), which asks according to your approval mode. Destructive commands are classified as high risk and denied.

Web (web.*)

ToolWhat it does
web.searchSearches the web. Takes query and maxResults (default 5, up to 10). Returns ranked titles, URLs, and snippets.
web.fetchFetches a public page. Takes url, maxBytes (cap 512 KiB), maxTokens (default and cap 10,000), and raw.

web.fetch strips scripts, navigation, and other page chrome and returns readable text by default; raw: true returns the unfiltered body. It follows at most five redirects and rejects URLs with credentials, localhost, and private network addresses. Both tools only read, so they follow the Read tier.

Media (media.*)

Media tools need an active project. Provider and model come from your project settings.

ToolWhat it does
media.extract_textDescribes an image or video, or transcribes audio, from a file in the workspace (up to 50 MiB). On by default.
media.generate_imageGenerates 1 to 10 images from prompts. Supports style, aspect_ratio, and task_type (text_image, edit, try_on).
media.generate_audioText to speech, with gender and language.
media.generate_musicGenerates music from queries, with optional lyrics and a duration_seconds of 30 to 500.
media.generate_soundGenerates a sound effect of 1 to 30 seconds.
media.generate_videoGenerates a video of 1 to 60 seconds, optionally from an image or audio.

Turn categories on or off with /media <category> on|off. The extract category is on by default and the generation categories are off. Generation uses the Generate tier and consumes credits. If a generation doesn't finish in time, the result is still_running and the job stays attached to the project.

media.extract_text streams the file to the project and doesn't create a stored copy or send its path.

Publish (deploy)

deploy makes a file or site reachable at a public URL. Turn it on with /deploy on.

ArgumentMeaning
modefile (one file), export (one rendered page), or site (a static directory with index.html at its root)
pathWorkspace-relative path
nameName for the artifact

It returns artifact_id, status, and a public url. Sites are limited to 500 files and 200 MiB in total, and 50 MiB per file. Client-side fallback routing isn't supported.

deploy is a Publish action. It asks in every mode except plan-only, which denies it, and the Auto switch never skips the prompt. In a script it becomes a pending action and the run exits with 21. The agent is also told to confirm with you unless you asked for the deployment in the same turn.

Memory (local.memory)

Durable notes that outlive a session. Actions: recall, save, update, forget, and list. Each memory has a title, content up to 2 KiB, a kind (preference, fact, decision, or procedure), and a scope (user, workspace, project, or brand; default workspace).

  • The agent can save at most 5 memories per turn and 20 per session. It can't pin memories.
  • Content is redacted before it's stored.
  • A memory saved after unverified web, browser, MCP, or subagent output is labeled and held out of automatic injection until you run /memory confirm <id>.
  • At session start, up to 1 KiB of pinned and most-used memories is added to the context.
  • In --json runs, jobs, and subagents, memory is read-only.

Manage memories with /memory or rolit memory.

Feedback

A deferred feedback tool lets the agent report a CLI bug, idea, or missing capability to Rolit under your account. It uses the Write tier.

On this page