xonecas.ioDon't click! Sean Caetano Martin Sign in

cast / commits / c69e2d4

feat: readme

sacenox1 day agoc69e2d485a7ede422b1908c2d559eccae94ae9e0parent 8303cb26 files changed

README.md+139-0
@@ -0,0 +1,139 @@
1+# Cast
2+
3+Cast turns a prompt into a workflow of tasks, and runs it. You write the prompt in a markdown editor, an agent plans it as tasks you can review and edit, and agents work the tasks in a virtual machine with your folder mounted. A wizard casts a spell. You cast a prompt.
4+
5+<video src="docs/demo.mp4" width="700" autoplay loop muted playsinline></video>
6+
7+[Watch the demo (32 s)](docs/demo.mp4). A prompt for a dice roller becomes a plan of two tasks, one line of feedback splits it into three parallel tasks and a check, and the run builds the page. The agents took about 15 s to plan, 30 s to refine, and 60 s to run, sped up here.
8+
9+## How it works
10+
11+Cast is one binary. It opens a directory, and everything you run happens in that directory.
12+
13+1. **Write the prompt.** The editor has the markdown source on the left and a live preview on the right, with images, video, and mermaid graphs.
14+1. **Generate a workflow.** An agent reads the prompt and plans it as tasks, grouped into steps. Tasks in one step run in parallel. A second, fresh agent checks the plan before you see it.
15+1. **Review it.** Each task lists the decisions the agent made, its acceptance criteria, and the evidence it will attach. Edit a task, add one, or tell the agent what to change.
16+1. **Run it.** Run the whole workflow, one step, or one task. Pause at any point.
17+
18+An agent never runs on your machine. Cast boots a QEMU VM with the directory mounted at `/work`, and the VM's changes land in your folder as the agent makes them. Cast doesn't touch git. An agent does when your prompt asks for it.
19+
20+### The prompt editor
21+
22+![The prompt editor: markdown source, and a preview with a mermaid graph](docs/prompt.png)
23+
24+- **Image**, **Graph**, and **Video** in the toolbar embed media at the cursor.
25+- Ctrl+V pastes rich content. Copied HTML becomes markdown, and a copied image becomes a file and a link to it.
26+- Ctrl+K asks an agent. With no selection, it writes at the cursor. With a selection, it edits those lines. Tab accepts the proposal, and Esc dismisses it.
27+
28+### The review
29+
30+![A workflow in review: three parallel tasks, then a task that checks them](docs/review.png)
31+
32+The graph shows the steps from left to right. Click a task to read its decisions, acceptance criteria, and evidence. **Edit** changes a task by hand. To change the plan, write what should change in the box at the bottom and click **Refine**. Each refine makes a new version, and Cast keeps the old ones on disk. **Discard** drops the version, **Prompt** goes back to the editor, and **Approve** makes the workflow ready to run.
33+
34+### The run
35+
36+![A run in progress: three tasks done, the fourth running, with its output below](docs/run.png)
37+
38+| Control | What it does |
39+|---|---|
40+| **Run all** | Runs every step in order. |
41+| **Next task** | Runs one task, then waits. |
42+| **Next step** | Runs the tasks of the current step, then waits. |
43+| **Pause** | Starts no new task. Running tasks finish. |
44+| **Cancel** | Stops the running tasks. |
45+
46+Each task streams its agent's output into its own tab, and the files it attaches as evidence show next to it. Cast saves each run's state and evidence to disk.
47+
48+## Get started
49+
50+You need:
51+
52+- Linux on x86-64 with KVM. macOS comes later.
53+- `qemu-system-x86_64`, `qemu-img`, `xorriso`, `ssh`, `ssh-keygen`, and `git`.
54+- Rust, for the build.
55+- A key for the coding agent: `CLAUDE_CODE_OAUTH_TOKEN` for Claude Code (make one with `claude setup-token`), or `OPENCODE_API_KEY` for opencode. Export it in the shell that starts Cast, or type it into the app on first run.
56+- About 6 GB of disk for the VM images, and 8 GB of free memory while a directory is open.
57+
58+Clone this repo, then run every command from its root.
59+
60+1. Build and install the binary:
61+
62+ ```sh
63+ cargo build --release
64+ install -Dm755 target/release/cast ~/.local/bin/cast
65+ ```
66+
67+1. Open a directory:
68+
69+ ```sh
70+ cast ~/code/dice-roller
71+ ```
72+
73+1. On the first run, Cast shows the setup screen. Check the agent credentials, then click **Bake VM**. The bake downloads the Debian 13 cloud image (435 MB), installs the dev packages, Claude Code, opencode, Rust, Go, Node, and agent-browser, copies your `~/.claude/CLAUDE.md` and skills into the image, and sets up an XFCE desktop so agents can test GUIs. Click **Continue** when it finishes.
74+
75+The status bar shows **VM running** once the VM is up. Write your prompt, then click **Generate workflow**.
76+
77+The key, your `CLAUDE.md`, and your skills are baked into the image. After you change any of them, open the settings and click **Rebake**.
78+
79+## Keys
80+
81+| Key | What it does |
82+|---|---|
83+| Ctrl+O | Opens a directory. |
84+| Ctrl+N | Starts a new prompt. |
85+| Ctrl+S | Saves the prompt. Cast also saves as you type. |
86+| Ctrl+W | Closes the tab. |
87+| Ctrl+, | Opens the settings. |
88+| Ctrl+K | Asks an agent to write at the cursor, or to edit the selection. |
89+| Ctrl+V | Pastes rich content as markdown. |
90+
91+## Settings
92+
93+The settings live in `~/.config/cast/config.json`, and the app edits them for you.
94+
95+| Key | Meaning |
96+|---|---|
97+| `default_agent` | `claude` or `opencode`. The prompt editor and each task can override it. |
98+| `claude_token` | The Claude Code token. Empty means Cast reads `CLAUDE_CODE_OAUTH_TOKEN`. |
99+| `opencode_key` | The opencode key. Empty means Cast reads `OPENCODE_API_KEY`. |
100+| `opencode_model` | The model for opencode runs. |
101+| `recents` | The last 8 directories you opened. |
102+
103+## Where things live
104+
105+Cast writes nothing into your directory. All of its state is plain files under `~/.local/share/cast`:
106+
107+| Path | Contents |
108+|---|---|
109+| `projects/<directory>/prompts/` | The directory's prompts, as markdown. |
110+| `projects/<directory>/workflows/<prompt>/v<n>.json` | Each version of a prompt's workflow. |
111+| `projects/<directory>/runs/<prompt>-v<n>/` | A run's state, and each task's evidence in a folder named for the task. |
112+| `debian-13-generic-amd64.qcow2` | The Debian cloud image the bake starts from. |
113+| `cast.qcow2` | The baked VM image. Every VM boots from it as a snapshot, so a run never changes it. |
114+| `console.log` | The VM's console, for when a bake or a boot fails. |
115+
116+## Develop Cast
117+
118+| Task | Command |
119+|---|---|
120+| Build | `cargo build --release` |
121+| Tests | `cargo test` |
122+| Lint | `cargo clippy --all-targets -- -D warnings` |
123+| Format | `cargo fmt` |
124+
125+| Path | Contents |
126+|---|---|
127+| `src/editor` | The prompt editor, its preview, media, and the agent assist. |
128+| `src/workflow` | The workflow model, its graph, and the review. |
129+| `src/exec` | The run: the state machine, its record on disk, and its view. |
130+| `src/agent` | Agent jobs over SSH, their prompts, and the parser for their output. |
131+| `src/vm` | The bake, the boot, and the provisioning of the VM. |
132+| `src/setup`, `src/settings` | The first-run screen and the settings. |
133+| `assets/provision.sh` | The script that provisions the VM image during the bake. |
134+
135+[cast.md](cast.md) is the vision for Cast, and [CLAUDE.md](CLAUDE.md) has the rules for working on it. Cast is built with [Rune](https://github.com/anomalyco/rune).
136+
137+## License
138+
139+MIT.
TODO.md+12-0
@@ -0,0 +1,12 @@
1+# Things I've noticed and need to-do.
2+
3+- Can't delete/discard a prompt. Clutters the sidebar.
4+- App icon and brand, cast is a play of words around a wizard casting a spell as a analogy to prompting a llm, our icon and brand should use that.
5+- A good readme for users, with screenshots and videos to explain the app, and how to clone, build, and install.
6+
7+## Evolving `cast`
8+
9+The direction is more of a file browser and editor. Preparing a prompt is more than just a single markdown file, sometimes I need to add files, edit them, etc.
10+So the user experiences changes to a file editor/browser (opened directory file tree, content panel) with the agent assist features, and the feature to write a prompt, and along with the directory files, use it to create and execute workflows.
11+
12+While this mostly evolves the UI and editor, we maintain the core functionality of generating
docs/demo.mp4+0-0

Binary file, not shown.

docs/prompt.png+0-0

Binary file, not shown.

docs/review.png+0-0

Binary file, not shown.

docs/run.png+0-0

Binary file, not shown.