# FactCheckr 🔍
A powerful AI-powered fact-checking tool that helps you verify claims and statements with confidence scores and detailed evidence.
[](https://badge.fury.io/py/factcheckr)
[](https://pypi.org/project/factcheckr/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/yourusername/factcheckr/actions)
## Features
- 🤖 **AI-Powered Analysis**: Uses advanced AI models to fact-check claims
- 📊 **Confidence Scoring**: Provides confidence levels for each fact-check
- 📝 **Detailed Evidence**: Returns comprehensive evidence and reasoning
- 🔄 **Fallback System**: Robust fallback for common claims when AI is unavailable
- 💻 **Cross-Platform**: Works on Windows, macOS, and Linux
- 🎯 **Multiple Input Methods**: Command-line, interactive mode, and stdin support
- 📋 **JSON Output**: Machine-readable output format available
- 🚀 **Easy Installation**: Available on PyPI with simple pip install
## Quick Start
### Installation
#### From PyPI (Recommended)
```bash
pip install factcheckr
```
#### From GitHub
```bash
pip install git+https://github.com/yourusername/factcheckr.git
```
#### Development Installation
```bash
git clone https://github.com/yourusername/factcheckr.git
cd factcheckr
pip install -e .
```
### Basic Usage
#### Command Line
```bash
# Check a single claim
factcheckr "The Earth is round"
# Alternative syntax
python -m factcheckr "Cats have 9 lives"
# Get JSON output
factcheckr "Water boils at 100°C" --json
# Interactive mode
factcheckr --interactive
# Read from stdin
echo "The moon is made of cheese" | factcheckr --stdin
# Verbose output
factcheckr "Birds can fly" --verbose
```
#### Python API
```python
from factcheckr import CompleteFactCheckr
# Initialize the fact checker
checker = CompleteFactCheckr()
# Check a claim
result = checker.fact_check_with_ai("The Earth is flat")
print(f"Verdict: {result['verdict']}")
print(f"Evidence: {result['evidence']}")
print(f"Confidence: {result['confidence']}")
```
## Installation Verification
After installation, verify that FactCheckr is working correctly:
```bash
# Check version
factcheckr --version
# Test with a simple claim
factcheckr "Water is wet"
# Test JSON output
factcheckr "The sky is blue" --json
```
## Command Line Options
```
usage: factcheckr [-h] [--version] [--interactive] [--stdin] [--json] [--verbose] [claim]
AI-powered fact-checking tool
positional arguments:
claim The claim to fact-check
options:
-h, --help show this help message and exit
--version show program's version number and exit
--interactive Enter interactive mode
--stdin Read claims from stdin
--json Output results in JSON format
--verbose Enable verbose output
```
## Output Format
### Standard Output
```
Claim: "The Earth is round"
Verdict: True
Evidence: The Earth is an oblate spheroid, confirmed by satellite imagery, physics, and centuries of scientific observation.
Confidence: 0.95
```
### JSON Output
```json
{
"claim": "The Earth is round",
"verdict": "True",
"evidence": "The Earth is an oblate spheroid, confirmed by satellite imagery, physics, and centuries of scientific observation.",
"confidence": 0.95
}
```
## Platform-Specific Instructions
### Windows
```cmd
# Using Command Prompt
pip install factcheckr
factcheckr "Your claim here"
# Using PowerShell
pip install factcheckr
factcheckr "Your claim here"
```
### macOS
```bash
# Using Homebrew Python (recommended)
brew install python
pip3 install factcheckr
factcheckr "Your claim here"
# Using system Python
python3 -m pip install factcheckr
python3 -m factcheckr "Your claim here"
```
### Linux
```bash
# Ubuntu/Debian
sudo apt update
sudo apt install python3-pip
pip3 install factcheckr
factcheckr "Your claim here"
# CentOS/RHEL/Fedora
sudo yum install python3-pip # or dnf on newer versions
pip3 install factcheckr
factcheckr "Your claim here"
```
## Troubleshooting
### Common Issues
#### "Command not found" Error
If you get a "command not found" error, try:
1. **Use the module syntax**:
```bash
python -m factcheckr "Your claim"
```
2. **Check your PATH** (add Python Scripts directory):
- **Windows**: Add `%APPDATA%\Python\Python3x\Scripts` to PATH
- **macOS/Linux**: Add `~/.local/bin` to PATH
3. **Reinstall with user flag**:
```bash
pip install --user factcheckr
```
#### Installation Issues
1. **Upgrade pip first**:
```bash
python -m pip install --upgrade pip
```
2. **Use virtual environment**:
```bash
python -m venv factcheckr_env
# Windows
factcheckr_env\Scripts\activate
# macOS/Linux
source factcheckr_env/bin/activate
pip install factcheckr
```
3. **Install from source**:
```bash
git clone https://github.com/yourusername/factcheckr.git
cd factcheckr
pip install -e .
```
#### AI Service Issues
FactCheckr includes a robust fallback system for common claims when the AI service is unavailable. If you encounter AI-related errors:
1. The tool will automatically fall back to heuristic-based checking for common claims
2. Check your internet connection
3. The fallback system handles claims like:
- "Cats have 9 lives" → Likely False
- "The Earth is flat" → False
- "Water boils at 100 degrees Celsius" → Likely True
## Development
### Setting Up Development Environment
```bash
# Clone the repository
git clone https://github.com/yourusername/factcheckr.git
cd factcheckr
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
# Install in development mode
pip install -e .
# Install development dependencies
pip install pytest build twine
```
### Running Tests
```bash
# Run all tests
pytest
# Run with verbose output
pytest -v
# Run specific test file
pytest tests/test_core.py
# Run with coverage
pytest --cov=factcheckr
```
### Building and Publishing
```bash
# Clean previous builds
rm -rf build/ dist/ *.egg-info/
# Build the package
python -m build
# Check the package
twine check dist/*
# Upload to Test PyPI
twine upload --repository testpypi dist/*
# Upload to PyPI
twine upload dist/*
```
### Using the Deployment Script
A comprehensive deployment script is included:
```bash
# Full deployment to PyPI
python deploy.py
# Deploy to Test PyPI
python deploy.py --test
# Skip tests during deployment
python deploy.py --skip-tests
# Build only (skip upload)
python deploy.py --skip-upload
```
## API Reference
### CompleteFactCheckr Class
```python
class CompleteFactCheckr:
def __init__(self, api_url: str = None)
def fact_check_with_ai(self, claim: str) -> dict
def extract_claim(self, text: str) -> str
```
#### Methods
- **`fact_check_with_ai(claim: str) -> dict`**: Main fact-checking method
- **Parameters**: `claim` - The claim to fact-check
- **Returns**: Dictionary with `verdict`, `evidence`, and `confidence`
- **`extract_claim(text: str) -> str`**: Extract the main claim from text
- **Parameters**: `text` - Input text
- **Returns**: Extracted claim string
## Contributing
We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
### Quick Contribution Steps
1. Fork the repository
2. Create a feature branch: `git checkout -b feature-name`
3. Make your changes
4. Add tests for new functionality
5. Run tests: `pytest`
6. Commit changes: `git commit -am 'Add feature'`
7. Push to branch: `git push origin feature-name`
8. Submit a Pull Request
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Changelog
### v1.0.1
- Enhanced error handling and fallback system
- Improved cross-platform compatibility
- Added comprehensive test suite
- Better CLI argument parsing
- JSON output support
- Interactive mode improvements
### v1.0.0
- Initial release
- Basic fact-checking functionality
- Command-line interface
- AI integration
## Support
If you encounter any issues or have questions:
1. Check the [Troubleshooting](#troubleshooting) section
2. Search [existing issues](https://github.com/yourusername/factcheckr/issues)
3. Create a [new issue](https://github.com/yourusername/factcheckr/issues/new)
## Acknowledgments
- Thanks to the Hack Club AI for providing the AI fact-checking capabilities
- Inspired by the need for reliable fact-checking tools in the digital age
- Built with Python and modern packaging best practices
---
**Made with ❤️ for truth and accuracy**
Raw data
{
"_id": null,
"home_page": null,
"name": "factcheckr",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "fact-checking, ai, nlp, verification, truth, claims",
"author": null,
"author_email": "FactCheckr Team <contact@factcheckr.dev>",
"download_url": "https://files.pythonhosted.org/packages/e6/a6/564c203dbe1d501c582bf3aa38eae650ed7b41b43d88ffadebdb6e621f07/factcheckr-1.0.1.tar.gz",
"platform": null,
"description": "# FactCheckr \ud83d\udd0d\r\n\r\nA powerful AI-powered fact-checking tool that helps you verify claims and statements with confidence scores and detailed evidence.\r\n\r\n[](https://badge.fury.io/py/factcheckr)\r\n[](https://pypi.org/project/factcheckr/)\r\n[](https://opensource.org/licenses/MIT)\r\n[](https://github.com/yourusername/factcheckr/actions)\r\n\r\n## Features\r\n\r\n- \ud83e\udd16 **AI-Powered Analysis**: Uses advanced AI models to fact-check claims\r\n- \ud83d\udcca **Confidence Scoring**: Provides confidence levels for each fact-check\r\n- \ud83d\udcdd **Detailed Evidence**: Returns comprehensive evidence and reasoning\r\n- \ud83d\udd04 **Fallback System**: Robust fallback for common claims when AI is unavailable\r\n- \ud83d\udcbb **Cross-Platform**: Works on Windows, macOS, and Linux\r\n- \ud83c\udfaf **Multiple Input Methods**: Command-line, interactive mode, and stdin support\r\n- \ud83d\udccb **JSON Output**: Machine-readable output format available\r\n- \ud83d\ude80 **Easy Installation**: Available on PyPI with simple pip install\r\n\r\n## Quick Start\r\n\r\n### Installation\r\n\r\n#### From PyPI (Recommended)\r\n```bash\r\npip install factcheckr\r\n```\r\n\r\n#### From GitHub\r\n```bash\r\npip install git+https://github.com/yourusername/factcheckr.git\r\n```\r\n\r\n#### Development Installation\r\n```bash\r\ngit clone https://github.com/yourusername/factcheckr.git\r\ncd factcheckr\r\npip install -e .\r\n```\r\n\r\n### Basic Usage\r\n\r\n#### Command Line\r\n```bash\r\n# Check a single claim\r\nfactcheckr \"The Earth is round\"\r\n\r\n# Alternative syntax\r\npython -m factcheckr \"Cats have 9 lives\"\r\n\r\n# Get JSON output\r\nfactcheckr \"Water boils at 100\u00b0C\" --json\r\n\r\n# Interactive mode\r\nfactcheckr --interactive\r\n\r\n# Read from stdin\r\necho \"The moon is made of cheese\" | factcheckr --stdin\r\n\r\n# Verbose output\r\nfactcheckr \"Birds can fly\" --verbose\r\n```\r\n\r\n#### Python API\r\n```python\r\nfrom factcheckr import CompleteFactCheckr\r\n\r\n# Initialize the fact checker\r\nchecker = CompleteFactCheckr()\r\n\r\n# Check a claim\r\nresult = checker.fact_check_with_ai(\"The Earth is flat\")\r\nprint(f\"Verdict: {result['verdict']}\")\r\nprint(f\"Evidence: {result['evidence']}\")\r\nprint(f\"Confidence: {result['confidence']}\")\r\n```\r\n\r\n## Installation Verification\r\n\r\nAfter installation, verify that FactCheckr is working correctly:\r\n\r\n```bash\r\n# Check version\r\nfactcheckr --version\r\n\r\n# Test with a simple claim\r\nfactcheckr \"Water is wet\"\r\n\r\n# Test JSON output\r\nfactcheckr \"The sky is blue\" --json\r\n```\r\n\r\n## Command Line Options\r\n\r\n```\r\nusage: factcheckr [-h] [--version] [--interactive] [--stdin] [--json] [--verbose] [claim]\r\n\r\nAI-powered fact-checking tool\r\n\r\npositional arguments:\r\n claim The claim to fact-check\r\n\r\noptions:\r\n -h, --help show this help message and exit\r\n --version show program's version number and exit\r\n --interactive Enter interactive mode\r\n --stdin Read claims from stdin\r\n --json Output results in JSON format\r\n --verbose Enable verbose output\r\n```\r\n\r\n## Output Format\r\n\r\n### Standard Output\r\n```\r\nClaim: \"The Earth is round\"\r\nVerdict: True\r\nEvidence: The Earth is an oblate spheroid, confirmed by satellite imagery, physics, and centuries of scientific observation.\r\nConfidence: 0.95\r\n```\r\n\r\n### JSON Output\r\n```json\r\n{\r\n \"claim\": \"The Earth is round\",\r\n \"verdict\": \"True\",\r\n \"evidence\": \"The Earth is an oblate spheroid, confirmed by satellite imagery, physics, and centuries of scientific observation.\",\r\n \"confidence\": 0.95\r\n}\r\n```\r\n\r\n## Platform-Specific Instructions\r\n\r\n### Windows\r\n```cmd\r\n# Using Command Prompt\r\npip install factcheckr\r\nfactcheckr \"Your claim here\"\r\n\r\n# Using PowerShell\r\npip install factcheckr\r\nfactcheckr \"Your claim here\"\r\n```\r\n\r\n### macOS\r\n```bash\r\n# Using Homebrew Python (recommended)\r\nbrew install python\r\npip3 install factcheckr\r\nfactcheckr \"Your claim here\"\r\n\r\n# Using system Python\r\npython3 -m pip install factcheckr\r\npython3 -m factcheckr \"Your claim here\"\r\n```\r\n\r\n### Linux\r\n```bash\r\n# Ubuntu/Debian\r\nsudo apt update\r\nsudo apt install python3-pip\r\npip3 install factcheckr\r\nfactcheckr \"Your claim here\"\r\n\r\n# CentOS/RHEL/Fedora\r\nsudo yum install python3-pip # or dnf on newer versions\r\npip3 install factcheckr\r\nfactcheckr \"Your claim here\"\r\n```\r\n\r\n## Troubleshooting\r\n\r\n### Common Issues\r\n\r\n#### \"Command not found\" Error\r\nIf you get a \"command not found\" error, try:\r\n\r\n1. **Use the module syntax**:\r\n ```bash\r\n python -m factcheckr \"Your claim\"\r\n ```\r\n\r\n2. **Check your PATH** (add Python Scripts directory):\r\n - **Windows**: Add `%APPDATA%\\Python\\Python3x\\Scripts` to PATH\r\n - **macOS/Linux**: Add `~/.local/bin` to PATH\r\n\r\n3. **Reinstall with user flag**:\r\n ```bash\r\n pip install --user factcheckr\r\n ```\r\n\r\n#### Installation Issues\r\n\r\n1. **Upgrade pip first**:\r\n ```bash\r\n python -m pip install --upgrade pip\r\n ```\r\n\r\n2. **Use virtual environment**:\r\n ```bash\r\n python -m venv factcheckr_env\r\n # Windows\r\n factcheckr_env\\Scripts\\activate\r\n # macOS/Linux\r\n source factcheckr_env/bin/activate\r\n pip install factcheckr\r\n ```\r\n\r\n3. **Install from source**:\r\n ```bash\r\n git clone https://github.com/yourusername/factcheckr.git\r\n cd factcheckr\r\n pip install -e .\r\n ```\r\n\r\n#### AI Service Issues\r\n\r\nFactCheckr includes a robust fallback system for common claims when the AI service is unavailable. If you encounter AI-related errors:\r\n\r\n1. The tool will automatically fall back to heuristic-based checking for common claims\r\n2. Check your internet connection\r\n3. The fallback system handles claims like:\r\n - \"Cats have 9 lives\" \u2192 Likely False\r\n - \"The Earth is flat\" \u2192 False\r\n - \"Water boils at 100 degrees Celsius\" \u2192 Likely True\r\n\r\n## Development\r\n\r\n### Setting Up Development Environment\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/yourusername/factcheckr.git\r\ncd factcheckr\r\n\r\n# Create virtual environment\r\npython -m venv venv\r\n\r\n# Activate virtual environment\r\n# Windows\r\nvenv\\Scripts\\activate\r\n# macOS/Linux\r\nsource venv/bin/activate\r\n\r\n# Install in development mode\r\npip install -e .\r\n\r\n# Install development dependencies\r\npip install pytest build twine\r\n```\r\n\r\n### Running Tests\r\n\r\n```bash\r\n# Run all tests\r\npytest\r\n\r\n# Run with verbose output\r\npytest -v\r\n\r\n# Run specific test file\r\npytest tests/test_core.py\r\n\r\n# Run with coverage\r\npytest --cov=factcheckr\r\n```\r\n\r\n### Building and Publishing\r\n\r\n```bash\r\n# Clean previous builds\r\nrm -rf build/ dist/ *.egg-info/\r\n\r\n# Build the package\r\npython -m build\r\n\r\n# Check the package\r\ntwine check dist/*\r\n\r\n# Upload to Test PyPI\r\ntwine upload --repository testpypi dist/*\r\n\r\n# Upload to PyPI\r\ntwine upload dist/*\r\n```\r\n\r\n### Using the Deployment Script\r\n\r\nA comprehensive deployment script is included:\r\n\r\n```bash\r\n# Full deployment to PyPI\r\npython deploy.py\r\n\r\n# Deploy to Test PyPI\r\npython deploy.py --test\r\n\r\n# Skip tests during deployment\r\npython deploy.py --skip-tests\r\n\r\n# Build only (skip upload)\r\npython deploy.py --skip-upload\r\n```\r\n\r\n## API Reference\r\n\r\n### CompleteFactCheckr Class\r\n\r\n```python\r\nclass CompleteFactCheckr:\r\n def __init__(self, api_url: str = None)\r\n def fact_check_with_ai(self, claim: str) -> dict\r\n def extract_claim(self, text: str) -> str\r\n```\r\n\r\n#### Methods\r\n\r\n- **`fact_check_with_ai(claim: str) -> dict`**: Main fact-checking method\r\n - **Parameters**: `claim` - The claim to fact-check\r\n - **Returns**: Dictionary with `verdict`, `evidence`, and `confidence`\r\n\r\n- **`extract_claim(text: str) -> str`**: Extract the main claim from text\r\n - **Parameters**: `text` - Input text\r\n - **Returns**: Extracted claim string\r\n\r\n## Contributing\r\n\r\nWe welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.\r\n\r\n### Quick Contribution Steps\r\n\r\n1. Fork the repository\r\n2. Create a feature branch: `git checkout -b feature-name`\r\n3. Make your changes\r\n4. Add tests for new functionality\r\n5. Run tests: `pytest`\r\n6. Commit changes: `git commit -am 'Add feature'`\r\n7. Push to branch: `git push origin feature-name`\r\n8. Submit a Pull Request\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Changelog\r\n\r\n### v1.0.1\r\n- Enhanced error handling and fallback system\r\n- Improved cross-platform compatibility\r\n- Added comprehensive test suite\r\n- Better CLI argument parsing\r\n- JSON output support\r\n- Interactive mode improvements\r\n\r\n### v1.0.0\r\n- Initial release\r\n- Basic fact-checking functionality\r\n- Command-line interface\r\n- AI integration\r\n\r\n## Support\r\n\r\nIf you encounter any issues or have questions:\r\n\r\n1. Check the [Troubleshooting](#troubleshooting) section\r\n2. Search [existing issues](https://github.com/yourusername/factcheckr/issues)\r\n3. Create a [new issue](https://github.com/yourusername/factcheckr/issues/new)\r\n\r\n## Acknowledgments\r\n\r\n- Thanks to the Hack Club AI for providing the AI fact-checking capabilities\r\n- Inspired by the need for reliable fact-checking tools in the digital age\r\n- Built with Python and modern packaging best practices\r\n\r\n---\r\n\r\n**Made with \u2764\ufe0f for truth and accuracy**\r\n",
"bugtrack_url": null,
"license": null,
"summary": "AI-powered fact-checking tool with fallback mechanisms",
"version": "1.0.1",
"project_urls": {
"Bug Reports": "https://github.com/factcheckr/factcheckr/issues",
"Documentation": "https://github.com/factcheckr/factcheckr#readme",
"Homepage": "https://github.com/factcheckr/factcheckr",
"Source": "https://github.com/factcheckr/factcheckr"
},
"split_keywords": [
"fact-checking",
" ai",
" nlp",
" verification",
" truth",
" claims"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c253c3e6521ff6b81ebad1bcab5867cbfa16435eefb09296a9cf19454650d832",
"md5": "c03a63fb4101bd096ef803a8fbaad348",
"sha256": "bccb05f32a761d47fa45d5e3c6e7fe8383e394af6a893611645a666e623cc278"
},
"downloads": -1,
"filename": "factcheckr-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c03a63fb4101bd096ef803a8fbaad348",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 11283,
"upload_time": "2025-07-11T16:51:46",
"upload_time_iso_8601": "2025-07-11T16:51:46.211294Z",
"url": "https://files.pythonhosted.org/packages/c2/53/c3e6521ff6b81ebad1bcab5867cbfa16435eefb09296a9cf19454650d832/factcheckr-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e6a6564c203dbe1d501c582bf3aa38eae650ed7b41b43d88ffadebdb6e621f07",
"md5": "aa7ebcce234354d7153fb5d10d4a0718",
"sha256": "3dbd553f54a68052e4132c27ff61fa0129226502f100fefba9b9dfebd6981c9e"
},
"downloads": -1,
"filename": "factcheckr-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "aa7ebcce234354d7153fb5d10d4a0718",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 22592,
"upload_time": "2025-07-11T16:51:47",
"upload_time_iso_8601": "2025-07-11T16:51:47.319345Z",
"url": "https://files.pythonhosted.org/packages/e6/a6/564c203dbe1d501c582bf3aa38eae650ed7b41b43d88ffadebdb6e621f07/factcheckr-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 16:51:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "factcheckr",
"github_project": "factcheckr",
"github_not_found": true,
"lcname": "factcheckr"
}