Skip to content

About

Ecosystem and framework catalog for Prison

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Prison Ecosystems

Declarative ecosystem and framework definitions for Prison.

Prison's prison ecosystem init command reads the TOML files in ecosystems/ to detect a project's language, package managers, and frameworks. It will then propose matching [box], [setup], [checkpoint], and [egress] settings for the project's prison.toml.

Usage with Prison

# Pull the catalog into `~/.prison/ecosystems`
prison ecosystem update https://github.com/gjazali/prison-ecosystems.git

# Or pull from a local checkout
git clone https://github.com/gjazali/prison-ecosystems.git
prison ecosystem update prison-ecosystems

# Detect ecosystems in a project and propose prison.toml edits
cd ~/my-project
prison ecosystem init

You can also set PRISON_ECOSYSTEMS=/path/to/prison-ecosystems to read a local checkout directly without having to copy ecosystems/*.toml into the host's ~/.prison/ecosystems/.

Adding an ecosystem or framework

Create a .toml file under ecosystems/. Something like:

name = "pnpm"
description = "JavaScript/TypeScript (pnpm)"
group = "javascript-pkg"         # (Optional)
priority = 30                    # A higher number will win within the same group

[detect]
files = ["pnpm-lock.yaml"]       # This will match if any file or glob exists in the project root
all_files = []                   # (Optional)

# Match a regular expression against a project file (optional)
# [[detect.match]]
# file = "package.json"
# pattern = '"next"\s*:'

[box]
shadow = ["node_modules"]        # Directories that will be shadowed from the host worktree

[setup]
commands = ["pnpm install --frozen-lockfile"]

[checkpoint]
ignore = [".pnpm-store/"]        # Extra files and directories that the checkpoint will ignore

[egress]
hosts = [
  "registry.npmjs.org",
  "*.npmjs.org",
]
docs = [
  "pnpm.io",
  "nodejs.org",
  "developer.mozilla.org",
]

Guidelines

  • Package managers for the same language should share a group (such as javascript-pkg or python-pkg) with priority reflecting specificity (lockfiles higher than generic manifests).
  • Frameworks and tools (such as nextjs, vite, pytest, ruff) should omit group so that they compose on top of the detected package manager.
  • It is recommended to keep egress.hosts minimal. You should list only the registries or download hosts the ecosystem will actually need.
  • Additionally, you should keep egress.docs limited to official, first-party documentation domains (avoid shared-hosting wildcards like *.readthedocs.io or *.github.io). The prison ecosystem init command will propose a prison.toml with egress.docs added by default unless --no-docs is specified.

About

Ecosystem and framework catalog for Prison

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors