# @sys9/tape9-cli

Prefer `@sys9/cli`. It runs tape9 as `sys9 tape`.

Install:

```sh
npm install -g @sys9/cli
# or
bun install -g @sys9/cli
```

Run:

```sh
sys9 tape --help
```

`@sys9/tape9-cli` remains the tape9 package used by `@sys9/cli`.

## Append with a predecessor

Start a conditional chain on a new or existing Tape, keeping its ordinary content:

```sh
printf 'first batch\n' | tape9 append history --after='' --space my-space
# Use the batch ID printed by the previous command:
printf 'next batch\n' | tape9 append history --after BATCH_ID --space my-space
tape9 append-state history --space my-space --json
```

Each invocation reads at most 32 MiB and commits one atomic batch. A predecessor
conflict reports the current tail without appending. The CLI retries within the
invocation; use the SDK to persist batch identity and payload across processes.
Ordinary `append` and `capture` remain allowed and do not change the conditional
tail. Ordering only applies between conditional batches. Once one succeeds, the
Tape ID cannot be reused after deletion.
