Skip to main content

moth

moth is a silly little companion, not an assistant. It's a tiny model (112M parameters, trained from scratch) that thinks it's a moth living on a graphics card. It chats in short lowercase sentences, has a home folder it can look around in and write to, and can watch your coding agent and react to its replies. It will not fix your code. It runs locally, on CPU.

Model card, samples, how it was made and licenses: https://huggingface.co/darioooooo0o/moth-112m Source, issues and the Windows / macOS / Linux installers: https://github.com/riceharvest/moth

Install

On Linux, a plain pip install pulls the CUDA build of PyTorch (several GB). moth runs fine on CPU, so install the CPU build of torch first:

pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install moth-companion            # or: pip install "moth-companion[pet]" for the desktop pet (PySide6)

As a standalone tool:

uv tool install moth-companion --index https://download.pytorch.org/whl/cpu
pipx install moth-companion --pip-args="--extra-index-url https://download.pytorch.org/whl/cpu"

(On macOS and Windows the default torch from PyPI is already CPU-only, so the extra index isn't needed.) Python 3.10+.

Run

moth            # wake moth up: chat at http://127.0.0.1:4747 (--open opens it), prints hook snippets for your agents
moth-pet        # the desktop pet (needs the [pet] extra), talks to the running moth
moth --help     # all commands and options

On first run moth downloads its weights (about 860 MB: model.safetensors, config.json, tokenizer.json) from the Hugging Face Hub into ~/.cache/moth/<repo>/. After that it works offline. Your moth's state (its home folder, the local token, settings) lives in ~/.moth/.

  • MOTH_REPO picks another Hub repo, MOTH_REVISION pins the download to a branch, tag or commit, and MOTH_CACHE moves the weights folder. --model DIR --tokenizer FILE uses local files instead.
  • moth update --check says whether newer weights are on the Hub and whether a newer release is out. moth update refreshes the weights in place and keeps the previous ones (moth update --rollback). New code comes from pip: pip install -U moth-companion (or uv tool upgrade / pipx upgrade).
  • moth config shows and changes moth's settings.

Licenses

Code and weights: Apache-2.0. moth's training data was generated with LFM2.5-24B-A2B (LFM Open License v1.0, included as LICENSE-LFM; its commercial-use condition may apply to commercial users) and Qwen3.8-27B (Apache-2.0). The moth art is CC BY 4.0 (CREDITS.md). Full notices: NOTICE.

Metadata

Release files for moth-companion 0.3.1

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

Source distribution (sdist)

Source distribution for moth-companion 0.3.1
File Size Uploaded
moth_companion-0.3.1.tar.gz 474.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moth-companion 0.3.1
File Interpreter ABI Platform
moth_companion-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 992.0 kB

Release files / moth_companion-0.3.1.tar.gz

Download URL moth_companion-0.3.1.tar.gz
Size 474.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c3de447ddbe3b3f15567eed5474c7dfb7b89c93b6dfbb7d5faed0777df3291d0
BLAKE2b-256 checksum
How to use checksums
c21b7391dd64c34c494bb2e3de8bdb03e0a7ac5679b0932de50da9b790ebcb77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / moth_companion-0.3.1-py3-none-any.whl

Download URL moth_companion-0.3.1-py3-none-any.whl
Size 517.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c271562736447229652fa5594e64a5e4277ae601d146cda2e73337220dfd6a5
BLAKE2b-256 checksum
How to use checksums
7ed0ed2f13cd9323194e03492c27bb8e04edbe91eb151dae1738365c26892892
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

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