feat(cast)!: redesign the CLI around felis's own command line #15

Merged
natsukium merged 2 commits from feat/cli-redesign into main 2026-10-14 22:51:38 +09:00
Owner

Breaking CLI redesign: positional FILE, interactive record by default (switch-in-place inside felis, else a new window; --headless / --session), stop on program exit, streaming FILE.part writes, felis-compatible socket/spawn/exit codes, new play command. Closes #5.

Breaking CLI redesign: positional FILE, interactive record by default (switch-in-place inside felis, else a new window; --headless / --session), stop on program exit, streaming FILE.part writes, felis-compatible socket/spawn/exit codes, new play command. Closes #5.
The old CLI was a thin wrapper over the library: `--out`/`--in` files,
a mandatory `--command` string run under `sh -c`, an `--idle-ms` timer
as the only way to stop, and no way to type into the recorded session.
It answered "record what this script prints", not the question users
bring ("record what I do in this terminal"), and every flag spelled
something differently from `felis` itself.

Breaking: the commands are now

  felis cast record [OPTIONS] <FILE> [-- <COMMAND>...]
  felis cast play [--speed F] <FILE>
  felis cast serve <FILE> --socket <PATH> [--speed F] [--session-id ID]

- record is interactive by default. Inside a felis window it switches
  that window onto the new session (`felis sessions switch`) and felis
  brings it back when the program exits; elsewhere it opens a window.
  `--headless` keeps the scripted mode, `--session` records an existing
  session. This implements forge issue #5.
- The recording stops on the daemon's SessionExited push instead of an
  idle timer, which cut quiet interactive sessions short. `--idle` and
  `--max` remain as extra stops. Stopping the recording leaves the
  session running (felis sessions are persistent), except a headless
  session the recorder created, which would otherwise leak.
- Socket resolution, session creation (launch_args) and daemon
  auto-spawn go through felis-client-core, so they match `felis` exactly.
  Args are parsed by clap like felis's, which also makes
  `felis help cast` work. Exit codes keep felis's 1/2 split.
- Units are appended as they close into FILE.part, renamed at the end:
  memory stays flat for long recordings, a killed recorder leaves a
  valid partial file, and an existing FILE is refused unless --force.
- play is serve on a private 0700 socket plus a window, so replaying to
  oneself is one command instead of two terminals.

The integration tests run an in-process felis-daemon with stand-in
felis scripts, which surfaced a bug: a program that exited before the
first pull completed ended as "disconnected" because a failed pull broke
the loop before the SessionExited push was read. The flake vendors
felis's build-common.rs because felis-daemon's build script includes it
by relative path.

The retry_connect mutants exclusion goes with retry_connect itself.
chore(skills): follow the CLI redesign
All checks were successful
ci / cargo fmt / clippy / test / deny (pull_request) Successful in 2m7s
ci / cargo fuzz smoke (pull_request) Successful in 1m59s
ci / cargo fmt / clippy / test / deny (push) Successful in 49s
ci / cargo fuzz smoke (push) Successful in 1m58s
827d71cf61
The shipped felis-cast skill still taught --out/--command/--idle-ms,
which no longer parse; an agent following it would fail on the first
command. It now leads with `record --headless`, the mode an agent can
drive, and adds `play`. The doc-cascade twin list gains the new
reference/explanation pair for the CLI so its sweep covers both pages.
natsukium deleted branch feat/cli-redesign 2026-10-14 22:51:38 +09:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
natsukium/felis-fcast!15
No description provided.