1xOps Command Center
v0.4.2Persistent terminal sessions, processes and text-file tools under one folder and command policy
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
start_process Start process
Runs a command in the configured shell as a persistent session and returns its first output. The session keeps running after the call returns; use its pid with interact_with_process, read_process_output and force_terminate.
| Parameter | Type | Description |
|---|---|---|
command * | string | Command line, for example "npm test" or "python3 -i" |
cwd | string | Working directory; defaults to the server process directory |
timeout_ms | integer | Milliseconds to wait for output before returning |
interact_with_process Send input to a process
Writes a line of input to a running session (a shell, REPL or prompt) and returns the output that follows, including anything not yet read.
| Parameter | Type | Description |
|---|---|---|
input * | string | |
pid * | integer | |
timeout_ms | integer | Milliseconds to wait for output before returning |
read_process_output Read process output
Returns output produced since the last read, waiting up to timeout_ms for new output when there is none.
| Parameter | Type | Description |
|---|---|---|
pid * | integer | |
timeout_ms | integer | Milliseconds to wait for output before returning |
force_terminate Stop process
Stops a session and its child processes (SIGTERM, then SIGKILL after 2 s) and returns its last output.
| Parameter | Type | Description |
|---|---|---|
pid * | integer |
list_sessions List sessions
Lists the sessions this server started, running or finished, with unread output counts.
read_file Read file
Reads a text file by lines (offset is 0-based; a negative offset reads from the end, e.g. -100 for the last 100 lines) or returns an image (png, jpg, gif, webp). Other binary files are refused.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
length | integer | Lines to return; capped at fileReadLineLimit |
offset | integer |
read_multiple_files Read several files
Reads up to 20 text files from the start (up to fileReadLineLimit lines each). A file that cannot be read is reported without failing the others.
| Parameter | Type | Description |
|---|---|---|
paths * | array |
write_file Write file
Writes text to a file (mode "rewrite" replaces it, "append" adds to the end), creating parent folders. Content over fileWriteLineLimit lines is refused: write it in chunks with "append".
| Parameter | Type | Description |
|---|---|---|
content * | string | |
path * | string | |
mode | string |
edit_block Edit text in a file
Replaces old_string with new_string when it occurs exactly expected_replacements times. Otherwise nothing changes and the reply shows the count, or the closest passage when there is no exact match.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
new_string * | string | |
old_string * | string | |
expected_replacements | integer |
list_directory List directory
Lists a folder recursively to the given depth, marking [DIR], [FILE] and [LINK]; stops at 1000 entries.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
depth | integer |
get_file_info File information
Returns type, size, times, permissions and, for text files, the line count.
| Parameter | Type | Description |
|---|---|---|
path * | string |
create_directory Create directory
Creates a folder and any missing parents; an existing folder is left as it is.
| Parameter | Type | Description |
|---|---|---|
path * | string |
move_file Move or rename
Moves or renames a file or folder. Refuses when the destination already exists.
| Parameter | Type | Description |
|---|---|---|
destination * | string | |
source * | string |
search Search files
Searches file contents (kind "content", one "file:line:text" per match; pattern is a regular expression unless literal is true) or file names (kind "files"; pattern is plain text in the name) under a folder. Uses ripgrep when it is installed (respects .gitignore), otherwise a built-in search that skips .git, node_modules and build folders.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
pattern * | string | Regular expression, or plain text when literal is true |
glob | string | Only files whose name matches, e.g. "*.ts" |
ignore_case | boolean | |
kind | string | |
literal | boolean | |
max_results | integer | |
timeout_ms | integer |
start_search Start a paged search
Starts a large search in the background (same options as search, up to 10000 results) and returns an id with the first page as soon as it is full. Results can be read while the search runs. Read further pages with get_more_search_results; end it early with stop_search. Use search instead for small result sets.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
pattern * | string | Regular expression, or plain text when literal is true |
glob | string | Only files whose name matches, e.g. "*.ts" |
ignore_case | boolean | |
kind | string | |
literal | boolean | |
max_results | integer | |
page_size | integer | |
timeout_ms | integer | |
wait_ms | integer | How long to wait for results before returning |
get_more_search_results Next page of a search
Returns results offset..offset+length of a search started with start_search, waiting up to wait_ms for them while it is still running.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
length | integer | |
offset | integer | |
wait_ms | integer |
stop_search Stop a search
Stops a search started with start_search if it is still running; the results found so far stay readable with get_more_search_results. Calling it again on the same id frees the results.
| Parameter | Type | Description |
|---|---|---|
id * | string |
list_processes List system processes
Lists the operating system's processes (pid, parent pid, name, memory), largest memory first. Read-only; stop a session this server started with force_terminate.
| Parameter | Type | Description |
|---|---|---|
filter | string | Only processes whose name contains this text (case-insensitive) |
limit | integer |
get_config Show settings
Shows the active settings and the file they come from.
set_config_value Change a setting
Changes fileReadLineLimit or fileWriteLineLimit. allowedDirectories, blockedCommands and defaultShell are refused: only a person can change them, in the config file.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
value * | New value, e.g. 2000 for a line limit |