Skip to main content

Search engine for your files!

Project description

Cosma

Version Discord

Cosma Logo

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cosma-0.8.8.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cosma-0.8.8-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file cosma-0.8.8.tar.gz.

File metadata

  • Download URL: cosma-0.8.8.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosma-0.8.8.tar.gz
Algorithm Hash digest
SHA256 261791efb247270405e41d87955f4bc1d61c8b756859f831e8ba6dd0c827d4fd
MD5 ef0a7f4794f5dde624037ba70b1ed78f
BLAKE2b-256 d717d9ab7c44d329d16b9dda2ee352500b2c964447be00ac3708b34c60d2d502

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosma-0.8.8.tar.gz:

Publisher: release.yml on cosmasense/cosma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosma-0.8.8-py3-none-any.whl.

File metadata

  • Download URL: cosma-0.8.8-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosma-0.8.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c832525ef3b9ab85df8b90c90424d64cc08216c095a5c07bbc0dcfcef46cbaa4
MD5 a152fd45d03640a35868b1a4e1e2029a
BLAKE2b-256 d224ae877a1fb3157267943792f23f583fbcd2b93a7a60317bea54ddd66e174d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosma-0.8.8-py3-none-any.whl:

Publisher: release.yml on cosmasense/cosma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page