Internals
This page maps the major tinx subsystems to the responsibilities they own. Use it when you need to understand how the workspace, provider, and runtime layers fit together.
System view
Provider (OCI)
↓
tinx home (cache)
↓
Workspace (definition + lock)
↓
Runtime (execution)
↓
Command
Subsystems
| Package | Responsibility |
|---|---|
internal/cmd | Cobra commands, workspace targeting, CLI behavior |
internal/workspace | Workspace manifests, lock files, sync, shell artifact generation |
internal/manifest | Provider manifest schema and validation |
internal/oci | OCI packing, remote install, local layout reads, runtime materialization |
internal/state | tinx home layout, aliases, active workspace, provider metadata |
internal/runtime | Environment assembly, PATH handling, command execution |
internal/build | Go and GoReleaser build pipelines for providers |
Workspace pipeline
When you run a workspace command such as:
tinx --workspace demo -- node build
tinx follows this path:
internal/cmdresolves the selected workspace by flag, discovery, or active workspace record.internal/workspaceloads and normalizes the workspace manifest.internal/workspacesyncs provider sources and updatestinx.lock.internal/workspacebuilds.workspace/env,.workspace/path, and.workspace/bin/<alias>.internal/runtimeresolves the command from the generatedPATHand runs it.
Packaging pipeline
When you package a provider:
tinx release --manifest tinx.yaml --main ./cmd/my-provider --push ghcr.io/acme/my-provider:v1.2.3
tinx follows this path:
internal/buildcompiles the binaries listed inspec.platforms.internal/ociwrites config, manifest, metadata, assets, and binary layers into an OCI layout.internal/ocioptionally pushes the layout to a registry through ORAS.
Storage model
Two storage roots matter:
- tinx home: default
~/.tinx, orTINX_HOME, or--tinx-home - workspace root: the directory that contains
tinx.yaml
The workspace is for project-local runtime state. tinx home is for reusable provider metadata, OCI store content, aliases, and active workspace tracking.
Design themes
- Workspace first: execution always goes through a workspace shell.
- OCI everywhere: providers are packaged and distributed as OCI artifacts.
- Lazy materialization: metadata can exist before runtime binaries are extracted.
- Explicit failures: missing workspaces, missing commands, and environment conflicts fail early.
Key takeaway
- workspace logic decides what should run
- provider packaging decides what gets distributed
- runtime decides how commands execute