TSI Package Repository
TSI uses a local package repository to store package definitions. The repository is located at ~/.tsi/packages/ by default.
Development: In-tree package repository
The official package repository (PanterSoft/tsi-packages) is included as a Git submodule at tsi-packages/. This lets you develop TSI and try package definitions without cloning the package repo separately.
Clone with submodules
First time clone (recommended):
If you already cloned without submodules:
Use in-tree packages for development
After building TSI (e.g. make dev or cargo build), sync your install prefix from the in-repo packages:
With the default prefix this updates ~/.tsi/packages/ from tsi-packages/packages/. You can also use a dev-only prefix:
Alternatively, run make dev-packages to sync the default prefix (see Makefile).
Update the in-tree package repo
To point the submodule at the latest commit of tsi-packages:
Commit the new submodule reference in the TSI repo if you want to pin that version.
Repository Structure
~/.tsi/packages/
├── pkg-config.json
├── zlib.json
├── openssl.json
├── cmake.json
├── curl.json
└── ... (other package definitions)
Each package is defined as a JSON file. The filename should match the package name (e.g., pkg-config.json for the pkg-config package).
Updating the Repository
Default Update
Update from the official TSI package repository:
This will:
1. Clone or update the TSI package repository from GitHub
2. Copy all .json files from the packages/ directory
3. Update your local repository at ~/.tsi/packages/
Custom Repository
Update from a custom Git repository:
The repository should have a packages/ directory containing JSON package definitions.
Local Directory
Update from a local directory (useful for development):
This will copy all .json files from the specified directory to your repository.
Custom Prefix
Update repository for a custom TSI installation:
Repository Sources
Official Package Repository
The default package repository (used by tsi update) is separate from the TSI core repository:
- URL: https://github.com/PanterSoft/tsi-packages.git
- Location: packages/ directory at repo root
- Packages: Essential packages (pkg-config, zlib, openssl, cmake, curl, etc.)
Custom Repositories
You can create your own package repository:
- Create a Git repository
- Add a
packages/directory - Add JSON package definitions
- Update TSI:
tsi update --repo <your-repo-url>
Package Discovery
After updating, TSI will automatically discover all packages in the repository:
# List all available packages (from repository)
ls ~/.tsi/packages/*.json
# Get info about a package
tsi info pkg-config
# Install a package
tsi install pkg-config
Repository Caching
TSI caches the repository clone in ~/.tsi/tmp-repo-update/ to speed up subsequent updates. The cache is automatically updated on each tsi update run.
Manual Repository Management
You can also manually manage the repository:
# Add a package manually
cp my-package.json ~/.tsi/packages/
# Remove a package
rm ~/.tsi/packages/package-name.json
# Edit a package
vim ~/.tsi/packages/package-name.json
Best Practices
- Regular Updates: Run
tsi updateregularly to get new packages and updates - Version Control: Keep your custom packages in a Git repository
- Backup: Backup
~/.tsi/packages/if you have custom packages - Testing: Use
--localfor testing package definitions before committing
Troubleshooting
Update Fails
Problem: tsi update fails with "Failed to clone/update repository"
Solutions:
- Check internet connection
- Ensure git is installed
- Try updating manually: git clone https://github.com/PanterSoft/tsi-packages.git ~/.tsi/tmp-repo-update
No Packages Found
Problem: Update succeeds but no packages are available
Solutions:
- Check if packages/ directory exists in the repository
- Verify JSON files are valid: cat ~/.tsi/packages/*.json | jq .
- Try updating from local: tsi update --local /path/to/packages
Custom Repository Not Working
Problem: Custom repository update fails
Solutions:
- Ensure repository is publicly accessible (or use SSH for private repos)
- Verify packages/ directory exists
- Check repository URL is correct