dircue 1.0.1__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dircue/__init__.py ADDED
@@ -0,0 +1,37 @@
1
+ """Locate and run the bundled dircue executable without downloading anything."""
2
+ import errno
3
+ import os
4
+ import subprocess
5
+ import sys
6
+
7
+
8
+ def get_binary_path():
9
+ return os.path.join(os.path.dirname(os.path.abspath(__file__)), "bin", 'dircue.exe')
10
+
11
+
12
+ def main():
13
+ binary = get_binary_path()
14
+ # Pass the invoking script's basename as argv[0] when it is "dirq" so the
15
+ # Go binary can show the right display name; otherwise keep the binary path.
16
+ script = os.path.basename(os.path.splitext(sys.argv[0])[0])
17
+ if sys.platform == "win32":
18
+ script = script.lower()
19
+ argv0 = script if script == "dirq" else binary
20
+ try:
21
+ if sys.platform == "win32":
22
+ # Separate executable from command line so argv[0] can differ from
23
+ # the binary path when the "dirq" console script is invoked.
24
+ popen_args = [argv0, *sys.argv[1:]]
25
+ child = (subprocess.Popen(popen_args, executable=binary)
26
+ if argv0 != binary else subprocess.Popen(popen_args))
27
+ while True:
28
+ try:
29
+ raise SystemExit(child.wait())
30
+ except KeyboardInterrupt:
31
+ # The child shares the console and receives Ctrl-C itself.
32
+ # Keep its exit status instead of killing it or tracing here.
33
+ continue
34
+ os.execv(binary, [argv0, *sys.argv[1:]])
35
+ except OSError as error:
36
+ print("dircue: cannot execute bundled binary: " + str(error), file=sys.stderr)
37
+ raise SystemExit(127 if error.errno == errno.ENOENT else 126)
dircue/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from . import main
2
+
3
+ main()
dircue/bin/dircue.exe ADDED
Binary file
@@ -0,0 +1,367 @@
1
+ Metadata-Version: 2.4
2
+ Name: dircue
3
+ Version: 1.0.1
4
+ Summary: Profile source code repos and other directories of computer content.
5
+ Requires-Python: >=3.10
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ License-File: THIRD_PARTY_NOTICES.md
9
+ Project-URL: Source, https://github.com/war-and-code/dircue
10
+ Project-URL: Issues, https://github.com/war-and-code/dircue/issues
11
+ Description-Content-Type: text/markdown
12
+
13
+ # `dircue`
14
+
15
+ Profile source code repos and other directories of computer content.
16
+
17
+ If/when faced with an unfamiliar repository, you want to know what's in it: programming languages and projects, what gets built and deployed, what it exposes and depends on, and perhaps which deeper tools are worth running where. Answering *all that* usually means reading around willy-nilly and/or running *several* tools that each cover one "slice", like Linguist for languages, scc for line counts and Syft for packages.
18
+
19
+ `dircue map` answers *all that* in one deterministic, offline pass, without running anything in the directory. It conditionally reads a committed Git tree, or just the ordinary directory. Then it writes one portable document covering:
20
+
21
+ - **components:** projects from 36 component kinds, reported under 27 `ecosystem` values;
22
+ - **deployables:** containers, Compose, Kubernetes, Helm, Terraform, serverless and CI;
23
+ - **interfaces:** binaries, ports, gRPC and OpenAPI;
24
+ - **capabilities:** datastores, caches, messaging, auth and cloud SDKs;
25
+ - **relationships:** what builds, runs, depends on and contains what.
26
+
27
+ Every fact carries evidence identifying its source file and rule; a source span is included when the analyzer can locate one. Every question carries a coverage status. `complete` means exhaustive for its scope; anything heuristic says `partial` and why.
28
+
29
+ ![Meme: "You never know what is gonna come thru that door"](https://raw.githubusercontent.com/war-and-code/dircue/v1.0.1/docs/images/you-never-know.jpg)
30
+
31
+ `dircue` started as "just" a Linguist-compatible language profiler, and that's still a supported use case. `dirq` is a shorter alias for `dircue`.
32
+
33
+ The [design principles](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/DESIGN_PRINCIPLES.md) explain the trade-offs behind defaults, user control and evidence honesty. The [compatibility policy](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/COMPATIBILITY.md) says what stays stable across 1.x, and the [CHANGELOG](https://github.com/war-and-code/dircue/blob/v1.0.1/CHANGELOG.md) says what changed in each version.
34
+
35
+ ## Quick example
36
+
37
+ The summary for [GoogleCloudPlatform/microservices-demo](https://github.com/GoogleCloudPlatform/microservices-demo):
38
+
39
+ ```text
40
+ $ dircue map --summary .
41
+ Directory map: partial (git source)
42
+ Languages: Go 28.9%, Python 27.9%, HTML 10.0%, C# 8.1%, Shell 6.6%, Dockerfile 4.6% (+4 more)
43
+ Content populations: 5 Relationships: 187 Packages: 0
44
+ Relationship declarations: 12 runs, 13 builds
45
+ Components: 13 (dotnet 2, go 4, gradle 1, npm 2, python 4) (+1 test)
46
+ cartservice [dotnet]
47
+ checkoutservice [go]
48
+ emailservice [python]
49
+ frontend [go]
50
+ (+8 more components)
51
+ Deployables: 99 (+9 CI workflows, +49 cluster resources)
52
+ adservice [workload] → runs hipstershop
53
+ cartservice [workload] → runs cartservice
54
+ checkoutservice [workload] → runs checkoutservice
55
+ currencyservice [workload] → runs grpc-currency-service
56
+ (+37 more runnable deployables)
57
+ Interfaces: checkoutservice, frontend, grpc.health.v1.Health, grpc.health.v1.Health/Check (+33 more)
58
+ Capabilities: ai:llm-sdk, auth:oauth2, cache:redis, cloud:gcp (+7 more)
59
+ Possible next analyzers: bca, bifrost, scc, syft
60
+ Attached provider runs: 0
61
+ Still uncertain:
62
+ Analyzer coverage: no analyzer report attached
63
+ Capabilities: some service dependencies may be unrecognized
64
+ Components: some project declarations or references may be unresolved
65
+ Deployables: 1 Helm chart not rendered (templates require evaluation for complete coverage)
66
+ Interfaces: some entry points or contracts may be unrecognized
67
+ Packages: no complete package inventory is established
68
+ (+1 more questions)
69
+ Use --json for evidence and full coverage details.
70
+ ```
71
+
72
+ Common next steps:
73
+
74
+ ```sh
75
+ dircue map --json . > map.json # the full evidence graph (schema/map.schema.json)
76
+ dircue map --attach syft-json=sbom.json --json . > map.json # join saved Syft, SARIF, Noir or Bifrost reports
77
+ dircue map route --json map.json # inert follow-up plans for deeper analyzers
78
+ dircue map compare --format markdown base.json head.json # what changed between two maps
79
+ dircue map locate map.json results.sarif > located.sarif # which component owns each SARIF location
80
+ dircue map --forest /disk # nested repositories, dependency trees and the rest
81
+ ```
82
+
83
+ Attached reports add facts and run coverage to the map. The [map guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/MAP.md) documents the node and edge model, limits, source binding, attachments, comparison, routing and SARIF annotation.
84
+
85
+ Results against hand-written labels for seven repositories, which also informed map development, are in [GOLDEN.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/GOLDEN.md); Linguist and scc parity across 38 repositories is in the [atlas](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/atlas/README.md).
86
+
87
+ The classic Linguist-compatible output is unchanged. In a directory holding one small Go file:
88
+
89
+ ```sh
90
+ $ printf 'package main\n\nfunc main() {}\n' > main.go
91
+ $ dircue --json .
92
+ {"Go":{"size":29,"percentage":"100.00"}}
93
+ ```
94
+
95
+ Check the exit status before consuming stdout:
96
+
97
+ - Success exits `0` and writes JSON to stdout.
98
+ - Handled errors exit `1` with diagnostics on stderr.
99
+
100
+ ## Install
101
+
102
+ Each release has platform archives and Python wheels, which contain the same Go executable, plus a signed `SHA256SUMS` manifest. Check the [distribution guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/DISTRIBUTION.md) for each version's PyPI availability. There is no published container image.
103
+
104
+ ```sh
105
+ # Go toolchain (1.26.6 or later): installs the module at the release tag
106
+ go install github.com/war-and-code/dircue@v1.0.0 # dircue
107
+ go install github.com/war-and-code/dircue/cmd/dirq@v1.0.0 # dirq, the same program
108
+
109
+ # Release archive + checksum verification (Linux amd64 shown; substitute your platform)
110
+ curl -fsSL -O https://github.com/war-and-code/dircue/releases/download/v1.0.0/dircue_1.0.0_linux_amd64.tar.gz
111
+ curl -fsSL -O https://github.com/war-and-code/dircue/releases/download/v1.0.0/SHA256SUMS
112
+ sha256sum -c SHA256SUMS --ignore-missing
113
+ tar -xzf dircue_1.0.0_linux_amd64.tar.gz
114
+ mkdir -p "$HOME/.local/bin"
115
+ install -m 755 dircue "$HOME/.local/bin/dircue"
116
+ ln -sf dircue "$HOME/.local/bin/dirq" # the archive's dirq is this same link
117
+
118
+ # Python wheel via uv (offline-compatible; the launcher only invokes the bundled Go binary)
119
+ uvx --from \
120
+ https://github.com/war-and-code/dircue/releases/download/v1.0.0/dircue-1.0.0-py3-none-manylinux_2_17_x86_64.whl \
121
+ dircue map --summary /path/to/checkout # the wheel also installs dirq
122
+ ```
123
+
124
+ The [distribution guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/DISTRIBUTION.md) covers the full platform matrix, offline installation and building release archives locally. The optional structural worker is packaged separately; see the [worker guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/STRUCTURE.md#building-the-add-on).
125
+
126
+ ### Verifying release integrity
127
+
128
+ Every release asset has a GitHub build attestation (SLSA provenance), and `SHA256SUMS` is signed with keyless Sigstore via cosign:
129
+
130
+ ```sh
131
+ # Install the GitHub CLI (https://cli.github.com) and cosign (https://docs.sigstore.dev/cosign/system_config/installation)
132
+
133
+ # 1. Verify the SLSA build provenance attestation for any asset (example: the Linux amd64 archive)
134
+ gh attestation verify dircue_1.0.0_linux_amd64.tar.gz \
135
+ --repo war-and-code/dircue \
136
+ --signer-workflow war-and-code/dircue/.github/workflows/release-candidate.yml \
137
+ --source-ref refs/heads/main
138
+
139
+ # 2. Download the Sigstore bundle alongside SHA256SUMS
140
+ curl -fsSL -O https://github.com/war-and-code/dircue/releases/download/v1.0.0/SHA256SUMS
141
+ curl -fsSL -O https://github.com/war-and-code/dircue/releases/download/v1.0.0/SHA256SUMS.sigstore.json
142
+
143
+ # 3. Verify the cosign signature on SHA256SUMS
144
+ cosign verify-blob \
145
+ --bundle SHA256SUMS.sigstore.json \
146
+ --certificate-identity 'https://github.com/war-and-code/dircue/.github/workflows/release-candidate.yml@refs/heads/main' \
147
+ --certificate-oidc-issuer https://token.actions.githubusercontent.com \
148
+ SHA256SUMS
149
+
150
+ # 4. Verify the checksum of your downloaded asset
151
+ sha256sum -c SHA256SUMS --ignore-missing
152
+ ```
153
+
154
+ Both checks confirm that the release workflow produced the files while running on `main`, without long-lived keys. The attestation records the source commit (`--format json` shows it); the cosign signature alone doesn't pin a run or commit. The workflow itself only builds from the current `main` head, and only when an annotated version tag points at it.
155
+
156
+ ### Building from source
157
+
158
+ Building needs **Go 1.26.6**, the version pinned in `go.mod` and used for release archives:
159
+
160
+ ```sh
161
+ CGO_ENABLED=0 go build -trimpath -o bin/dircue .
162
+ ./bin/dircue --breakdown --json /path/to/checkout
163
+ ```
164
+
165
+ ### Docker
166
+
167
+ Build a local image from the tagged source and run it with the network denied and the source mounted read-only:
168
+
169
+ ```sh
170
+ docker build --build-arg VERSION=1.0.0 -t dircue:1.0.0 .
171
+ docker run --rm --network none \
172
+ -v /path/to/checkout:/repo:ro \
173
+ dircue:1.0.0 map --json /repo
174
+ ```
175
+
176
+ The image runs as an unprivileged user and includes `dirq` but not the structural worker. Mounted source must be readable by that user; `--user` can match your pipeline's permissions.
177
+
178
+ ## Compatibility direction
179
+
180
+ Version 0.9 kept the documented legacy Linguist CLI and JSON as a compatibility target.
181
+
182
+ The [`dircue map`](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/MAP.md) document is the primary 1.x contract, and the [compatibility policy](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/COMPATIBILITY.md) lists every surface 1.x keeps stable.
183
+
184
+ Against the published 0.9.0 executable, 227 of 278 compatibility cases produce identical stdout and stderr; 51 have output changes, with no exit-status changes. Strict raw Linguist output matches for committed trees, ordinary directories and unborn repositories. See the [comparison receipt](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/compatibility_v100/results/v090-compatibility.json).
185
+
186
+ ## Replace `github-linguist --json`
187
+
188
+ Put dircue on `PATH` and replace `github-linguist --json` with `dircue --json` in the same working directory. At a Git repository root, both analyze committed `HEAD`. If the executable name is fixed in your job, install the binary as `github-linguist`.
189
+
190
+ The output has the same language-keyed structure, with integer byte sizes and string percentages:
191
+
192
+ ```json
193
+ {"C#":{"size":43,"percentage":"67.19"},"Java":{"size":21,"percentage":"32.81"}}
194
+ ```
195
+
196
+ - No detected languages produces `{}` and exits `0`.
197
+ - Warnings go to stderr and don't change a successful exit status. As in Linguist, reaching the default 100,000-entry tree limit returns `{}` with a warning and exit `0`; raise `--tree-size` above the entry count for complete statistics.
198
+ - JSON object-key order isn't part of the contract.
199
+ - dircue can profile a directory without a committed Git repository, where Linguist fails. If your job must fail when Git content is unavailable, use `dircue --source git --json`.
200
+
201
+ Compatibility is tested against Linguist 9.7.0; other versions may use different language data. See the [documented differences](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/conformance/DISCREPANCIES.md).
202
+
203
+ | | GitHub Linguist 9.7.0 | Upstream Enry | dircue |
204
+ | --- | --- | --- | --- |
205
+ | Implementation | Ruby with native dependencies | Go library and CLI | Go CLI with a maintained Enry fork; optional native parser worker |
206
+ | Directory statistics | Requires a usable Git repository | Supports ordinary directories | Committed Git trees or ordinary directories |
207
+ | CLI output | Reference contract | Its own defaults and output | Targets Linguist's supported flags and output |
208
+ | Additional profiling | Language metadata | Language metadata | Portable directory maps; metadata and format evidence; project declarations and graphs; package/configuration observations; caller rules; optional scc and structural metrics/hotspots |
209
+
210
+ Language detection uses a maintained Enry fork; Git object reads use a maintained go-git v5.19.2 fork with fixes for streaming delta reconstruction and file-handle cleanup; scc v4.1.0 is used unmodified. The [upstream update process](https://github.com/war-and-code/dircue/blob/v1.0.1/third_party/README.md) records source versions, patches, generated data and licenses.
211
+
212
+ In the recorded 0.1 release candidate run (Linux arm64, Docker, 11 pinned public projects), median execution was 5.38–14.66× faster than Linguist with matching language totals and file breakdowns; peak memory was higher on several large projects.
213
+
214
+ ## Content selection
215
+
216
+ - At a Git repository root, dircue analyzes the committed `HEAD` tree. Dirty, untracked and ignored files don't affect the results. Symlinks and submodules are excluded.
217
+ - For a plain directory, it analyzes the filesystem contents. No Git executable, history or metadata is needed.
218
+ - `--source directory` inspects current files even when Git metadata exists.
219
+ - `--source git` requires a Git repository and committed tree, and fails otherwise.
220
+
221
+ In the default `auto` mode, a repository without commits, a bare repository, a subdirectory beneath a repository, or an unusable Git directory is analyzed as a plain directory. The legacy language JSON has no `source` field, so this fallback is silent there (see [known boundaries](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/COMPATIBILITY.md#known-boundaries-at-10)); the `analyze all` report records it in `discovery.source`.
222
+
223
+ ```sh
224
+ dircue /checkout --json
225
+ dircue --rev HEAD~1 --breakdown /checkout
226
+ dircue --source directory --json /exported-source
227
+ dircue --json /checkout/main.go
228
+ ```
229
+
230
+ A single file gets Linguist's separate inspection layout: language, MIME type, lines, nonblank lines, generated/vendor flags and large-file status. `--rev` applies only to directory statistics. Explicit symlink targets are rejected.
231
+
232
+ ## CLI flags
233
+
234
+ Flags can appear before or after the path. With no path, the current directory is used. Use `--` or `./name` for a path named like a subcommand or beginning with `-`.
235
+
236
+ | Flag | Behavior |
237
+ | --- | --- |
238
+ | `-j`, `--json` | Emit JSON. |
239
+ | `-b`, `--breakdown` | Include file paths in language results. |
240
+ | `-s`, `--strategies` | Show each file's detection strategy in text output. |
241
+ | `-r`, `--rev REV` | Select a Git revision for directory statistics; default `HEAD`. |
242
+ | `--tree ID` | Select an exact 40-hex Git tree object; mutually exclusive with `--rev`. |
243
+ | `-t`, `--tree-size N` | Return empty statistics with a warning when the tree reaches this entry count; default 100,000. |
244
+ | `--source auto\|git\|directory` | Select the content source; default `auto` (see [Content selection](#content-selection)). |
245
+ | `--on-error fail\|continue` | Fail on per-file read errors (default), or continue with explicit omissions. |
246
+ | `--workers N` | Use 1–1024 file workers. Zero selects the smaller of GOMAXPROCS and 16. |
247
+ | `--max-file-bytes N` | Skip files larger than N bytes, with a warning. Zero disables this limit. |
248
+ | `-v`, `--version` | Print the version. |
249
+ | `-h`, `--help` | Print command help. |
250
+
251
+ Directory statistics count full file sizes, and classification reads at most the first 128 KiB of each file, as Linguist does for repository blobs. Outside Git, single-file inspection reads the whole file up to 1 MiB and a 128 KiB prefix beyond that ([DISC-007](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/conformance/DISCREPANCIES.md#disc-007-bounded-inspection-of-large-git-free-single-files)).
252
+
253
+ ## Other profilers
254
+
255
+ `dircue map` is the main entry point. The narrower `analyze` reports it grew from are still available, each opt-in and documented in its own guide:
256
+
257
+ | Command | Reports | Guide |
258
+ | --- | --- | --- |
259
+ | `analyze discovery` | file metadata and candidate manifests, without reading source payloads | [DISCOVERY.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/DISCOVERY.md) |
260
+ | `analyze metrics` | code, comment and blank lines and complexity estimates, via scc | [METRICS.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/METRICS.md) |
261
+ | `analyze projects` | .NET, Maven and Gradle declarations, references and file composition | [PROJECTS.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/PROJECTS.md) |
262
+ | `analyze declarations` | project identities, workspaces, requirements and named interfaces from manifests | [DECLARATIONS.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/DECLARATIONS.md) |
263
+ | `analyze environments` | environment requirements declared in manifests | [ENVIRONMENTS.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/ENVIRONMENTS.md) |
264
+ | `analyze formats` | file-format evidence | [FORMATS.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/FORMATS.md) |
265
+ | `analyze availability` | Git LFS pointers, gitlinks, submodules and sparse checkouts that can make source look absent | [AVAILABILITY.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/AVAILABILITY.md) |
266
+ | `analyze focus` | one project, with the original root's inventory as context | [FOCUS.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/FOCUS.md) |
267
+ | `analyze graph` | .NET project-reference graphs | [GRAPH.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/GRAPH.md) |
268
+ | `analyze packages --syft-report FILE` | package evidence from a saved Syft report | [PACKAGE_EVIDENCE.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/PACKAGE_EVIDENCE.md) |
269
+ | `analyze rules --rules-file FILE` | matches for caller-supplied filename, path and content rules | [RULES.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/RULES.md) |
270
+ | `analyze registries` | NuGet and npm package-source declarations | [REGISTRIES.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/REGISTRIES.md) |
271
+ | `analyze structure` | syntax and metrics for 20 languages from a separate native worker | [STRUCTURE.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/STRUCTURE.md) |
272
+ | `analyze explain --file PATH` | why one file or project (`--project`) was classified and selected as it was | [EXPLANATIONS.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/EXPLANATIONS.md) |
273
+
274
+ `analyze all --json` combines languages, ecosystem and framework findings, and any modules you add with flags such as `--declarations`, `--metrics` or `--structure`. It emits the versioned [profile schema](https://github.com/war-and-code/dircue/blob/v1.0.1/schema/profile.schema.json). `compare` diffs two saved profiles, and `plan` suggests follow-up runs from one; see [COMPARISON.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/COMPARISON.md) and [PLANNING.md](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/PLANNING.md).
275
+
276
+ ```sh
277
+ dircue analyze discovery --json /checkout
278
+ dircue analyze all --declarations --metrics --json /checkout
279
+ dircue analyze structure --hotspots --structural-worker ./dircue-structural-worker --json /checkout
280
+ ```
281
+
282
+ A report can exit `0` and still be partial. Check each module's status and omissions before treating its results as complete. The [capability matrix](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/CAPABILITIES.md) lists supported languages, ecosystems and limits, and the [staged-analysis guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/STAGED_ANALYSIS.md) shows how to go from a cheap first pass to deeper modules.
283
+
284
+ ## Built-in help
285
+
286
+ The binary carries command help, a workflow guide, a machine-readable CLI catalog and JSON schemas. None of these read a source directory:
287
+
288
+ ```sh
289
+ dircue --help
290
+ dircue map --help
291
+ dircue capabilities --guide
292
+ dircue capabilities --cli --json
293
+ dircue capabilities --schema profile > profile.schema.json
294
+ ```
295
+
296
+ `capabilities --cli --json` describes every command, flag, output contract and exit code. Misspelled options get a suggested correction on stderr; the command still fails.
297
+
298
+ ## Attributes and boundaries
299
+
300
+ dircue is configured through CLI flags and `.gitattributes`; there's no configuration file. For example, these overrides include XML and generated Java in language statistics:
301
+
302
+ ```gitattributes
303
+ *.xml linguist-detectable=true
304
+ generated/**/*.java linguist-generated=false
305
+ ```
306
+
307
+ Root and nested `.gitattributes` support Linguist's language, vendor, generated, documentation, detectable and LFS attributes, with Git's precedence, macros and glob syntax. An analysis accepts at most 10,000 compiled attribute rules, a limit Linguist doesn't have. The [conformance scope](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/conformance/COVERAGE.md) lists what's tested.
308
+
309
+ dircue reads files and Git objects without invoking project hooks, package managers, Git or build scripts. Directory reads use `os.Root`, skip symlinks and special files, and on Unix can't be hung by a file swapped for a FIFO. Neither filesystem nor Git mode is an atomic snapshot of a directory that's changing, so use a stable checkout.
310
+
311
+ Read failures fail the run by default; `--on-error continue` turns recoverable per-file read errors into reported omissions. Some limits produce skipped or partial results with exit status `0`, so check coverage as well as the exit status. Use JSON for pipelines: text output escapes control characters in filenames.
312
+
313
+ Structural analysis runs only the worker executable you pass, one at a time, with an 8 MiB input limit and a per-file deadline. Memory isn't hard-capped; use container CPU, memory and time limits where that matters. The [resource-budget guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/RESOURCE_BUDGETS.md) has measurements, and [SECURITY.md](https://github.com/war-and-code/dircue/blob/v1.0.1/SECURITY.md) describes the analysis boundaries.
314
+
315
+ ## Troubleshooting
316
+
317
+ | Symptom | Check or fix |
318
+ | --- | --- |
319
+ | `dircue: command not found` | Add the installation directory to `PATH`, or call `./bin/dircue`. |
320
+ | Recent edits are missing from the report | Repository roots use committed `HEAD`. Use `--source directory` to inspect working files. |
321
+ | A large repository returns empty language statistics | Check stderr for the tree-size warning and set `--tree-size` above the entry count. |
322
+ | A map exits `0` but says `partial` | Exit status confirms that a valid map was produced. Inspect each `coverage` entry and its reasons before relying on absence. |
323
+ | An attached report has `binding: unknown` | The report and selected source lack comparable snapshot identity. See [source selection and binding](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/MAP.md#source-selection-and-binding); don't treat path association as proof of the same snapshot. |
324
+ | `map locate` reports `unresolvable_uri` | Supply `--source-uri` when SARIF uses absolute artifact URIs, and confirm that the URI is inside that root. |
325
+ | Docker cannot read mounted source | Check file permissions and use `--user` to select a suitable UID/GID. |
326
+ | uv cannot find dircue on PyPI | Check whether that version has been published to PyPI. You can also install its wheel from the GitHub Release URL or a local file; see the [distribution guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/DISTRIBUTION.md). |
327
+
328
+ ## Verification
329
+
330
+ [Conformance](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/conformance/README.md) compares output with the pinned Ruby Linguist CLI, including failures and intentional extensions. [Upstream sample results](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/conformance/results/samples.md) compare language classifiers, and the [performance harness](https://github.com/war-and-code/dircue/blob/v1.0.1/tests/performance/README.md) times identical public checkouts only after requiring identical language output.
331
+
332
+ The maintained classifier's `GetLanguage` was 1.64× faster on full sample contents and 1.71× faster on 128 KiB prefixes than upstream Enry v2.9.6 in a controlled library comparison. Against the published Enry CLI, three comparisons were inconclusive, and many scenarios differ under Enry's defaults.
333
+
334
+ Raw measurements, source identities and validation records are archived in the [evidence-archive-1 release](https://github.com/war-and-code/dircue/releases/tag/evidence-archive-1); restore them locally with `make fetch-receipts`. These results hold for the recorded inputs. Records from before the project was renamed from **auragaze** keep the old name; see [the rename notes](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/RENAME.md).
335
+
336
+ ```sh
337
+ go test -race ./...
338
+ go vet ./...
339
+ ```
340
+
341
+ The [CI guide](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/CI.md) covers local checks and release preparation.
342
+
343
+ ## FAQ
344
+
345
+ **Do I need Go, Ruby, or Git installed?** The core executable needs none of those. But *building* it needs Go; a wheel's launcher needs Python 3.10+. Optional structural analysis needs a prebuilt native worker, and building that worker needs Rust.
346
+
347
+ **Can it profile an extracted archive?** Yes. Point it at the extracted directory; Git metadata is optional.
348
+
349
+ **Will it pick up upstream detection improvements?** The maintained fork has a reproducible [update procedure](https://github.com/war-and-code/dircue/blob/v1.0.1/third_party/README.md). Updates are pinned and compared against Linguist before adoption; scans never download rules.
350
+
351
+ **Is there a Go library API?** Not yet a supported one in 1.x; `pkg/` packages may change in any release. See the [compatibility policy](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/COMPATIBILITY.md).
352
+
353
+ ## Contributions
354
+
355
+ Outside pull requests are not accepted at present.
356
+
357
+ Bug reports and design proposals go through [GitHub Issues](https://github.com/war-and-code/dircue/issues) with the templates the repository ships.
358
+
359
+ See [CONTRIBUTING.md](https://github.com/war-and-code/dircue/blob/v1.0.1/CONTRIBUTING.md) for reporting guidance and [SECURITY.md](https://github.com/war-and-code/dircue/blob/v1.0.1/SECURITY.md) for private vulnerability reporting.
360
+
361
+ ## License
362
+
363
+ [MIT](https://github.com/war-and-code/dircue/blob/v1.0.1/LICENSE). The maintained Enry fork keeps Apache-2.0 licensing and Linguist's MIT data notices, and scc is MIT. [Third-party notices](https://github.com/war-and-code/dircue/blob/v1.0.1/THIRD_PARTY_NOTICES.md) cover the Go executable and embedded MIME database. The optional structural worker includes BCA under MPL-2.0 and Tree-sitter grammars under their own licenses; its archive carries their sources, licenses and provenance (see [worker redistribution](https://github.com/war-and-code/dircue/blob/v1.0.1/docs/STRUCTURE.md#dependencies-and-redistribution)).
364
+
365
+ The image near the top of this README is a captioned still from the TV series *Pawn Stars*, made with [imgflip](https://imgflip.com). It isn't covered by this project's MIT license; its rights belong to their respective holders.
366
+
367
+ The optional Bend research models include [modified Apache-2.0 proof examples](https://github.com/war-and-code/dircue/blob/v1.0.1/research/bend-aggregation/topk/THIRD_PARTY_NOTICES.md) and are kept separate from the released executables.
@@ -0,0 +1,11 @@
1
+ dircue-1.0.1.dist-info/METADATA,sha256=mMZyyNnp6iy4SzT2cc12D8Z_d0LLzKfYmNB8BXRxdz8,27589
2
+ dircue-1.0.1.dist-info/WHEEL,sha256=2IVopZUDrnRkz43EOhM1ejyD54RK0uqkJ61nG09pqPo,102
3
+ dircue-1.0.1.dist-info/bundled-binary.json,sha256=HvbtTqkjN89la8yvYTwiq6T99y2rA8zmSv_llj6l8wA,252
4
+ dircue-1.0.1.dist-info/entry_points.txt,sha256=f0JHzzhOm6y2oV-9bG4OZiYuGr4QHd6nhgcA17RSJeg,58
5
+ dircue-1.0.1.dist-info/licenses/LICENSE,sha256=BCI3xoIsgFXvAfSXdIznFeW4AVcxS06AY0KruWMOJBk,1076
6
+ dircue-1.0.1.dist-info/licenses/THIRD_PARTY_NOTICES.md,sha256=nOji_fC-RO3eyFQvVNEfe2s25eLw3OA2doXU1MdeKzU,231221
7
+ dircue-1.0.1.dist-info/release-provenance.json,sha256=rJgCBasDkHyBEo609c_ALTiPgfAA98oqIhIHmtfqDVA,1810
8
+ dircue/__init__.py,sha256=yF7gmWri7s5Uv96c_YKjIwQidNSDvn5e9babqlWD_7M,1582
9
+ dircue/__main__.py,sha256=ubt6XyZvcHwdjCQ90B_U4MeP-3YJduz5GWUC9yOgkrg,27
10
+ dircue/bin/dircue.exe,sha256=mjHNzRuUZpjsZOFULpteJyM1ZVlA998fgn1xxT_wF9w,21161472
11
+ dircue-1.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: dircue archive adapter 1
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,7 @@
1
+ {
2
+ "arch": "amd64",
3
+ "binary_sha256": "9a31cdcd1b946698ec64e1542e9b5e272335655940f7df1f827d71c53ff017dc",
4
+ "name": "dircue_1.0.1_windows_amd64.zip",
5
+ "os": "windows",
6
+ "sha256": "ccfc0673f2b3dc93d33cebd92d7bba7c93a2b79f55fb56b29068a6973dc2cafe"
7
+ }
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ dircue = dircue:main
3
+ dirq = dircue:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dircue contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.