---
title: Command-line interface
description: Command-line access to dialog and notebook navigation and structure.
---
## summary\_cli

```python
def summary_cli(
    fname:str, # Dialog or notebook path
    maxlen:int=180, # Maximum characters displayed per message
):
```

*Show one preview row per message.*

## find\_cli

```python
def find_cli(
    fname:str, # Dialog or notebook path
    pattern:str='', # Regex or plain text to find
    msg_type:str=None, # Limit matches to code, note, prompt, or raw messages
    errors:bool=False, # Match only code messages with errors?
    exported:bool=False, # Match only exported messages?
    ids:str='', # Comma-separated message IDs to select
    before:int=0, # Messages of context before each match
    after:int=0, # Messages of context after each match
    context:int=None, # Messages of context before and after each match
    limit:int=None, # Maximum matched messages
    case:bool=False, # Match case sensitively?
    plain:bool=False, # Treat pattern as plain text rather than regex?
    headers:bool=False, # Match only heading notes?
    section:str=None, # Return the section beginning at this heading
):
```

*Find messages using dialog-aware filters and context.*

## view\_cli

```python
def view_cli(
    fname:str, # Dialog or notebook path
    ids:str='', # Comma-separated message IDs; omit to view the whole dialog
    nums:bool=True, # Show line numbers for individual messages?
    lnhashs:bool=False, # Show hash-verified line addresses instead of line numbers?
    start_line:int=1, # First source line to show
    end_line:int=None, # Last source line to show
    out:bool=False, # Include prompt replies and code outputs?
    full_out:bool=False, # Do not truncate included outputs?
    errors:bool=False, # Show only code messages with errors?
):
```

*View complete dialogs or selected messages.*

## add\_cli

```python
def add_cli(
    fname:str, # Dialog or notebook path
    source:str=None, # Message source; defaults to stdin
    msg_type:str='code', # Message type: code, note, prompt, or raw
    before:str=None, # Insert before this message ID
    after:str=None, # Insert after this message ID
    export:bool=False, # Mark the new message for nbdev export?
    dry_run:bool=False, # Preview without saving?
):
```

*Add a message, reading multiline source from stdin by default.*

## del\_cli

```python
def del_cli(
    fname:str, # Dialog or notebook path
    ids:str, # Comma-separated message IDs to delete
    dry_run:bool=False, # Preview without saving?
):
```

*Delete messages by stable ID.*

## move\_cli

```python
def move_cli(
    fname:str, # Dialog or notebook path
    ids:str, # Comma-separated message IDs to move
    before:str=None, # Move before this message ID
    after:str=None, # Move after this message ID
    dry_run:bool=False, # Preview without saving?
):
```

*Move messages while retaining their relative order.*
