A comprehensive collection of Node.js packages for Team Fortress 2 trading bots and applications. This monorepo contains modular, reusable utilities for TF2 item management, pricing, and bot operations.
TF2 unusual effects database and utilities with 150+ effects mapping.
npm install @pricedb-io/tf2-effectsFeatures:
- Complete unusual effects database
- Effect name/ID mapping and search
- Generation-based categorization
- Zero dependencies
Halloween spell system for TF2 items with comprehensive attribute mapping.
npm install @pricedb-io/tf2-spellsFeatures:
- Complete Halloween spells database
- Attribute ID to spell mapping
- SKU suffix generation for spells
- Spell decoding from item attributes
Auto-discovery and management of tf2autobot installations.
npm install @pricedb-io/tf2-bot-discoveryFeatures:
- Smart tf2autobot installation detection via package management
- Automatic bot configuration discovery and validation
- PM2 and process-based detection
- Multiple installation support with enhanced search methods
Backpack.tf price fetching with Steam Community Market integration.
npm install @pricedb-io/tf2-price-fetcherFeatures:
- Backpack.tf API integration
- Key price management and conversion
- Currency normalization (metal/keys/USD)
- Automatic rate limiting and caching
Steam Community Market integration with advanced price calculation.
npm install @pricedb-io/tf2-marketFeatures:
- Steam Community Market API
- SKU to market hash name conversion
- Price calculation and profit analysis
- Market availability checking
Enhanced TF2 schema management with comprehensive SKU utilities.
npm install @pricedb-io/tf2-schemaFeatures:
- Robust schema fetching and caching
- Complete SKU parsing and validation
- Display name generation
- Spell integration support
// Initialize schema with Steam API key
const { initializeSchema } = require('@pricedb-io/tf2-schema');
const schemaManager = await initializeSchema({
  apiKey: 'your-steam-api-key',
});
// Parse TF2 item SKUs
const { parseSKU } = require('@pricedb-io/tf2-schema');
const item = parseSKU('5021;6;uncraftable');
console.log(item); // { defindex: 5021, quality: 6, craftable: false, ... }
// Get unusual effects
const { TF2Effects } = require('@pricedb-io/tf2-effects');
const effects = new TF2Effects();
const effect = effects.getEffectName(13);
console.log(effect); // "Miami Nights"
// Fetch prices from backpack.tf
const { BackpackPriceFetcher } = require('@pricedb-io/tf2-price-fetcher');
const priceFetcher = new BackpackPriceFetcher();
const prices = await priceFetcher.fetchPrices(['5021;6']);const { TF2BotDiscovery } = require('@pricedb-io/tf2-bot-discovery');
const { SteamMarketFetcher } = require('@pricedb-io/tf2-market');
const { TF2Spells } = require('@pricedb-io/tf2-spells');
// Discover bot installations
const discovery = new TF2BotDiscovery();
const bots = await discovery.findTf2AutobotInstallations();
// Check Steam Community Market
const market = new SteamMarketFetcher();
const marketData = await market.fetchPriceOverview('Mann Co. Supply Crate Key');
// Handle Halloween spells
const spells = new TF2Spells();
const spell = spells.getSpellByAttribute(1004);
console.log(spell.name); // "Headless Horseshoes"- Node.js: >= 14.0.0
- Dependencies: Individual packages have minimal dependencies
- Steam API Key: Required for schema fetching (some packages)
- PM2: Optional, for bot discovery features
# Clone the repository
git clone https://github.com/TF2-Price-DB/pricedb-io-tf2.git
cd pricedb-io-tf2
# Install dependencies for all packages
npm run install-all
# Run tests
npm test
# Run linting
npm run lintEach package follows a consistent structure:
packages/package-name/
βββ index.js          # Main entry point
βββ lib/              # Core functionality
β   βββ class1.js
β   βββ class2.js
βββ package.json      # Package configuration
βββ README.md         # Package documentation
βββ test/            # Test files (when applicable)
# Build all packages
npm run build
# Publish all packages (requires npm access)
npm run publish-all
# Publish specific package
cd packages/tf2-effects
npm publish --access public# Run all tests
npm test
# Test specific package
npm run test:tf2-effects
# Watch mode for development
npm run test:watchEach package includes comprehensive documentation:
- README.md: Usage examples and API reference
- JSDoc Comments: Inline code documentation
- Type Definitions: TypeScript-style JSDoc annotations
TF2 SKUs (Stock Keeping Units) follow this format:
defindex;quality[;attribute1;attribute2;...]
Examples:
- 5021;6- Unique Mann Co. Supply Crate Key
- 266;5;u10- Unusual Fancy Fedora with Miami Nights effect
- 200;11;sp-1004;sp-1005- Strange Bottle with Halloween spells
See individual package documentation for detailed format specifications.
We welcome contributions! Please see our Contributing Guidelines for details.
- Code Style: Follow ESLint configuration
- Testing: Add tests for new features
- Documentation: Update README and JSDoc comments
- Dependencies: Keep minimal, avoid bloat
- Backward Compatibility: Maintain semver compatibility
When creating new packages:
- Follow the established structure pattern
- Include comprehensive README documentation
- Add appropriate peer dependencies
- Implement proper error handling
- Include usage examples
MIT License - see LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Repository: GitHub
- tf2autobot - Automated TF2 trading bot
- backpack.tf - TF2 item pricing and trading
- pricedb.io - TF2 price tracking and analytics
- TypeScript definitions
- Browser compatibility versions
- GraphQL API integration
- Real-time price streaming
- Advanced analytics utilities
- Performance optimizations
- Mobile SDK versions
- tf2-effects: v1.0.0 - Initial release with 150+ effects
- tf2-spells: v1.0.0 - Complete Halloween spell system
- tf2-bot-discovery: v1.0.0 - Bot installation discovery
- tf2-price-fetcher: v1.0.0 - Backpack.tf integration
- tf2-market: v1.0.0 - Steam market integration
- tf2-schema: v1.0.0 - Schema management and SKU utilities
See individual package changelogs for detailed version history.