Core

CLI Reference

Complete reference for the Thesis command-line interface.

Installation

npm install -g @thesis/cli

Or with Bun:

bun install -g @thesis/cli

thesis notebook

Launch the Thesis scientific notebook web viewer. This is the default command when you run thesis without arguments.

thesis notebook

What it does:

  1. Finds available ports (starting from 8888 for app, 8898 for Jupyter)
  2. Spawns a Jupyter server with security disabled for local use
  3. Proxies /api, /files, and /lsp routes to Jupyter
  4. Serves the Next.js frontend application
  5. Opens http://localhost:PORT/tree in 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:

FlagDefaultDescription
--modelgpt-4oAI model to use
--notebook-path./development.ipynbPath to notebook file
--modeagentExecution 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 plan

Requirement

Requires thesis serve running on port 4242.

thesis serve

Start the Thesis NestJS server for API operations.

thesis serve

This 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 login

Prompts for your API key with masked input and stores it in your system config directory.

thesis auth view

View current authentication status.

thesis auth view

Displays configured API keys (masked for security, showing only first 3 and last 4 characters).