Metadata-Version: 2.4
Name: rendez-cli
Version: 0.1.2
Summary: Put your repository into a Rendez session, from your terminal
License-Expression: MIT
Project-URL: Homepage, https://rendez.space
Project-URL: Documentation, https://rendez.space
Keywords: rendez,agent,collaboration,terminal
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: websockets>=12
Dynamic: license-file

# rendez CLI — put your repository into a session

Status: **experimental** (`DEC-021`). Files, plus shell with your
consent per command (`DEC-022`).

The web app is the control plane: the plan, the transcript, who is steering.
This puts the *files* somewhere useful — the repository already checked out on
your machine, instead of an empty directory on the server.

```bash
pipx install rendez-cli

cd ~/code/your-repo
rendez connect -g "add rate limiting"
```

**On PyPI as `rendez-cli`**; the installed command is `rendez`. The names
differ because `rendez` on PyPI belongs to an unrelated project -- a
distribution and its entry point need not match.

It defaults to the deployed service (`rendez.space`). Point it somewhere else
with `--api`/`--web`, or `RENDEZ_API`/`RENDEZ_WEB`, which is what a local
stack needs.

The client sends a wire-protocol version and reads the server's on `/health`
(`DEC-092`). An installed CLI that has fallen behind a redeployed server says
so and names the upgrade, rather than failing somewhere less legible:

```bash
pipx upgrade rendez-cli
```

Installing from the repository still works for people with access to it:

```bash
pipx install "git+https://github.com/rendez-engine/hive.git#subdirectory=cli"
```

**HTTPS rather than `git+ssh`**, which assumes a GitHub SSH key that a
developer may not have — `gh auth login` covers HTTPS and is already how most
people here reach this repo. Found by installing on a machine that had no SSH
key. `pipx reinstall rendez-cli` picks up later commits. From a checkout,
`PYTHONPATH=cli python3 -m rendez connect` runs the working tree.

**A plain `pipx install` copies the source, so it silently shadows your
checkout.** Editing `cli/rendez/__init__.py` then changes nothing about what
`rendez connect` runs, and the symptom is a feature that works in tests and is
absent in the app -- with no error anywhere, because the installed copy is
older but perfectly valid. If you are developing the CLI:

```bash
pipx install --force --editable ./cli    # runs your checkout, not a copy
```

To tell which one is live:

```bash
"$(pipx environment --value PIPX_LOCAL_VENVS)/rendez-cli/bin/python" \
  -c "import rendez, inspect; print(inspect.getfile(rendez))"
```

```
  2 recent session(s) on this repo:
    1. add rate limiting   you · 2026-09-29 14:02
    2. fix the cart bug    sam · 2026-09-28 11:40

  your 1 most recent session(s) with no repository — joining one connects it here:
    3. plan the migration   you · 2026-09-27 09:15

  Number to join, or Enter for a new session:

Session  add rate limiting
Open     http://localhost:3000/sessions/8f3a...
Workspace /Users/you/code/your-repo  (main, clean)
```

Sessions are filed under the repository they were attached to, keyed on the
git remote (`DEC-023`), so a teammate's clone at a different path matches
yours. A repository with no remote keys on its first commit instead, which
means renaming or moving the checkout keeps its sessions. A folder that is
not a git repository has nothing stable to key on and is filed under its
path -- renaming it hides its sessions, and `rendez connect` says so. Your own sessions that have **no** repository follow underneath, up to
two of them: a session started in the browser is filed under nothing, and
joining one from a checkout connects it to that repository for good. They are
a tail rather than peers — this repository's own sessions come first and are
never displaced by them, because "what was already going on here?" is the
question the list answers. To join
a specific session directly — the app shows this command on its Files tab —
use `rendez connect --session <id>`. The header then shows the session's
goal rather than its id -- the id identifies the session, but it is not what
anyone calls it. A goal is a label, not an identifier: two sessions may share
one, and `--session` always takes the id. Without this, two people in one repo start parallel sessions that
cannot see each other's edits. Press Enter to start fresh, or `--new` to skip
the question. It is skipped automatically when stdin is not a terminal, so
scripts do not hang.

Authentication is mandatory. First sign up and verify your email in the browser,
then run `rendez login --api https://YOUR-API`. The CLI prompts for your
**username** -- not your email address (`DEC-067`) -- and your password, and
stores a revocable token at `~/.config/rendez/auth.json` with
mode 0600. `rendez logout` revokes it. `rendez connect` uses the same account
name as the browser. The terminal's printed session URL identifies a session;
use the browser Share panel to create a link or invite teammates. For a
link-only CLI join, supply `--session` and the link's `access` value as
`--share-token`.

Your teammates open an invited session in a browser — nothing to install,
nothing to clone. They see the transcript and the plan; the owner can grant
collaborator access to steer the agent. When the agent reads or writes a file, it
happens **here**, in your working tree, and your editor updates.

## Options

| | |
|---|---|
| `-d, --dir` | repository root (default: current directory) |
| `-g, --goal` | what the session is for |
| `-s, --session` | join an existing session instead of creating one |
| `-n, --new` | start a new session without being offered existing ones |
| `-u, --user` | your name in the room (default: `$USER`) |
| `--share-token` | access value from a revocable share URL |
| `--api` | server (default `http://localhost:8100`, or `RENDEZ_API`) |
| `--web` | web app, for the share link (or `RENDEZ_WEB`) |

Requires `websockets`. Only the session **owner** may attach a workspace —
normally the person who created it, which `connect` does for you.

## What it does, exactly

Three operations, forwarded from the server and run against your tree:

- `read_file` · `write_file` · `list_dir`

Paths are resolved and refused if they leave the root. `.git`,
`node_modules`, `__pycache__`, `.next` and `.venv` are hidden from listings.
Files over 256KB are refused in both directions — a tool result re-enters the
model's history on every later request (`DEC-020`), so a large file is paid
for every turn, not once.

## What it does not do

- **Shell asks first** (`DEC-022`). `ls`, `cat`, `grep` and similar run
  unprompted; anything else prompts you in this terminal — `y` once, `a`
  always for that exact command this session, `n` no. Only you can answer:
  it is your machine. A redirect kills the command's whole process group, so
  an interrupted `npm test` does not leave its runner behind.
- **The watcher warns, it does not prevent.** Edit a file the agent is
  working on and the session notices within ~1.5s and tells the agent on its
  next turn. It does not stop the write that already happened, and only files
  the agent has touched are watched.
- **No git.** Branch and dirty state are shown for context. Nothing commits,
  pushes or checks out.
- **No second host.** One machine per session. Close your laptop and the
  session has no filesystem until you reconnect; in-flight calls fail
  immediately rather than hanging.

## Be aware

Anyone who can steer the session can make the agent read and write files in
this directory. Confinement to the root is a path check, not a sandbox: a
`.env` **inside** the repository is inside the repository. Run this on repos
you would screen-share, with people you would screen-share to.

For isolated automation, `RENDEZ_AUTH_FILE` overrides the default CLI login
cache path (`~/.config/rendez/auth.json`). The managed test runner uses a private
temporary cache so tests cannot replace a developer's saved credentials.
