dep-license
Show the license for a dependency bundled with Ritual.
Without a package name, opens an interactive list showing all bundled dependencies. Primary dependencies (direct entries in package.json) are listed first, followed by transitive dependencies. Type to search and filter across both sections.
./ritual dep-license [package] [options]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
[package] | Name of the package to display the license for |
Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
--list | List every bundled dependency with its version and license | false |
--plain | Output license text directly to stdout | false |
--output <format> | Output format for --list: text, json, or ndjson | text |
The listing (or a package’s license text) is the command’s entire output, so there is no --quiet (shared convention).
--list cannot be combined with a package name argument. It never prompts, so it also works
outside a TTY — without either a package name or --list, an invocation that cannot open the
picker is a usage error (exit 2). That covers a non-TTY stdout and every case where
prompts are unavailable, including --no-input.
A license printed for a named package is paged the same way license is:
less only when both ends are a terminal and prompts are available, plain stdout otherwise.
Examples
Section titled “Examples”Open the interactive dependency picker:
./ritual dep-licenseView a specific package license directly:
./ritual dep-license commanderView a scoped package license:
./ritual dep-license promptsPrint a license to stdout:
./ritual dep-license prompts --plainList every dependency (primary first, then transitive) as name version license lines:
./ritual dep-license --listPrimary: commander 15.0.0 MIT prompts 2.4.2 MITTransitive: kleur 3.0.3 MITScripted Output
Section titled “Scripted Output”--list --output json emits one { name, version, license, isPrimary } object per
dependency (ndjson emits the same rows one object per line). The payload deliberately
excludes the full license text — it is large; run ./ritual dep-license <package> to see a
package’s complete license text.
./ritual dep-license --list --output json[ { "name": "commander", "version": "15.0.0", "license": "MIT", "isPrimary": true }, { "name": "kleur", "version": "3.0.3", "license": "MIT", "isPrimary": false }]Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | Success |
2 | Usage error (no package name and no --list when prompts are unavailable or stdout is not a TTY, or both given) |
3 | Package not found |