interview-generator


Nameinterview-generator JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA CLI tool to generate contextual interview questions from Python codebases using AI
upload_time2025-09-05 22:30:41
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords interview questions python code-analysis ai cli hiring
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ๐ŸŽฏ Interview Question Generator

A powerful CLI tool that analyzes Python codebases and automatically generates contextual technical interview questions using AI. Perfect for hiring managers, technical interviewers, and educators who want to create relevant, code-specific interview questions.

## โœจ Features

- **๐Ÿ” Intelligent Code Analysis**: Deep analysis of Python code structure, patterns, and complexity
- **๐Ÿค– AI-Powered Question Generation**: Uses OpenAI's GPT models to generate contextual questions
- **๐Ÿ“Š Multiple Question Categories**: Comprehension, debugging, optimization, design, edge cases, and more
- **๐ŸŽš๏ธ Difficulty Levels**: Beginner, intermediate, advanced, and expert questions
- **๐Ÿ“„ Multiple Output Formats**: JSON, Markdown, structured reports
- **โšก Fast Processing**: Efficient analysis with progress tracking
- **๐Ÿ› ๏ธ Configurable**: Flexible configuration options and CLI parameters

## ๐Ÿš€ Installation

### Install from GitHub

```bash
pip install git+https://github.com/your-username/interview-generator.git
```

### Install for Development

```bash
git clone https://github.com/your-username/interview-generator.git
cd interview-generator
pip install -e .
```

### Install with Development Dependencies

```bash
pip install -e ".[dev,test]"
```

## ๐Ÿ“‹ Prerequisites

