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.3

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.3
File Size Uploaded
basemode_loom-0.8.3.tar.gz 491.3 kB Details

Built distribution (wheel)

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

Total release size: 652.0 kB

Release files / basemode_loom-0.8.3.tar.gz

Download URL basemode_loom-0.8.3.tar.gz
Size 491.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f128a9470c3354f71048a3af14c3f1d462059ebba3adb8087ab645d455ace986
BLAKE2b-256 checksum
How to use checksums
b8d740c8be1f40048b37cc14cc7aca5830a89ed50a13a912f5789321d022499c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.3-py3-none-any.whl

Download URL basemode_loom-0.8.3-py3-none-any.whl
Size 160.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d03b05e9b0382bae8e42033dd9a97f9a1ac48ac0d7ffd3db52ff1597470370e
BLAKE2b-256 checksum
How to use checksums
245ae4a8080d50f407163f3c66fdf96f07ad9fa77475f83857e5fbca1d4c5c0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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

This release

0.8.3 This release

2 release files

0.8.2

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