Prerequisites
Before installing Artifact Miner, ensure you have the following tools installed:Required
Python 3.11 or higher
Python 3.11 or higher
Artifact Miner requires Python 3.11+ for modern type hints and performance improvements.Verify your Python version:Expected output: Install Python 3.11+ on macOS (Homebrew):
Python 3.11.0 or higherInstall Python 3.11+ on Ubuntu/Debian:uv (Universal Python Package Manager)
uv (Universal Python Package Manager)
uv is an extremely fast Python package installer and resolver. Artifact Miner uses uv for dependency management.Install uv:Git
Git
Required for cloning the repository and analyzing Git-based projects.Verify Git installation:Install Git:
- Ubuntu/Debian:
sudo apt install git - macOS:
brew install gitor use Xcode Command Line Tools - Windows: Download from git-scm.com
Optional
Bun (for OpenTUI React client)
Bun (for OpenTUI React client)
Only needed if you want to run the experimental React-based OpenTUI client.Install Bun:Usage:
OpenAI API Key
OpenAI API Key
Required only if you want cloud-based LLM summaries via OpenAI.
- Get an API key from platform.openai.com
- Add to your
.envfile:
Ollama (for local LLM)
Ollama (for local LLM)
Required only if you want local LLM-powered summaries without cloud dependencies.Install Ollama:Pull a model:Configure in .env:
Installation Steps
Clone the repository
Replace
<repository-url> with the actual repository URL provided by your team or organization.Install dependencies with uv
- Creates a virtual environment if one doesn’t exist
- Installs all dependencies from
pyproject.toml:- FastAPI + Uvicorn (API server)
- SQLAlchemy + Alembic (database)
- Textual (TUI framework)
- GitPython (Git analysis)
- OpenAI SDK (optional LLM)
- Ollama SDK (optional local LLM)
- And more…
Initialize the database
Run Alembic migrations to create the database schema:This command:You should see a file around 20-50 KB after initial migrations.
- Creates
artifactminer.db(SQLite database) - Applies all migrations from
alembic/versions/ - Sets up tables for:
- Artifacts, Questions, Consents
- RepoStats, UserRepoStats
- ProjectSkills, UserProjectSkills
- ResumeItems, ProjectEvidence
- UploadedZips, RepresentationPreferences
Environment Setup
Development Dependencies
For contributors or those running tests, install dev dependencies:pytest+pytest-asyncio(testing)ruff(linting)mypy(type checking)
Running Tests
- API endpoints (
tests/api/) - Database models (
tests/db/) - Repository intelligence (
tests/Repository-Intelligence-tests/) - Skills extraction (
tests/test_skill_extraction.py) - Evidence orchestration (
tests/evidence/) - TUI screens (
tests/tui/) - CLI flows (
tests/test_cli.py)
Project Structure
Database Migrations (Alembic)
Keep Database Up to Date
After pulling updates from Git:Check Current Migration Status
View Migration History
Creating a New Migration
Generate migration
- Compare your models to the current database schema
- Generate a migration script in
alembic/versions/ - Name it with a hash + your message
Review generated migration
Open the new file in
alembic/versions/ and verify:upgrade()function adds expected changesdowngrade()function reverses those changes
Downgrade a Migration
If you need to undo the last migration:Seed Data
On API startup, baseline question records are automatically seeded when thequestions table is empty. This happens in src/artifactminer/db/seeders.py.
Running Artifact Miner
Option 1: FastAPI Backend
Start the development server with auto-reload:src/artifactminer/api/main.py):
- Host:
127.0.0.1(localhost only) - Port:
8000 - Reload: Auto-restarts on code changes
- API Docs: http://127.0.0.1:8000/docs
Option 2: Textual TUI
Launch the interactive terminal UI:- Welcome screen
- Consent flow
- User configuration
- ZIP upload
- Directory selection
- Analysis progress
- Resume/timeline views
Option 3: CLI
Run in interactive mode:-i, --input: Path to ZIP file containing projects-o, --output: Output file path (.txtfor text,.jsonfor JSON)-c, --consent: Consent level (full,no_llm,none)-u, --user-email: User email for tracking
Troubleshooting
Database Locked Error
Problem:sqlite3.OperationalError: database is locked
Solution: Ensure only one instance of the API or TUI is running. SQLite doesn’t handle concurrent writes well.
Migration Conflicts
Problem:FAILED: Multiple head revisions are present
Solution:
Missing Dependencies
Problem:ModuleNotFoundError: No module named 'artifactminer'
Solution:
Port Already in Use
Problem:OSError: [Errno 48] Address already in use
Solution:
Next Steps
Quickstart
Analyze your first project in 5 minutes
API Reference
Explore all available endpoints
CLI Usage
Advanced CLI workflows and automation
Contributing
Set up your development environment