# Piped

> A hosted Unix shell of pipelines over your own files. Every write is a
> revision you can `restore`. Commands are Unix's: run `man` for the
> list and `man NAME` for one. The agentic commands are `agent`, `ai`
> and `jev`. Use the `edit` command to edit files in the Piped shell.

## Connect

- [MCP](https://piped.sh/mcp): one tool, `run`. In Piped, run
  `cap folder FOLDER --claude` and paste the line it prints.
- [The run tool](https://piped.sh/pues/manifest.json): `POST /api/run`
  with a grant as the Bearer; `{ script, stdin? }` → `{ stdout, stderr,
  exit }`, and `truncated: true` when stdout passed 64 KiB.
- [The CLI](https://piped.sh/install.sh): `curl -fsSL
  https://piped.sh/install.sh | sh`, then `piped login`.
- A webhook: `POST /hook/<token>` runs a script for a site that posts to
  it, the body as its stdin and the headers as `HTTP_*` variables. In
  Piped, `cap run SCRIPT` makes the URL.

## Commands

- `:`: Do nothing, successfully, whatever the arguments
- `[`: Answer a question with an exit code
- `age`: Encrypt to a public key, or decrypt with an identity
- `age-keygen`: Make an age identity, or print an identity's recipient
- `agent`: Pursue an objective by running piped scripts
- `ai`: Send a prompt to a chat model
- `awk`: Process fields and patterns with gawk
- `base64`: Encode or decode base64
- `basename`: The last part of a path, SUFFIX removed
- `bash`: Run a script in Piped's shell, as bash would
- `cap`: Let someone else run a script or use a folder
- `cat`: Print files, or stdin, byte for byte
- `chmod`: Accept a file mode, and change nothing
- `clear`: Clear the terminal screen
- `cmp`: Compare two files byte by byte
- `column`: Text as a table
- `comm`: Compare two sorted files line by line
- `command`: Show where a command name resolves
- `cp`: Copy files and folders
- `crontab`: Install, list or remove your crontab
- `csvcut`: Select columns of CSV
- `csvformat`: Write CSV with another delimiter
- `csvgrep`: Keep the CSV rows whose columns match
- `csvjoin`: Join two CSV files on a column
- `csvjson`: Convert CSV to JSON
- `csvlook`: Show CSV as a fixed-width table
- `csvsort`: Sort CSV rows by columns
- `csvstack`: Stack CSV files under one header
- `csvstat`: Per-column statistics of CSV
- `curl`: Fetch a URL
- `cut`: Print chosen fields or characters of each line
- `date`: Print the date and time
- `diff`: Compare two files line by line
- `dirname`: A path without its last part
- `docx2txt`: Print the text of a DOCX
- `du`: Show the sizes of files and folders
- `echo`: Print its arguments
- `edit`: Replace exact text in a file
- `env`: Print the run's variables
- `expr`: Evaluate an expression
- `false`: Do nothing, unsuccessfully
- `file`: What a file holds, by its bytes
- `find`: List the paths beneath a folder, filtered
- `fold`: Wrap lines at a width
- `grep`: Print the lines that match a pattern
- `head`: Print the first lines
- `history`: Print your lines from /log/, numbered
- `hmac`: Print or check a keyed digest of the input
- `html2text`: Turn an HTML page into Markdown or plain text
- `in2csv`: Convert JSON or XLSX to CSV
- `jev`: Decide about the input with Jev
- `join`: Join the lines of two sorted files on a field
- `jq`: Filter JSON with jq
- `js`: Run JavaScript or TypeScript
- `ls`: List files and folders
- `mail`: Send an email
- `man`: Print a command's manual, or the index
- `mcp`: Use a remote MCP server's tools, resources and prompts
- `md5sum`: Print the MD5 digest of each file
- `mkdir`: Make a folder
- `mktemp`: Make a scratch file or folder
- `mv`: Move or rename files and folders
- `nl`: Number the lines
- `paste`: Put the lines of files side by side
- `patch`: Apply a unified diff to files
- `pdftotext`: Print the text of a PDF
- `perl`: Run Perl (5.42)
- `pkg`: Install, publish and find packages
- `printenv`: Print the value of a variable
- `printf`: Formatted text
- `pub`: Block or bless what /pub shares
- `pup`: Select parts of an HTML page with CSS selectors
- `pwd`: Print the working directory
- `python`: Run Python (CPython 3.14)
- `python3`: Run Python (CPython 3.14)
- `realpath`: Print a path made absolute
- `redis-cli`: One command on the user's own Redis
- `restore`: Bring back a revision or a removed file
- `rev`: Reverse the characters of each line
- `rm`: Remove files and folders
- `rmdir`: Remove an empty folder
- `scp`: Copy one file to or from another machine
- `sed`: Edit a stream of lines with a script
- `seq`: A run of numbers
- `sh`: Run a script in Piped's shell, as bash would
- `sha1sum`: Print the SHA1 digest of each file
- `sha256sum`: Print the SHA256 digest of each file
- `sha384sum`: Print the SHA384 digest of each file
- `sha512sum`: Print the SHA512 digest of each file
- `shasum`: Print the SHA digest of each file
- `sleep`: Wait for a while
- `sort`: Sort lines
- `ssh`: Run one command on another machine
- `tac`: Lines in reverse order
- `tail`: Print the last lines
- `tee`: Copy the input to files as well as to the output
- `tesseract`: Print the text of an image, by OCR
- `test`: Answer a question with an exit code
- `touch`: Make an empty file
- `tr`: Translate, delete or squeeze characters
- `tree`: Draw a folder's layout
- `true`: Do nothing, successfully
- `type`: Say what a name is: a shell keyword, a builtin, a function, or a file
- `uniq`: Collapse adjacent equal lines
- `urlencode`: Escape text for a URL
- `uuidgen`: Print a new UUID
- `wc`: Count lines, words and bytes
- `which`: Show where a command name resolves
- `whoami`: Print the username
- `xargs`: Run a command with arguments read from the input
- `xmllint`: Select parts of an XML document or an HTML page with XPath
- `yq`: Filter YAML with jq

`cd`, `pushd`, `popd`, `dirs`, `exit`, `source`, `.`, `eval`, `local`, `return`, `set`, `shopt`, `shift`, `break`, `continue`, `read`, `mapfile`, `readarray`, `unset` and `let` are built into the shell itself.
