Core
CLI Reference
Complete reference for the Thesis command-line interface.
Installation
npm install -g @thesis/cliOr with Bun:
bun install -g @thesis/clithesis notebook
Launch the Thesis scientific notebook web viewer. This is the default command when you run thesis without arguments.
thesis notebookWhat it does:
- Finds available ports (starting from 8888 for app, 8898 for Jupyter)
- Spawns a Jupyter server with security disabled for local use
- Proxies
/api,/files, and/lsproutes to Jupyter - Serves the Next.js frontend application
- Opens
http://localhost:PORT/treein your browser
Routes available:
/tree- File browser/notebooks- Notebook viewer/edit- File editor/terminals- Terminal interface/kernels- Kernel management
thesis exec
Execute AI agent instructions in non-interactive mode.
thesis exec [instructions] [options]Arguments:
[instructions]- Instructions for the agent (optional)
Options:
| Flag | Default | Description |
|---|---|---|
--model | gpt-4o | AI model to use |
--notebook-path | ./development.ipynb | Path to notebook file |
--mode | agent | Execution mode (agent, plan, ask) |
Examples:
# Basic execution
thesis exec "Analyze the data and create visualizations"
# With specific model and notebook
thesis exec "Process data" --model gpt-4o --notebook-path ./analysis.ipynb
# Plan mode for complex tasks
thesis exec "Create a machine learning pipeline" --mode planRequirement
Requires thesis serve running on port 4242.
thesis serve
Start the Thesis NestJS server for API operations.
thesis serveThis starts the backend server on port 4242 which handles chat operations and agent execution.
thesis auth
Manage authentication credentials.
thesis auth login
Configure your OpenAI API key (required for AI features).
thesis auth loginPrompts for your API key with masked input and stores it in your system config directory.
thesis auth view
View current authentication status.
thesis auth viewDisplays configured API keys (masked for security, showing only first 3 and last 4 characters).