croshell¶
croshell builds a temporary uv run launch context, then opens it in an interactive backend such as IPython, Python, Marimo, Jupyter, VS Code, or VisiData.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
PATH |
Optional file or directory to inspect before launching the backend |
Options¶
| Option | Short | Description |
|---|---|---|
--project |
-p |
Reuse a specific uv project directory |
--uv-with |
-w |
Add extra packages to the launch environment |
--backend |
-b |
Backend: ipython, python, marimo, jupyter, vscode, or visidata |
--profile |
-r |
IPython profile name |
--self |
-s |
Point the project at ~/code/stackops when that checkout exists |
--frozen |
-f |
Add --frozen to the uv run invocation |
The backend option also accepts short aliases from the current enum mapping:
ipythonoripythonorpmarimoormjupyterorjvscodeorcvisidataorv
Current launch behavior¶
croshell does more than open a shell:
- if
PATHis a Python file, it stages that file inside a generated temporary script - if
PATHis a non-Python file, it generates a reader script using StackOps file readers and prints the parsed content in the chosen backend - if
PATHis omitted, it still creates a temporary script and launches the selected backend in the current context
Project resolution is currently:
- explicit
--project, if provided - nearest
.ve.yamlor.venvdiscovered from the selected file ~/code/stackops, if that checkout exists and nothing else was selected
Backend-specific notes¶
ipythonis the default backend.pythonruns the generated script with plain Python instead of IPython.marimoconverts the generated script tomarimo_nb.pyin a temporary directory, then runsmarimo edit --host 0.0.0.0.jupyteremits a temporary.ipynband opens it in JupyterLab.vscodeinitializes a temporaryuvworkspace and opens the generated script in VS Code.visidataopens the selected file directly withvd; JSON files use plainvisidata, other files addpyarrow.
Examples¶
# Launch the default IPython backend
croshell
# Open a Python file with IPython
croshell script.py --backend ipython
# Inspect a data file with VisiData
croshell data.csv --backend visidata
# Open a generated notebook in Marimo
croshell analysis.py --backend marimo --project .
# Force the StackOps checkout as the uv project
croshell src/stackops/scripts/python/croshell.py --self