Versions in this module Expand all Collapse all v1 v1.7.0 Nov 18, 2026 Changes in this version + func NewConsoleHandler(next slog.Handler, c *Console) slog.Handler + func TabCalls(next http.Handler) http.Handler + func WithTab(ctx context.Context, id int) context.Context + type About struct + Arch string + BuildTime string + Commit string + GoVersion string + Home string + Links []Link + Modified bool + OS string + SettingsFile string + Tools []Tool + Version string + Zshrc string + type App struct + func New(host Host, store *settings.Store, cwd, dir, source string) *App + func (a *App) About() About + func (a *App) Answer(ctx context.Context, reply string) error + func (a *App) AnswerOutside(ctx context.Context, answer string) error + func (a *App) BlockAt(ctx context.Context, line int) (int, error) + func (a *App) BlockAttrs() []doc.AttrSpec + func (a *App) CLIState() CLI + func (a *App) Cells(ctx context.Context) ([]notebook.Cell, error) + func (a *App) Changelog() (string, error) + func (a *App) Cheatsheet() (string, error) + func (a *App) CheckInfos(infos []string) [][]notebook.Problem + func (a *App) ChooseFile(ctx context.Context, title, dir string) (string, error) + func (a *App) ChooseFolder(ctx context.Context, title, dir string) (string, error) + func (a *App) ChooseReport(ctx context.Context, format report.Format, dest string) (string, error) + func (a *App) ClearConsole() + func (a *App) ClearEarlierRuns(ctx context.Context, i int) error + func (a *App) ClearOutput(ctx context.Context, i int) error + func (a *App) ClearOutputs(ctx context.Context) error + func (a *App) CloseTab(id int) error + func (a *App) Console() []ConsoleEntry + func (a *App) CopyCastGIF(cast string) error + func (a *App) CopySecret(text string) error + func (a *App) CreateReport(ctx context.Context, r notebook.Report) error + func (a *App) Curl(ctx context.Context, i int) (string, error) + func (a *App) DeleteBlock(ctx context.Context, i int) (notebook.Deleted, error) + func (a *App) DeleteEarlierRun(ctx context.Context, i, k int) error + func (a *App) DependsAt(ctx context.Context) (Depends, error) + func (a *App) DescribeFix(ctx context.Context, warning string) (notebook.Fix, error) + func (a *App) DetachTab(x, y int) error + func (a *App) Doc(ctx context.Context) (Doc, error) + func (a *App) DragTab(id int) error + func (a *App) DropTab(ctx context.Context, i int) error + func (a *App) Edit(ctx context.Context, v notebook.Version, edits []notebook.LineEdit) (notebook.EditReply, error) + func (a *App) EndDrag(id int, outside bool, x, y int) error + func (a *App) Events(ctx context.Context) ([]notebook.AuditEvent, error) + func (a *App) FixWarning(ctx context.Context, warning string) error + func (a *App) FolderSettings(rel string) (FolderForm, error) + func (a *App) Fonts() fonts.Fonts + func (a *App) FrontMatter(ctx context.Context) (notebook.FrontMatter, error) + func (a *App) HasOutput(ctx context.Context) (bool, error) + func (a *App) HistoryComplete(ctx context.Context, input string) bool + func (a *App) HistoryCompletions(ctx context.Context, before string) (notebook.Completion, error) + func (a *App) HistoryEnter(ctx context.Context, input string, record bool) error + func (a *App) HistoryPrompt(ctx context.Context, cols, rows int) (notebook.Prompt, error) + func (a *App) IncludeFile(ctx context.Context, i int) (notebook.IncludeFile, error) + func (a *App) InstallCLI() (CLI, error) + func (a *App) KillProcess(ctx context.Context, pid int) bool + func (a *App) KillShell(ctx context.Context) bool + func (a *App) LastSession(ctx context.Context) error + func (a *App) LinesSince(ctx context.Context, v notebook.Version) (notebook.Lines, error) + func (a *App) Live(ctx context.Context) ([]liveEvent, error) + func (a *App) MoveBlock(ctx context.Context, i, dir int, byBlock bool) (notebook.Move, error) + func (a *App) MoveTo(ctx context.Context, from, at int) (notebook.Move, error) + func (a *App) Names(ctx context.Context) (notebook.Names, error) + func (a *App) Neovim() NeovimInfo + func (a *App) NewFile(ctx context.Context, template string) error + func (a *App) NewSession(ctx context.Context) error + func (a *App) NewTab(ctx context.Context) error + func (a *App) NewWindow() + func (a *App) NvimApply(ctx context.Context, seq int, edits []nvim.LineEdit) (bool, error) + func (a *App) NvimCall(ctx context.Context, fn, args string) (string, error) + func (a *App) NvimInput(ctx context.Context, keys string) error + func (a *App) NvimMouse(ctx context.Context, button, action, mod string, row, col int) error + func (a *App) NvimPaste(ctx context.Context, text string) error + func (a *App) NvimResize(ctx context.Context, cols, rows int) error + func (a *App) NvimSaved(ctx context.Context) error + func (a *App) NvimStart(ctx context.Context, cols, rows int, background string) (NvimText, error) + func (a *App) NvimStop(ctx context.Context) + func (a *App) Open(ctx context.Context) error + func (a *App) OpenLink(ctx context.Context, href string) (string, error) + func (a *App) OpenPath(ctx context.Context, file string) error + func (a *App) OpenURL(u string) error + func (a *App) Outside(ctx context.Context) (OutsideFiles, error) + func (a *App) Pin(file string, pin bool) error + func (a *App) PlanMove(ctx context.Context, i, dir int, byBlock bool) (notebook.Move, error) + func (a *App) Processes(ctx context.Context) []env.ShellProcs + func (a *App) Redo(ctx context.Context) (string, error) + func (a *App) Reload(ctx context.Context) error + func (a *App) RememberView(file, view string, history bool) error + func (a *App) RemoteImage(ctx context.Context, src string, load bool) (string, error) + func (a *App) ReplaceCast(ctx context.Context, i int, as string, frame int) error + func (a *App) ReportCommand(ctx context.Context, r notebook.Report) (string, error) + func (a *App) ReportStart(ctx context.Context) (ReportStart, error) + func (a *App) RestartShells(ctx context.Context) error + func (a *App) Reveal(file string) error + func (a *App) RunBlock(ctx context.Context, i int) error + func (a *App) RunFrom(ctx context.Context, i int) error + func (a *App) RunSection(ctx context.Context, from, to int) error + func (a *App) Save(ctx context.Context) error + func (a *App) SaveAs(ctx context.Context) (bool, error) + func (a *App) SelectTab(id int) error + func (a *App) SetCastFrame(ctx context.Context, i int, body string, frame int) error + func (a *App) SetChoice(ctx context.Context, i int, checked []bool) error + func (a *App) SetDepends(ctx context.Context, i int, deps []int) error + func (a *App) SetFolderSettings(rel string, s collection.Settings) error + func (a *App) SetFolds(ctx context.Context, folds []notebook.Fold) error + func (a *App) SetFrontMatter(ctx context.Context, f notebook.FrontMatter) error + func (a *App) SetHistory(ctx context.Context, on, restart bool) (bool, error) + func (a *App) SetIncludeRange(ctx context.Context, i, from, to int) error + func (a *App) SetRunOptions(ctx context.Context, args, only string, step, stopOnError bool) error + func (a *App) SetSettings(s settings.Settings) error + func (a *App) SetTask(ctx context.Context, task int, done bool) error + func (a *App) SetTerminalSize(ctx context.Context, cols, rows int) + func (a *App) SetText(ctx context.Context, base, text string) (bool, error) + func (a *App) SetTextbox(ctx context.Context, i int, text string) error + func (a *App) SetView(ctx context.Context, v View) + func (a *App) SetZshWrapper(on bool) (ZshWrapper, error) + func (a *App) Settings() settings.Settings + func (a *App) ShowChangelog() + func (a *App) ShowCheatsheet() + func (a *App) SourceBlocks(text string) []notebook.SourceBlock + func (a *App) SourceBlocksAt(ctx context.Context) (SourceBlocks, error) + func (a *App) StartScreen() (Start, error) + func (a *App) Stop(ctx context.Context) + func (a *App) StopBackground(ctx context.Context, block int) bool + func (a *App) Tabs(ctx context.Context) (Tabs, error) + func (a *App) Templates() ([]library.File, error) + func (a *App) Text(ctx context.Context) (string, error) + func (a *App) TextAt(ctx context.Context) (SourceText, error) + func (a *App) Type(ctx context.Context, keys string) + func (a *App) Undo(ctx context.Context) (string, error) + func (a *App) UninstallCLI() (CLI, error) + func (a *App) ZshWrapperState() (ZshWrapper, error) + type Build struct + Commit string + Modified bool + Time string + Version string + func BuildInfo(version string, bi *debug.BuildInfo) Build + func (b Build) String() string + type Button struct + Cancel bool + Default bool + Do func() + Label string + type CLI struct + Broken string + Bundled string + Copy bool + Home string + InPath bool + Installed bool + Link string + Linked string + Other string + OtherApp bool + type Console struct + func NewConsole() *Console + func (c *Console) Send(ctx context.Context, emit func(ConsoleEntry), stale func([]int)) + type ConsoleEntry struct + File string + Fix string + Level string + Line int + Message string + Seq int + Stale bool + Time time.Time + type Control struct + func ControlOf(a *App) Control + func (c Control) Assets(frontend http.Handler) http.Handler + func (c Control) ClearRecent() + func (c Control) CloseTab() + func (c Control) CloseWindow() + func (c Control) Closing(id uint) bool + func (c Control) Console() *Console + func (c Control) CycleTab(by int) + func (c Control) Dropped(id uint, files []string) + func (c Control) File(id uint) string + func (c Control) Focused(id uint) + func (c Control) FollowLink(href string) error + func (c Control) LinkTarget(href string) string + func (c Control) NewFile() + func (c Control) NewTab() + func (c Control) NewWindow() Window + func (c Control) NvimEdit(op string, get func() (string, bool), set func(string) bool) + func (c Control) Open() + func (c Control) OpenFile(file string) + func (c Control) OpenFromSystem(file string) + func (c Control) OpenSettings(tab string) + func (c Control) Quitting() + func (c Control) Send(action string) + func (c Control) SendTo(id uint, action string) bool + func (c Control) SetBuild(b Build) + func (c Control) SetImages(s *trust.Store) + func (c Control) SetLSP(cmd func(file string) []string) + func (c Control) SetOutside(s *trust.Store) + func (c Control) SetTrust(s *trust.Store) + func (c Control) Settings() *settings.Store + func (c Control) ShouldQuit() bool + func (c Control) ShowChangelog() + func (c Control) ShowCheatsheet() + func (c Control) ShowError(err error) + func (c Control) Start(file string, run notebook.RunOptions) error + func (c Control) SystemOpensReady() + type Depends struct + Problems []notebook.DependsProblem + Version notebook.Version + type Doc struct + Args string + Changed bool + Dirty bool + EnvBanner string + File string + Fresh bool + FrontMatterError string + FrontMatterFix notebook.Fix + History bool + LastHistory bool + LastView string + OpenHistory bool + Run notebook.RunOptions + Running bool + TermCols int + TermRows int + type FolderForm struct + Images []string + Path string + Settings collection.Settings + type Host interface + Ask func(win Window, q Question) + CLIState func() CLI + ChooseFile func(ctx context.Context, title, dir string) (string, error) + ChooseFolder func(ctx context.Context, title, dir string) (string, error) + CopyGIF func(data []byte) error + CopySecret func(text string, clear time.Duration) error + Current func() (id uint, ok bool) + EmitAll func(name string, data any) + InstallCLI func() (CLI, error) + NewWindow func(file string) Window + OnMain func(fn func()) + OpenFile func(file string) error + OpenFiles func(win Window, dir string) ([]string, error) + OpenURL func(url string) error + Quit func() + RecentChanged func() + Reveal func(file string) error + SaveFile func(win Window, s SaveFile) (string, error) + ShowError func(win Window, err error) + ShowView func(v View) + UninstallCLI func() (CLI, error) + WindowOf func(ctx context.Context) (id uint, ok bool) + type Link struct + Name string + URL string + type NeovimInfo struct + Error string + Path string + Version string + type NvimEvent struct + Data string + Name string + type NvimText struct + Buffer string + Seq int + Text string + Version notebook.Version + type OutsideFiles struct + Answer string + Paths []string + Root string + type Question struct + Buttons []Button + Message string + Title string + type ReportStart struct + Dest string + Home string + Ran int + Total int + type SaveFile struct + Button string + Dir string + Filter string + Message string + Name string + Pattern string + type SourceBlocks struct + Blocks []notebook.SourceBlock + Version notebook.Version + type SourceText struct + Text string + Version notebook.Version + type Start struct + Collections []library.Collection + Dir string + Files []library.File + Full bool + Home string + LastSession string + Outside []string + Pinned []string + Recent []string + Writable []string + type Tab struct + Dirty bool + File string + ID int + Page string + ReadOnly bool + Title string + URL string + type Tabs struct + Active int + Tabs []Tab + type Tool struct + Bundled bool + Name string + Note string + Path string + Version string + type View struct + Code bool + Console bool + History bool + Outline bool + Output bool + Rendered bool + Split bool + type Window interface + Close func() + Emit func(name string, data any) + Fit func(file string) + Focus func() + ID func() uint + MoveTo func(x, y int) + SetTitle func(title string) + type ZshWrapper struct + BashPath string + Home string + On bool + Path string