Cosma
Search engine for your files!
Use it yourself or plug it into your agents. Comes with a CLI, TUI, and macOS app.
How It Works
Choose which directories to index, and Cosma will process all files in those directories into a search-optimized index. It'll also watch for changes to keep the index updated.
After files are indexed, you can search for them with natural language! Cosma uses vector-powered search to find files quickly and easily.
Cosma can run 100% locally or in the cloud.
Get Started
Cosma has been tested on MacOS ARM and Windows. Linux support is in progress.
Installing
Cosma can be downloaded from PyPI.
The installation commands below use uvx.sh to install Cosma
via uv. If you prefer using uv directly,
use uv tool install cosma.
MacOS/Linux
curl -LsSf uvx.sh/cosma/install.sh | sh
Windows
powershell -ExecutionPolicy ByPass -c "irm https://uvx.sh/cosma/install.ps1 | iex"
Upgrading
To upgrade to the latest version:
uv tool upgrade cosma --no-cache
Running
Backend
Make sure you have Ollama installed.
Cosma has a backend to serve search queries, so it must be started first. This needs to always be running to watch for file changes and process files in the background. For persistent use, consider running this as a background process or configure it as a system service.
cosma serve
[!IMPORTANT]
The backend must be running for the following commands to work (see above).
CLI
Cosma includes a CLI with three output modes:
- default - Rich formatted output with colors and tables for interactive use
--plain- Simple text output without colors, for piping and scripts--json- Structured JSON output for agents and programmatic access
cosma search "my query" # Search indexed files
cosma index /path/to/dir # Index a directory
cosma status # Check backend status
cosma watch add /path/to/dir # Watch directory for changes
cosma files stats # Get file statistics
Run cosma --help for all commands.
TUI
Cosma also comes with a terminal UI (TUI).
cosma tui /path/to/directory/to/search
[!WARNING] This will begin processing all files in the directory specified, which will take some time if running locally.
Contributing
Cosma is open source, and we'd love to have you contribute! Please feel free to open an issue or pull request with code changes, or join our Discord. We'll have documentation for how best to contribute soon!
Metadata
Release files for cosma 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cosma-1.2.1.tar.gz | 13.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cosma-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.5 kB
Release files / cosma-1.2.1.tar.gz
| Download URL | cosma-1.2.1.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b1bea89bf4c692f87787ea39a755a1ed781cd52c03d58f97aa9d643951d36c8
|
|
BLAKE2b-256 checksum How to use checksums |
459c9e27377764a7722eefb59f0b09bc065b69cbaf8dc8640d9d50cb2fd58e3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 19, 2026.
Transparency logRelease files / cosma-1.2.1-py3-none-any.whl
| Download URL | cosma-1.2.1-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8bba022a2fecd25c638da3d728c3df25882d6ffd57a66ad5183222292753b06
|
|
BLAKE2b-256 checksum How to use checksums |
8f8b581c93e27a1d45aa471ef744f03f5ec664b4d0f8ea40d40cdca1b0d1a3d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 19, 2026.
Transparency logSecurity for cosma 1.2.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cosma-1.2.1.tar.gz
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 May 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.