pt install
Install prompt collections from external sources like Git repositories, enabling prompt sharing and reuse across teams and projects.
Synopsis
bash
pt install <source> [options]Purpose
The install command:
- Downloads prompts from Git repositories
- Manages shared prompt libraries
- Enables team collaboration
- Supports versioned prompt collections
- Handles dependencies and updates
- Integrates with package managers
Options
| Option | Short | Description |
|---|---|---|
--target <dir> | -t | Installation directory |
--branch <branch> | -b | Git branch to install |
--tag <tag> | Install specific version tag | |
--depth <n> | -d | Git clone depth (default: 1) |
--force | -f | Overwrite existing prompts |
--no-deps | Skip dependency installation | |
--help | -h | Show help information |
Source Types
Git Repositories
bash
# HTTPS URL
pt install https://github.com/user/prompts
# SSH URL
pt install git@github.com:user/prompts.git
# GitHub shorthand
pt install user/promptsLocal Directories
bash
# Local path
pt install ./shared-prompts
# Absolute path
pt install /usr/local/share/promptsFuture Support
- NPM packages:
pt install @org/prompts - URL archives:
pt install https://example.com/prompts.tar.gz
Examples
Basic Installation
bash
# Install from GitHub
pt install awesome-user/prompt-collection
# Install specific branch
pt install user/prompts --branch develop
# Install to custom location
pt install user/prompts --target ~/.pt/externalTeam Collaboration
bash
# Install team prompts
pt install github.com/myteam/shared-prompts
# Install specific version
pt install team/prompts --tag v2.1.0
# Shallow clone for faster install
pt install large-repo/prompts --depth 1Local Development
bash
# Link local development
pt install ../my-prompt-dev --target ~/.pt/dev
# Force overwrite
pt install ./updated-prompts --forceRepository Structure
Expected structure for installable prompt repositories:
prompt-repo/
├── README.md # Repository documentation
├── prompts/ # Prompt files
│ ├── api/ # Category folders
│ │ ├── client.md
│ │ └── docs.md
│ └── frontend/
│ └── component.md
├── .pt-manifest.json # Optional manifest
└── package.json # Optional npm metadataManifest File
Optional .pt-manifest.json:
json
{
"name": "awesome-prompts",
"version": "1.0.0",
"description": "Collection of awesome prompts",
"author": "Your Name",
"prompts": [
{
"path": "prompts/api/client.md",
"title": "API Client Generator",
"tags": ["api", "typescript"]
}
],
"dependencies": {
"base-prompts": "^2.0.0"
}
}Installation Process
1. Source Resolution
bash
# Expands shortcuts
user/repo → https://github.com/user/repo
# Validates URLs
git@github.com:user/repo.git ✓2. Download
bash
# Clone repository
Cloning into '~/.pt/git-prompts/user-repo'...
# Or copy local files
Copying from './shared-prompts'...3. Validation
bash
# Check structure
✓ Valid prompt repository
✓ Found 15 prompt files
⚠ No manifest file (optional)4. Installation
bash
# Copy prompts
Installing to ~/.pt/git-prompts/user-repo...
✓ Installed 15 prompts
# Update configuration
✓ Added to promptDirs in configManaging Installed Prompts
List Installed
bash
# Show all installed sources
pt install --list
# Output:
awesome-prompts v1.2.0 github.com/user/awesome-prompts
team-prompts main github.com/company/prompts
local-dev - ./my-promptsUpdate Prompts
bash
# Update specific source
pt install user/prompts --update
# Update all sources
pt install --update-allRemove Prompts
bash
# Remove installed source
pt install user/prompts --remove
# Clean up unused
pt install --cleanDependency Management
Installing Dependencies
json
// .pt-manifest.json
{
"dependencies": {
"base-prompts": "^1.0.0",
"util-prompts": "^2.1.0"
}
}bash
# Install with dependencies
pt install user/prompts
# Skip dependencies
pt install user/prompts --no-depsVersion Constraints
^1.0.0: Compatible versions~1.0.0: Patch versions only1.0.0: Exact version*: Any version
Creating Installable Repositories
Basic Setup
bash
# Create repository
mkdir my-prompts && cd my-prompts
git init
# Add prompts
mkdir prompts
pt add prompts/hello.md
# Create README
echo "# My Prompts" > README.md
# Commit and push
git add .
git commit -m "Initial prompts"
git remote add origin git@github.com:user/my-prompts
git push -u origin mainWith Manifest
bash
# Create manifest
cat > .pt-manifest.json << EOF
{
"name": "my-prompts",
"version": "1.0.0",
"description": "My prompt collection",
"prompts": [
{
"path": "prompts/hello.md",
"title": "Hello World",
"tags": ["example"]
}
]
}
EOFVersioning
bash
# Tag version
git tag -a v1.0.0 -m "First release"
git push origin v1.0.0
# Users install specific version
pt install user/prompts --tag v1.0.0Best Practices
Repository Organization
- Clear Structure: Use consistent folder organization
- Documentation: Include README with examples
- Versioning: Tag stable releases
- Categories: Group related prompts
- Testing: Test prompts before publishing
Manifest Benefits
- Dependency tracking
- Metadata for search
- Installation validation
- Update notifications
Security
- Review prompts before installation
- Use specific versions in production
- Verify repository authenticity
- Avoid sensitive data in prompts
Troubleshooting
Installation Failures
bash
# Debug mode
pt install user/prompts --debug
# Common issues:
- Network connectivity
- Git authentication
- Permission denied
- Invalid repository structureAuthentication
bash
# SSH key issues
ssh-add ~/.ssh/id_rsa
# HTTPS credentials
git config --global credential.helper cache
# Use personal access token
pt install https://token@github.com/user/promptsConflicts
bash
# Handle existing files
pt install user/prompts --force
# Backup first
cp -r ~/.pt/prompts ~/.pt/prompts.bak
pt install user/promptsConfiguration
Configure installation behavior:
json
{
"gitPromptDir": "~/.pt/git-prompts",
"install": {
"autoUpdate": false,
"checkSignatures": false,
"defaultBranch": "main",
"depth": 1
}
}Related Commands
Next Steps
- Browse available prompt collections
- Create your own prompt repository
- Share prompts with your team
- Set up automated updates
