Skip to main content

panopticas

Discover insights into the types of data and functions used in your code.

Inspired by tools like enry and linguist

Features: language detector and metadata identifiers, based on the filename extension, filename details and the shebang line. Detects build configurations, dependency manifests, CI pipeline files, AI coding agent artifacts, and binary file types.

The official documentation can be found at panopticas.io

Installation

pip install panopticas

Requires Python 3.12 or later.

Usage

The examples below cover the common cases. For every command, every option and the JSON shape each one emits, see the CLI reference.

Change into the directory you want to check the file types of and then run:

panopticas assess

assess respects .gitignore. Two options change what it reports:

panopticas assess -unknown        # only files whose language could not be identified
panopticas assess --lines         # include a line count for each file

To check a single file and get some metadata:

panopticas file FILENAME

To find URLs in files:

panopticas urls /path/to/directory
panopticas urls /path/to/directory -all-files   # include gitignored files

AI coding agent detection

Panopticas identifies the file and directory artifacts left by AI coding agents, and tags each one with three tags: AI, the product brand, and the kind of artifact.

CLAUDE.md                       -> AI, Claude, instructions
.cursor/rules/style.mdc         -> AI, Cursor, rules
.github/copilot-instructions.md -> GitHub, Git, AI, Copilot, instructions

Detection is path-based only — no file is opened to determine AI metadata.

panopticas ai
panopticas ai /path/to/directory
panopticas ai --all-files   # include gitignored files and bare AI directories

The command lists each artifact with its product and kind, then summarises which AI products the repository uses. See the AI detection rules reference for the full inventory, the source that confirms each convention, and the candidates that were investigated and rejected.

Vocabularies

Three commands print the vocabularies panopticas works with. The tag list is derived from the detection rules themselves, so it cannot drift from what the tool actually assigns.

panopticas tags        # every tag panopticas can assign to a file
panopticas languages   # every language it recognises
panopticas filetypes   # every file type, languages or not

JSON output

Every command accepts --json (also spelled -json). In JSON mode stdout carries only the document — progress messages go to stderr — so output can be piped safely:

panopticas assess --json | jq '.files[] | select(.language == "Python")'
panopticas ai --json | jq '.products'

Development

If you want to check out the panopticas repo and work on bug fixes, use the pip "editable" install:

pip install -e .

Running Tests

pytest -v

Relationship to kospex

Panopticas is a dependency of kospex, which uses it for file type detection and metadata extraction during repository sync. Tags are stored in the kospex database, so adding a tag is safe but renaming or removing one is a breaking change.

Changelog

See CHANGELOG.md for version history.

License

MIT

Metadata

Release files for panopticas 0.0.20

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

Source distribution (sdist)

Source distribution for panopticas 0.0.20
File Size Uploaded
panopticas-0.0.20.tar.gz 43.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for panopticas 0.0.20
File Interpreter ABI Platform
panopticas-0.0.20-py3-none-any.whl Python 3 none any Details

Total release size: 66.3 kB

Release files / panopticas-0.0.20.tar.gz

Download URL panopticas-0.0.20.tar.gz
Size 43.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7854b385c6d5cce65e88c06272ed974b6962263db843046a8ff8ffd6faeccdf3
BLAKE2b-256 checksum
How to use checksums
dbc443e5171317e72a5014536d4ff2ff2ce46809f2f48f020ec614495bef4b21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / panopticas-0.0.20-py3-none-any.whl

Download URL panopticas-0.0.20-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b05f5f476dd1d6a4e85820429de0180271843d343cf78f5517a0eb2a174992cd
BLAKE2b-256 checksum
How to use checksums
3fc4cb9b49ca76e78b45e01043741cfad3c5a2d94a3ecc032161980c6131bd70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.0.21

2 release files

This release

0.0.20 This release

2 release files

0.0.19

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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