Skip to main content

basemode-loom

Persistent branching exploration for LLM continuations.

basemode-loom lets you generate multiple continuations, navigate a tree of alternatives, and keep everything in a local SQLite store so you can resume later.

Install

pip install basemode-loom

Quickstart

# Create a new tree with 3 branches
basemode-loom run "The ship rounded the headland and" -n 3 -m gpt-4o-mini

# Open the interactive explorer
basemode-loom view

# Continue from selected branch
basemode-loom continue -b 2 -n 3

Core Commands

basemode-loom --help
basemode-loom view --help
basemode-loom run --help
basemode-loom continue --help
basemode-loom stats --help
basemode-loom serve --help

Useful commands:

  • basemode-loom view: interactive TUI tree explorer
  • basemode-loom run: create a new tree from a prompt
  • basemode-loom continue: branch from current/selected node
  • basemode-loom nodes|active|show|children: inspect stored trees
  • basemode-loom stats: analyze tree depth/branching/model usage
  • basemode-loom export|import: move trees in/out as JSON/Markdown
  • basemode-loom serve: run REST/WebSocket API for frontend usage

Chat

basemode-loom chat is a plain chat on the same tree structure: turns are nodes, and asking several models (or several samples) gives sibling replies.

basemode-loom chat "pick a scottish island" -s "be terse"
basemode-loom chat -c "how many people live there?" -m claude-haiku-4-5 -m groq/openai/gpt-oss-120b
basemode-loom chat -c -b 2      # carry on from the second reply
basemode-loom chat -l           # list chats; resume one with `chat -r ID "..."`

Chats live in their own chats.sqlite, separate from loom trees.

The TUI tree picker (Tab) supports live metadata filtering, category/domain/ source/model facets, ID lookup, FTS5 keyword search, and semantic search when the selected database contains a compatible vector index.

Keyword search needs an FTS5 index. Corpora may ship with one; build it for any loom or chat database with basemode-loom index [--db PATH] [--incremental].

Guardian Angel corpora use the optional MLX search dependencies:

pip install 'basemode-loom[embed-mlx]'
basemode-loom view --db /path/to/corpus.sqlite

Press / in the tree picker, enter a query, and press Enter to rank matching trees. Build or update an embedding index directly with:

basemode-loom embed --db /path/to/corpus.sqlite --model mlx
basemode-loom embed --db /path/to/corpus.sqlite --model mlx --incremental

The MLX model is downloaded lazily on first use. Embedding dependencies remain isolated in the optional embed and embed-mlx installation extras.

Model Selection

  • TUI model picker is available via m.
  • Picker can consume verified model metadata from basemode when available.
  • Session state supports model-plan metadata for multi-model generation workflows.
  • Force OpenRouter passthrough for new/unknown IDs with -m "or:vendor/model" (or openrouter:vendor/model), e.g. -m "or:moonshotai/kimi-k2.6".

Storage

By default, data is stored in a local SQLite DB under your user data directory. Use --db /path/to/file.sqlite to choose a custom location.

Basemode records content-free provider call outcomes locally. Loom identifies those calls using only its application name and installed version; prompts, generated text, tree and node identifiers, flags, and edits are not included. Any public contribution is explicitly controlled and previewed through basemode contribute, not through a Loom corpus exporter.

Docs

Project docs live in docs/ (MkDocs):

make docs
make docs-serve

Then open http://localhost:8001.

Metadata

Release files for basemode-loom 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for basemode-loom 0.8.2
File Size Uploaded
basemode_loom-0.8.2.tar.gz 491.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for basemode-loom 0.8.2
File Interpreter ABI Platform
basemode_loom-0.8.2-py3-none-any.whl Python 3 none any Details

Total release size: 652.0 kB

Release files / basemode_loom-0.8.2.tar.gz

Download URL basemode_loom-0.8.2.tar.gz
Size 491.3 kB
Tags Source
SHA-256 checksum
How to use checksums
84440cf3c12e08b675b74d4e149f5d8c5e4210208e7d5ba10d3c07d26b664574
BLAKE2b-256 checksum
How to use checksums
426db77fa8dc319e46aa9dd8b4def5799697f4a291ce676a9e5e49dab3d8b5b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / basemode_loom-0.8.2-py3-none-any.whl

Download URL basemode_loom-0.8.2-py3-none-any.whl
Size 160.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32d482ab44fa3c1ebc6073a784092edd6636ed50cc3b86f6ca06642d52fceca4
BLAKE2b-256 checksum
How to use checksums
cfdebddb0904d5b82e831063269bd17e464f26988d0b333f360186c614c05046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.8.3

2 release files

This release

0.8.2 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.13

2 release files

0.7.12

2 release files

0.7.10

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.6.0

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page