This document provides detailed examples of how to use each tool in the collection.
Purpose: Interact with GitHub repositories using the GitHub CLI
Usage:
gptscript tools/cli/cli-demo.gptExample Interactions:
- List repositories
- Create issues
- Manage pull requests
- View repository information
Purpose: Process and analyze local data files including CSV, JSON, PDF, and Excel files
Usage:
# Process files in sample-data directory
gptscript --workspace=./sample-data tools/data-processing/local-files.gptSupported File Types:
- CSV files: Query, filter, and analyze tabular data
- Excel files: Read and process spreadsheet data
- PDF files: Extract and analyze text content
- JSON files: Parse and query structured data
Example Tasks:
- "Analyze the sales data in yoy_sales.xlsx"
- "Extract contact information from key_contacts.txt"
- "Summarize the content of promotions.pdf"
Purpose: Provides workspace context and file system operations
Usage: Typically used as a dependency by other tools
# Used internally by local-files.gpt
Context: ./context-tool.gptPurpose: Summarize tweets and extract hyperlinks from Twitter URLs
Usage:
gptscript tools/social/tweets-workflow.gptFeatures:
- Summarizes tweets in markdown format
- Extracts and summarizes hyperlinks from tweets
- Processes tweets synchronously in order
- Outputs summaries to
tweets.md
Current Configuration:
- Processes specific tweet URLs (can be modified in the tool)
- Generates structured markdown output with references
Purpose: Get weather information using WeatherStack API
Prerequisites:
- WeatherStack API key (set as environment variable)
Usage:
gptscript tools/weather/weather-tool.gptFeatures:
- Current weather conditions
- Weather forecasts
- Location-based weather data
- Interactive confirmation before API calls
Setup:
- Get API key from WeatherStack
- Set environment variable:
WS_API_KEY=your_api_key - Run the tool
You can create workflows that combine multiple tools:
# Example: Process data then generate weather report
gptscript --workspace=./sample-data tools/data-processing/local-files.gpt
# Then use the processed data with other toolsUse different data directories:
# Use custom data directory
gptscript --workspace=/path/to/your/data tools/data-processing/local-files.gptUse the provided Makefile for common operations:
# Install all requirements
make install-requirements
# Run specific demos
make run-cli-demo
make run-api-demo
make run-local-files-demo
make run-tweets-workflow
# List WeatherStack API operations
make ws-list-ops
# Get help
make help- Missing Dependencies: Run
make install-requirements - API Key Issues: Ensure environment variables are set correctly
- File Path Issues: Use absolute paths or ensure correct working directory
- Permission Issues: Check file permissions for scripts
Add verbose output to any tool:
gptscript --verbose tools/cli/cli-demo.gpt- Create tool file in appropriate
tools/subdirectory - Add Makefile target in
config/Makefile - Update documentation
- Test with sample data
Each GPTScript tool should include:
- Clear name and description
- Required tools and dependencies
- Parameter definitions
- Usage instructions