- Python 3.8 or higher
- OpenAI API key (get one at [OpenAI](https://platform.openai.com/api-keys))

## ๐Ÿ”ง Quick Start

### 1. Set up your API key

```bash
export OPENAI_API_KEY="your-api-key-here"
```

Or create a configuration file:

```bash
interview-generator config create --interactive
```

### 2. Analyze your code

```bash
# Basic analysis
interview-generator analyze /path/to/your/project

# Save as Markdown
interview-generator analyze /path/to/your/project --format markdown --output questions.md

# Generate specific question types
interview-generator analyze /path/to/your/project \
  --categories comprehension debugging optimization \
  --difficulty intermediate advanced \
  --max-questions 15
```

## ๐Ÿ“– Usage Examples

### Basic Analysis
```bash
# Analyze a directory with default settings
interview-generator analyze ./src

# Analyze and save to a specific file
interview-generator analyze ./src --output interview_questions.json
```

### Advanced Filtering
```bash
# Generate only comprehension and debugging questions
interview-generator analyze ./src -c comprehension -c debugging

# Filter by difficulty level
interview-generator analyze ./src -d intermediate -d advanced

# Limit the number of questions
interview-generator analyze ./src --max-questions 20
```

### Different Output Formats
```bash
# Export as Markdown
interview-generator analyze ./src --format markdown --output questions.md

# Create structured output with reports
interview-generator analyze ./src --format structured --output ./results

# Export both JSON and Markdown
interview-generator analyze ./src --format both --output questions
```

### Configuration Management
```bash
# Create interactive configuration
interview-generator config create --interactive

# Validate your setup
interview-generator validate setup

# Test API connectivity
interview-generator validate api

# Show current configuration
interview-generator config show
```

## ๐ŸŽฏ Question Categories

The tool generates questions in several categories:

- **๐Ÿง  Comprehension**: Understanding code purpose and functionality
- **๐Ÿ› Debugging**: Identifying and fixing issues
- **โšก Optimization**: Performance improvements and efficiency
- **๐Ÿ—๏ธ Design**: Architecture and design patterns
- **๐Ÿ” Edge Cases**: Boundary conditions and error handling
- **๐Ÿงช Testing**: Test strategies and coverage
- **โ™ป๏ธ Refactoring**: Code improvement and maintainability
- **๐Ÿ”’ Security**: Security vulnerabilities and best practices

## ๐ŸŽš๏ธ Difficulty Levels

- **๐ŸŸข Beginner**: Basic concepts and simple implementations
- **๐ŸŸก Intermediate**: Moderate complexity and common patterns
- **๐ŸŸ  Advanced**: Complex algorithms and advanced concepts
- **๐Ÿ”ด Expert**: Highly sophisticated and specialized knowledge

## โš™๏ธ Configuration

### Environment Variables
- `OPENAI_API_KEY`: Your OpenAI API key
- `INTERVIEW_GENERATOR_CONFIG`: Path to custom config file

### Configuration File
Create a configuration file for persistent settings:

```bash
interview-generator config create --interactive
```

Example configuration:
```json
{
  "llm_api_key": "your-api-key",
  "llm_model": "gpt-3.5-turbo",
  "max_questions_per_category": 5,
  "output_format": "json",
  "include_hints": true,
  "quality_threshold": 0.7
}
```

## ๐Ÿ” CLI Reference

### Main Commands

- `analyze`: Analyze code and generate questions
- `config`: Manage configuration settings
- `validate`: Validate setup and test components

### Global Options

- `--verbose, -v`: Enable verbose output
- `--help`: Show help information
- `--version`: Show version information

### Analyze Command Options

```bash
interview-generator analyze [OPTIONS] DIRECTORY

Options:
  -o, --output PATH           Output file or directory path
  -f, --format [json|markdown|both|structured]
                             Output format (default: json)
  -c, --categories [comprehension|debugging|optimization|design|edge_cases|testing|refactoring|security]
                             Question categories (can be used multiple times)
  -d, --difficulty [beginner|intermediate|advanced|expert]
                             Difficulty levels (can be used multiple times)
  -n, --max-questions INTEGER RANGE
                             Maximum number of questions (1-50, default: 10)
  --config PATH              Path to configuration file
  --dry-run                  Show what would be analyzed without API calls
  -q, --quiet                Suppress progress output
  --help                     Show this message and exit
```

## ๐Ÿงช Development

### Running Tests
```bash
pytest
```

### Code Formatting
```bash
black src tests
isort src tests
```

### Type Checking
```bash
mypy src
```

### Pre-commit Hooks
```bash
pre-commit install
pre-commit run --all-files
```

## ๐Ÿ“Š Example Output

### JSON Format
```json
{
  "questions": [
    {
      "id": "q1",
      "category": "comprehension",
      "difficulty": "intermediate",
      "question_text": "Explain the purpose of the UserManager class...",
      "code_snippet": "class UserManager:\n    def authenticate(self, username, password):\n        ...",
      "expected_answer": "The UserManager class handles user authentication...",
      "hints": ["Focus on the authentication method", "Consider security implications"],
      "context_references": ["Domain: web", "Pattern: authentication"]
    }
  ],
  "metadata": {
    "total_questions": 10,
    "processing_time": 15.2,
    "files_analyzed": 5,
    "model_used": "gpt-3.5-turbo"
  }
}
```

### Markdown Format
```markdown
# Interview Questions

## Question 1: Code Comprehension (Intermediate)

**Question:** Explain the purpose and functionality of the UserManager class.

**Code:**
```python
class UserManager:
    def authenticate(self, username, password):
        # Implementation details...
```

**Expected Answer:** The UserManager class handles user authentication...

**Hints:**
- Focus on the authentication method
- Consider security implications
```

## ๐Ÿค Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run tests (`pytest`)
5. Commit your changes (`git commit -m 'Add amazing feature'`)
6. Push to the branch (`git push origin feature/amazing-feature`)
7. Open a Pull Request

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- OpenAI for providing the GPT models
- The Python community for excellent tooling and libraries
- Contributors and users who help improve this tool

## ๐Ÿ“ž Support

- ๐Ÿ“– [Documentation](https://github.com/your-username/interview-generator#readme)
- ๐Ÿ› [Issue Tracker](https://github.com/your-username/interview-generator/issues)
- ๐Ÿ’ฌ [Discussions](https://github.com/your-username/interview-generator/discussions)

---

Made with โค๏ธ for the developer community

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "interview-generator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "interview, questions, python, code-analysis, ai, cli, hiring",
    "author": null,
    "author_email": "Interview Generator Team <contact@interview-generator.dev>",
    "download_url": "https://files.pythonhosted.org/packages/60/35/4b3f5f2594f56b6bc449c76d9fac1e3ba8b1baad2d35ff88f371a9dd1354/interview_generator-1.0.0.tar.gz",
    "platform": null,
    "description": "# \ud83c\udfaf Interview Question Generator\n\nA powerful CLI tool that analyzes Python codebases and automatically generates contextual technical interview questions using AI. Perfect for hiring managers, technical interviewers, and educators who want to create relevant, code-specific interview questions.\n\n## \u2728 Features\n\n- **\ud83d\udd0d Intelligent Code Analysis**: Deep analysis of Python code structure, patterns, and complexity\n- **\ud83e\udd16 AI-Powered Question Generation**: Uses OpenAI's GPT models to generate contextual questions\n- **\ud83d\udcca Multiple Question Categories**: Comprehension, debugging, optimization, design, edge cases, and more\n- **\ud83c\udf9a\ufe0f Difficulty Levels**: Beginner, intermediate, advanced, and expert questions\n- **\ud83d\udcc4 Multiple Output Formats**: JSON, Markdown, structured reports\n- **\u26a1 Fast Processing**: Efficient analysis with progress tracking\n- **\ud83d\udee0\ufe0f Configurable**: Flexible configuration options and CLI parameters\n\n## \ud83d\ude80 Installation\n\n### Install from GitHub\n\n```bash\npip install git+https://github.com/your-username/interview-generator.git\n```\n\n### Install for Development\n\n```bash\ngit clone https://github.com/your-username/interview-generator.git\ncd interview-generator\npip install -e .\n```\n\n### Install with Development Dependencies\n\n```bash\npip install -e \".[dev,test]\"\n```\n\n## \ud83d\udccb Prerequisites\n\n- Python 3.8 or higher\n- OpenAI API key (get one at [OpenAI](https://platform.openai.com/api-keys))\n\n## \ud83d\udd27 Quick Start\n\n### 1. Set up your API key\n\n```bash\nexport OPENAI_API_KEY=\"your-api-key-here\"\n```\n\nOr create a configuration file:\n\n```bash\ninterview-generator config create --interactive\n```\n\n### 2. Analyze your code\n\n```bash\n# Basic analysis\ninterview-generator analyze /path/to/your/project\n\n# Save as Markdown\ninterview-generator analyze /path/to/your/project --format markdown --output questions.md\n\n# Generate specific question types\ninterview-generator analyze /path/to/your/project \\\n  --categories comprehension debugging optimization \\\n  --difficulty intermediate advanced \\\n  --max-questions 15\n```\n\n## \ud83d\udcd6 Usage Examples\n\n### Basic Analysis\n```bash\n# Analyze a directory with default settings\ninterview-generator analyze ./src\n\n# Analyze and save to a specific file\ninterview-generator analyze ./src --output interview_questions.json\n```\n\n### Advanced Filtering\n```bash\n# Generate only comprehension and debugging questions\ninterview-generator analyze ./src -c comprehension -c debugging\n\n# Filter by difficulty level\ninterview-generator analyze ./src -d intermediate -d advanced\n\n# Limit the number of questions\ninterview-generator analyze ./src --max-questions 20\n```\n\n### Different Output Formats\n```bash\n# Export as Markdown\ninterview-generator analyze ./src --format markdown --output questions.md\n\n# Create structured output with reports\ninterview-generator analyze ./src --format structured --output ./results\n\n# Export both JSON and Markdown\ninterview-generator analyze ./src --format both --output questions\n```\n\n### Configuration Management\n```bash\n# Create interactive configuration\ninterview-generator config create --interactive\n\n# Validate your setup\ninterview-generator validate setup\n\n# Test API connectivity\ninterview-generator validate api\n\n# Show current configuration\ninterview-generator config show\n```\n\n## \ud83c\udfaf Question Categories\n\nThe tool generates questions in several categories:\n\n- **\ud83e\udde0 Comprehension**: Understanding code purpose and functionality\n- **\ud83d\udc1b Debugging**: Identifying and fixing issues\n- **\u26a1 Optimization**: Performance improvements and efficiency\n- **\ud83c\udfd7\ufe0f Design**: Architecture and design patterns\n- **\ud83d\udd0d Edge Cases**: Boundary conditions and error handling\n- **\ud83e\uddea Testing**: Test strategies and coverage\n- **\u267b\ufe0f Refactoring**: Code improvement and maintainability\n- **\ud83d\udd12 Security**: Security vulnerabilities and best practices\n\n## \ud83c\udf9a\ufe0f Difficulty Levels\n\n- **\ud83d\udfe2 Beginner**: Basic concepts and simple implementations\n- **\ud83d\udfe1 Intermediate**: Moderate complexity and common patterns\n- **\ud83d\udfe0 Advanced**: Complex algorithms and advanced concepts\n- **\ud83d\udd34 Expert**: Highly sophisticated and specialized knowledge\n\n## \u2699\ufe0f Configuration\n\n### Environment Variables\n- `OPENAI_API_KEY`: Your OpenAI API key\n- `INTERVIEW_GENERATOR_CONFIG`: Path to custom config file\n\n### Configuration File\nCreate a configuration file for persistent settings:\n\n```bash\ninterview-generator config create --interactive\n```\n\nExample configuration:\n```json\n{\n  \"llm_api_key\": \"your-api-key\",\n  \"llm_model\": \"gpt-3.5-turbo\",\n  \"max_questions_per_category\": 5,\n  \"output_format\": \"json\",\n  \"include_hints\": true,\n  \"quality_threshold\": 0.7\n}\n```\n\n## \ud83d\udd0d CLI Reference\n\n### Main Commands\n\n- `analyze`: Analyze code and generate questions\n- `config`: Manage configuration settings\n- `validate`: Validate setup and test components\n\n### Global Options\n\n- `--verbose, -v`: Enable verbose output\n- `--help`: Show help information\n- `--version`: Show version information\n\n### Analyze Command Options\n\n```bash\ninterview-generator analyze [OPTIONS] DIRECTORY\n\nOptions:\n  -o, --output PATH           Output file or directory path\n  -f, --format [json|markdown|both|structured]\n                             Output format (default: json)\n  -c, --categories [comprehension|debugging|optimization|design|edge_cases|testing|refactoring|security]\n                             Question categories (can be used multiple times)\n  -d, --difficulty [beginner|intermediate|advanced|expert]\n                             Difficulty levels (can be used multiple times)\n  -n, --max-questions INTEGER RANGE\n                             Maximum number of questions (1-50, default: 10)\n  --config PATH              Path to configuration file\n  --dry-run                  Show what would be analyzed without API calls\n  -q, --quiet                Suppress progress output\n  --help                     Show this message and exit\n```\n\n## \ud83e\uddea Development\n\n### Running Tests\n```bash\npytest\n```\n\n### Code Formatting\n```bash\nblack src tests\nisort src tests\n```\n\n### Type Checking\n```bash\nmypy src\n```\n\n### Pre-commit Hooks\n```bash\npre-commit install\npre-commit run --all-files\n```\n\n## \ud83d\udcca Example Output\n\n### JSON Format\n```json\n{\n  \"questions\": [\n    {\n      \"id\": \"q1\",\n      \"category\": \"comprehension\",\n      \"difficulty\": \"intermediate\",\n      \"question_text\": \"Explain the purpose of the UserManager class...\",\n      \"code_snippet\": \"class UserManager:\\n    def authenticate(self, username, password):\\n        ...\",\n      \"expected_answer\": \"The UserManager class handles user authentication...\",\n      \"hints\": [\"Focus on the authentication method\", \"Consider security implications\"],\n      \"context_references\": [\"Domain: web\", \"Pattern: authentication\"]\n    }\n  ],\n  \"metadata\": {\n    \"total_questions\": 10,\n    \"processing_time\": 15.2,\n    \"files_analyzed\": 5,\n    \"model_used\": \"gpt-3.5-turbo\"\n  }\n}\n```\n\n### Markdown Format\n```markdown\n# Interview Questions\n\n## Question 1: Code Comprehension (Intermediate)\n\n**Question:** Explain the purpose and functionality of the UserManager class.\n\n**Code:**\n```python\nclass UserManager:\n    def authenticate(self, username, password):\n        # Implementation details...\n```\n\n**Expected Answer:** The UserManager class handles user authentication...\n\n**Hints:**\n- Focus on the authentication method\n- Consider security implications\n```\n\n## \ud83e\udd1d Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Run tests (`pytest`)\n5. Commit your changes (`git commit -m 'Add amazing feature'`)\n6. Push to the branch (`git push origin feature/amazing-feature`)\n7. Open a Pull Request\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\ude4f Acknowledgments\n\n- OpenAI for providing the GPT models\n- The Python community for excellent tooling and libraries\n- Contributors and users who help improve this tool\n\n## \ud83d\udcde Support\n\n- \ud83d\udcd6 [Documentation](https://github.com/your-username/interview-generator#readme)\n- \ud83d\udc1b [Issue Tracker](https://github.com/your-username/interview-generator/issues)\n- \ud83d\udcac [Discussions](https://github.com/your-username/interview-generator/discussions)\n\n---\n\nMade with \u2764\ufe0f for the developer community\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CLI tool to generate contextual interview questions from Python codebases using AI",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/your-username/interview-generator/issues",
        "Documentation": "https://github.com/your-username/interview-generator#readme",
        "Homepage": "https://github.com/your-username/interview-generator",
        "Repository": "https://github.com/your-username/interview-generator"
    },
    "split_keywords": [
        "interview",
        " questions",
        " python",
        " code-analysis",
        " ai",
        " cli",
        " hiring"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "528d8615845a1960fceab3dc90eab571d359bfca951b1ee3e6c561b8de65411f",
                "md5": "03a01939f5a85fc72420a060f5f4af69",
                "sha256": "e46e544dfdfaebe4a5aeb4de4f5de04014928c191c13bc910fd625f4170ec0b9"
            },
            "downloads": -1,
            "filename": "interview_generator-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "03a01939f5a85fc72420a060f5f4af69",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 119467,
            "upload_time": "2025-09-05T22:30:39",
            "upload_time_iso_8601": "2025-09-05T22:30:39.510937Z",
            "url": "https://files.pythonhosted.org/packages/52/8d/8615845a1960fceab3dc90eab571d359bfca951b1ee3e6c561b8de65411f/interview_generator-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "60354b3f5f2594f56b6bc449c76d9fac1e3ba8b1baad2d35ff88f371a9dd1354",
                "md5": "52bc74ad70619a4b84fd40f59c75f2b0",
                "sha256": "19208b9211b27a5696cb02672f3b5d5cb4c716999fa8158797918a9663aebbc3"
            },
            "downloads": -1,
            "filename": "interview_generator-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "52bc74ad70619a4b84fd40f59c75f2b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 105053,
            "upload_time": "2025-09-05T22:30:41",
            "upload_time_iso_8601": "2025-09-05T22:30:41.197641Z",
            "url": "https://files.pythonhosted.org/packages/60/35/4b3f5f2594f56b6bc449c76d9fac1e3ba8b1baad2d35ff88f371a9dd1354/interview_generator-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-05 22:30:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "your-username",
    "github_project": "interview-generator",
    "github_not_found": true,
    "lcname": "interview-generator"
}
        
Elapsed time: 0.46277s