Repository navigation
Command line
The command is gpython. The short name gpy does the same.
gpython [--version] [--no-vim] [--theme NAME] [--groups] [uv flags] [FILE | DIR ...]
| Command | Result |
|---|---|
gpython |
An empty notebook without a name. ctrl+s or :w asks for a name |
gpython script.py |
The file opens. gpython divides a plain script into cells |
gpython a.py b.py |
Each file opens in its own tab. gt and gT change the tab |
gpython notebooks/ |
The file explorer opens in that folder |
gpython opens .py files, marimo notebooks and .ipynb files. See File formats.
| Option | What it does |
|---|---|
--no-vim |
Editing without vim modes, for this session. :set novim saves the setting |
--theme NAME or --theme=NAME
|
Color theme for this session only. See Themes and status bar |
--groups FILE ... |
Print the groups of cells that can run at the same time, then stop. No kernel starts. See Concurrent cells |
-v, -V, --version
|
Print the version, then stop |
-h, --help
|
Print the usage text, then stop |
An option that gpython does not know stops the command and prints the usage text.
These flags apply only in a uv project. A uv project is a folder that has a pyproject.toml
file, on a computer that has uv.
In a uv project, gpython starts the kernel with uv run --with ipykernel.
uv takes ipykernel from its cache. It does not add ipykernel to the project.
The flags have the same meaning as for uv run. They apply to this session only.
| Flag | What it does |
|---|---|
--extra NAME |
Install the optional dependencies NAME. You can use it more than one time |
--all-extras |
Install all optional dependencies |
--group NAME |
Install the dependency group NAME. You can use it more than one time |
--all-groups |
Install all dependency groups |
--with PKG |
Add a package for this session only. The project does not change. You can use it more than one time |
--no-sync |
Use the environment as it is. Install nothing |
--extra NAME and --extra=NAME are the same.
If you give a uv flag outside a uv project, gpython shows a message and uses a different environment.
More about environments is on the Python environments page.
gpy --no-vim nb.py
gpy --theme nord nb.py
gpy --groups nb.py
gpy --extra plots --with rich analysis.pyUse the notebook
- Getting started
- Command line
- Running cells
- Keys
- Commands
- Vim
- Markdown cells
- Variables and the debugger
- Images
Set up the workspace
Help and project