nbterm Documentation

repository·main·Indexed 21 days ago

https://github.com/davidbrochart/nbterm

A terminal-based tool for viewing, editing, and executing Jupyter Notebooks. Supports interactive mode for cell manipulation and batch mode for execution via the --run flag. Note: This project is no longer maintained and has been succeeded by jpterm.

Tokens
460
Snippets
2
Records
3
Agent score
23%

What's inside nbterm

  1. Install nbterm

    main

    You can install nbterm using pip or conda. Note that you must also have a kernel installed (such as ipykernel, xeus-python, or xeus-cling) to execute notebook cells.

    Warning: nbterm is no longer maintained. Its successor is jpterm.

    # Using pip
    pip install nbterm
    
    # Using conda
    mamba install nbterm -c conda-forge
  2. nbterm Key bindings

    main

    nbterm operates using two modes: edit mode (for typing inside cells) and command mode (for navigating and manipulating cells).

    Mode Switching

    • enter: Enter edit mode.
    • esc: Exit edit mode and enter command mode.

    Command Mode Bindings

    KeyAction
    upSelect cell above
    downSelect cell below
    ctrl-upMove cell above
    ctrl-downMove cell below
    aInsert cell above
    bInsert cell below
    xCut the cell
    cCopy the cell
    ctrl-vPaste cell above
    vPaste cell below
    oSet as code cell
    rSet as raw cell
    mSet as Markdown cell
    lClear cell outputs
    ctrl-eRun cell
    ctrl-rRun cell and select below
    ctrl-sSave
    ctrl-qExit
    ctrl-hShow help
  3. Use nbterm to view, edit, or run notebooks

    main

    Use the nbterm CLI to interact with Jupyter Notebooks. You can open a notebook in an interactive terminal interface or run it in batch mode.

    • Interactive mode: Opens the notebook for viewing and editing.
    • Batch mode: Uses the --run flag to execute the notebook without the interactive interface.
    # Open an interactive notebook
    nbterm my_notebook.ipynb
    
    # Run a notebook in batch mode
    nbterm --run my_notebook.ipynb