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

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.0
File Size Uploaded
moth_companion-0.3.0.tar.gz 515.5 kB Details

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / moth_companion-0.3.0.tar.gz

Download URL moth_companion-0.3.0.tar.gz
Size 515.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f61c56d754ec32bcc5fed2cb397c3290a18d005c762ad4890cb8951c3d3bef0a
BLAKE2b-256 checksum
How to use checksums
8f796f8c03a25417f5ad7641cf36813a44cfb6f7bf0d07644720faf17f0095f6
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.0-py3-none-any.whl

Download URL moth_companion-0.3.0-py3-none-any.whl
Size 563.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2215e234cec7ca4dfb5e7e62beef7b30e8b1de31fbf6cc4ef2ccb55930623b7e
BLAKE2b-256 checksum
How to use checksums
6dcc7fa81847634e409f27bba0dbb5d13043b8a933a31b3fc6799c8897f2cb6b
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

0.3.1

2 release files

This release

0.3.0 This release

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