Scenes
Scene commands manage individual scenes within chapters.
Alias: sc
| Command | Alias | Description |
|---|---|---|
add | ad | Add a scene to a chapter |
list | li | List scenes by chapter |
edit | ed | Open a scene in your editor |
move | mo | Move a scene using dotted notation |
rename | rn | Rename a scene slug |
remove | rm | Remove a scene from a chapter |
focus | fo | Set or show the current scene focus |
unfocus | un | Clear the current scene focus |
nib scene add
Add a new scene to a chapter. Creates a Markdown file in scenes/ and adds it to the chapter in book.yaml.
Synopsis
nib scene add <chapter> <slug>Examples
# Add a scene to chapter 1
$ nib sc ad 1 opening-scene
# Add a scene to chapter 3
$ nib scene add 3 the-confrontationnib scene list
List scenes, optionally filtered by chapter.
Synopsis
nib scene list [--chapter <n>]Flags
| Flag | Description |
|---|---|
--chapter | Filter to a specific chapter |
Examples
# List all scenes
$ nib scene list
# List scenes in chapter 2
$ nib sc li --chapter 2nib scene edit
Open a scene in your editor.
Synopsis
nib scene edit [slug]If no slug is provided, nib opens the most recently edited scene.
nib scene move
Move a scene from one position to another using dotted notation.
Synopsis
nib scene move <from> <to>This updates book.yaml to reflect the new order. The scene file itself is not renamed.
Examples
# Move chapter 3, scene 2 to chapter 4, scene 1
$ nib sc mo 3.2 4.1nib scene rename
Rename a scene slug.
Synopsis
nib scene rename <old-slug> <new-slug>nib scene remove
Remove a scene from a chapter.
Synopsis
nib scene remove <chapter> <slug>scenes/ and can be reassigned later.nib scene focus
Set or show the current scene focus.
Synopsis
nib scene focus [scene]When called with a scene argument, sets the focus. When called without, shows the current focus.
nib scene unfocus
Clear the current scene focus.
Synopsis
nib scene unfocus