Skip to main content

cosmo-file

Cross-platform file(1) command built with Cosmopolitan libc, distributed as a Python package.

Installation

pip install cosmo-file

Usage

Command Line

cosmo-file document.pdf
cosmo-file --version
echo "#!/bin/bash" | cosmo-file -

Python API

import cosmo_file

result = cosmo_file.run('image.png')
print(result.stdout.decode())

Features

  • Single universal binary runs on Windows, macOS, and Linux
  • No external dependencies
  • Python 3.8+ compatible
  • Supports all file command options

Platforms

  • Windows x64
  • macOS x86_64 / ARM64
  • Linux x86_64 / ARM64

Building from Source

Requires cosmocc:

./scripts/build_file_com.sh
pip install -e .

License

MIT (Python packaging) - See LICENSE

The bundled file utility is from file/file - See COPYING

Metadata

Release files for cosmo-file 5.46.6

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

Built distributions (wheels)

Table of built distributions (wheels) for cosmo-file 5.46.6
File Actions
cosmo_file-5.46.6-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for cosmo_file-5.46.6-py3-none-win_amd64.whl
cosmo_file-5.46.6-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for cosmo_file-5.46.6-py3-none-manylinux_2_17_x86_64.whl
cosmo_file-5.46.6-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for cosmo_file-5.46.6-py3-none-manylinux_2_17_aarch64.whl
cosmo_file-5.46.6-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for cosmo_file-5.46.6-py3-none-macosx_11_0_arm64.whl
cosmo_file-5.46.6-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details for cosmo_file-5.46.6-py3-none-macosx_10_9_x86_64.whl

Total release size: 6.6 MB

Release files / cosmo_file-5.46.6-py3-none-win_amd64.whl

Download URL cosmo_file-5.46.6-py3-none-win_amd64.whl
Size 1.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f4fc7dbbf3d152c7695cb1f3041d44779938637d9c86d99c75e67a663043e35e
BLAKE2b-256 checksum
How to use checksums
28fa0c9f90fd9869f68374fe8770293b890502c5a73c4816d3438adeecc41933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 7, 2026.

Transparency log

Release files / cosmo_file-5.46.6-py3-none-manylinux_2_17_x86_64.whl

Download URL cosmo_file-5.46.6-py3-none-manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b5950947c9e036cd0511d569fd6ae66341cd329e75b9bda6c094cb1b30fa20e5
BLAKE2b-256 checksum
How to use checksums
432d9f66ff96289e8ef013e3f073b378e16a950e7048c548c281690cfcccf8c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 7, 2026.

Transparency log

Release files / cosmo_file-5.46.6-py3-none-manylinux_2_17_aarch64.whl

Download URL cosmo_file-5.46.6-py3-none-manylinux_2_17_aarch64.whl
Size 1.5 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ef696239c7912ffdc9b0fb60ae2ed97d2596ccab41f504480daead2421ea65e2
BLAKE2b-256 checksum
How to use checksums
21610fac22cac91d91548eb7a167a8491015e5529c3c561141416dfb216abb74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 7, 2026.

Transparency log

Release files / cosmo_file-5.46.6-py3-none-macosx_11_0_arm64.whl

Download URL cosmo_file-5.46.6-py3-none-macosx_11_0_arm64.whl
Size 1.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8184c05b738da7de9af5a8a3aa84fa7a189b33464cda0663fbaa6991f5784c1a
BLAKE2b-256 checksum
How to use checksums
08a6a1508a930256988ec4544aeb7a6f94780d03ec22c233f587a71271512c2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 7, 2026.

Transparency log

Release files / cosmo_file-5.46.6-py3-none-macosx_10_9_x86_64.whl

Download URL cosmo_file-5.46.6-py3-none-macosx_10_9_x86_64.whl
Size 1.2 MB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
0f73e933d121e83f30bad8536dc634e3985ab4ef2e61a47062a221216051395f
BLAKE2b-256 checksum
How to use checksums
5b45dc835bd5dc0c03677eeeeb65ebad81d07eba6585a285882ab893ee10a9d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 7, 2026.

Transparency log

Security for cosmo-file 5.46.6

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 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for cosmo_file-5.46.6-py3-none-win_amd64.whl

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 7, 2026.

Transparency log

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

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