---
title: "Command reference"
description: "Every ysra command and every slash command."
---

## Commands

Run these from your shell.

| Command | What it does |
|---|---|
| `ysra` | Start working in the current folder |
| `ysra --inline` | The same, keeping the conversation in your terminal's own scrollback |
| `ysra login` | Sign in with your email and password |
| `ysra login --device` | Sign this machine in as a [device](../devices/overview.md); you approve it from your own computer |
| `ysra serve --folder <path>` | Keep a folder on this device available. Repeat `--folder` for more. Add `--install-service` to keep it running (Linux) |
| `ysra target add` | Add a [target](../targets/overview.md); asks for the details |
| `ysra target list` | Show your targets |
| `ysra target mode <name> observe\|change` | Let me only look, or also change things (each change still asks) |
| `ysra target production <name> on\|off` | Mark a target as production |
| `ysra target rm <name>` | Remove a target. Its log stays |
| `ysra doctor` | Check this machine, one line per check: safe commands, Git, reaching Ysra, sign-in, updates |
| `ysra update` | Replace `ysra` with the latest release, checksum verified |
| `ysra uninstall` | Remove `ysra`, its sign-ins and its background service; asks before deleting `~/.ysra`. `--purge` deletes it, `--keep-data` keeps it |
| `ysra --demo` | A scripted example conversation. No account needed |
| `ysra --version` | Print the version |

## Slash commands

Type these in the message box. `/help` lists them; Tab completes.

### Conversations

| Command | What it does |
|---|---|
| `/new [request\|@file.md]` | Start a separate conversation in this folder |
| `/sessions [search]` | Resume a recent conversation for this folder |
| `/status` | Where things stand right now |
| `/cancel` | Stop what I'm doing and keep the conversation |
| `/quit` | Exit |

### Seeing what I did

| Command | What it does |
|---|---|
| `/plan` | The current plan and to-dos |
| `/spec` | The latest specification I wrote |
| `/approve [version]` | Approve the specification and start building it |
| `/activity` | The history of what I did |
| `/context` | What I'm working from: requirements, files, memory |
| `/diff` | My latest changes, and everything a commit would include |
| `/cost` | What this conversation has used |

### Keeping or reverting work

| Command | What it does |
|---|---|
| `/commit [--branch name] [--new] [msg]` | Commit my changes on a branch, new or existing. Never pushes |
| `/push [--branch name] [--new] [msg]` | Commit my changes and push them. I ask before pushing |
| `/undo` | Put back exactly what I changed. Your own changes stay |
| `/checkpoints` | List earlier points you can return to |
| `/rewind SEQ` | Return to an earlier point |

Details: [Commit, push and undo](commit-push-undo.md).

### Running your app

| Command | What it does |
|---|---|
| `/preview` | Start your app so you can open it in the browser |
| `/stop-preview` | Stop it |

### Settings

| Command | What it does |
|---|---|
| `/auto on\|off` | Go ahead without asking inside this folder. I still ask before risky things |
| `/settings` | Choose model, reasoning, quality and autonomy |
| `/model` | Choose the model |
| `/login` | Sign in, or switch account |
| `/ws` | Switch workspace |
| `/help` | The essential commands |
| `/help all` | Every command |

## Keys

| Keys | Action |
|---|---|
| Enter | Send |
| Tab | Complete a slash command |
| Mouse wheel, PgUp / PgDn, Shift+↑ / ↓ | Scroll |
| Esc | Back to live |
| ↑ / ↓ with an empty message box, then Enter | Select a step and open it |
| Ctrl+C twice | Quit |

Selecting text with the mouse needs your terminal's modifier key: Option in
iTerm2, Fn in Terminal.app, Shift in most others. Or use `ysra --inline`.

## Files I keep

Everything of mine lives in `~/.ysra`, readable only by you. Nothing is written
inside your folders except the changes you asked for.

| Path | What |
|---|---|
| `~/.ysra/targets.json` | Your [targets](../targets/targets-json.md). Only on this computer |
| `~/.ysra/targets/<name>/log.jsonl` | What ran on each target, and who approved it |
| `~/.ysra/tools/` | Tools I installed with your OK |
| `<folder>/.ysra/deny` | Yours to write: extra files I must never read |
