fluen


Namefluen JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/Fluen-io/fluen-core
SummaryLLM-based AI powered Code Documentation Generator
upload_time2024-11-13 19:00:19
maintainerNone
docs_urlNone
authorAbi Chatterjee
requires_python>=3.8
licenseNone
keywords documentation llm code-analysis
VCS
bugtrack_url
requirements click coverage exceptiongroup iniconfig Jinja2 markdown-it-py MarkupSafe mdurl packaging pluggy Pygments pytest pytest-asyncio pytest-cov python-magic PyYAML rich tomli typing_extensions mistralai openai
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Fluen: AI-Powered Code Documentation Generator

[![Build Status](https://github.com/Fluen-io/fluen-core/actions/workflows/build.yml/badge.svg)](https://github.com/Fluen-io/fluen-core/actions)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)

Fluen is a modern, LLM-powered documentation generator that understands your code. Point it at any git repository, and it will create comprehensive, intelligent documentation that captures not just the structure, but the intent and relationships within your codebase.

## ✨ Features

- **Language Agnostic**: Works with any programming language - understands patterns, idioms, and best practices across different languages
- **Intelligent Analysis**: Uses LLMs to understand code purpose, relationships, and architectural patterns
- **Git Integration**: Works with any git repository, tracks changes, and updates documentation incrementally
- **Rich Documentation**: Generates both HTML and Markdown documentation with:
  - Cross-referenced code elements
  - Dependency graphs
  - Public API documentation
  - Code purpose analysis
  - Framework detection

## 🚀 Quick Start

1. Install Fluen:
```bash
pip install fluen
```

2. Create a configuration file:
```bash
# Copy the example config
cp fluen_config.example.yml fluen_config.yml

# Edit the config file with your LLM provider settings
vim fluen_config.yml
```

3. Generate documentation:
The generate command analyzes the project and generates a code manifest.json file. We recommend you to first clone a repository and then run fluen from the root of your local repository.

```bash
# For local repository
fluen docs generate

# For remote repository
fluen docs generate --repo https://github.com/username/repo.git
```

Once the manifest.json generation succeeds, run the export command to export in html or markdown format

```bash
# Default export type configured in fluen_config.yml
fluen docs export

# Explicitly tell the export format type html/md
fluen docs export --type md
```

4. View your documentation:
```bash
# Documentation will be available in ./docs directory
open docs/html/index.html
```

5. Update your documentation
Fluen is designed to update documentation incrementally with git commits. However there might be scenarios where you need to fore an update. Simply use the `--force` flag
```bash
fluen docs generate --force
```

6. Selective scanning (of sub directories)
In case you want Fluen to look at only a specific sub-directory, then use the `--scan` flag
```bash
fluen docs generate --scan path:<your_sub_path>
```
You may use the `--force` flag to force updates
## 📖 Use Cases

### 1. Project Onboarding
Help new team members understand your codebase quickly with AI-generated documentation that explains not just what the code does, but why it does it.

### 2. Code Audits
Get a comprehensive view of your project's architecture, dependencies, and exposed APIs. Perfect for security audits and architectural reviews.

### 3. Technical Documentation
Generate and maintain up-to-date technical documentation without manual effort. Fluen tracks changes and updates only what's needed.

### 4. Legacy Code Understanding
Make sense of legacy codebases by letting Fluen analyze patterns, dependencies, and architectural decisions embedded in the code.

## ⚙️ Configuration

Fluen uses a YAML configuration file (`fluen_config.yml`) for customization. Here's a minimal configuration:

```yaml
llm:
  # Choose your provider: 'openai' or 'mistral' or 'ollama' for local use
  provider: openai
  api_key: your-api-key-here
  model: gpt-3.5-turbo  # or 'gpt-4o' for better results

# Output directory for generated documentation
output_dir: docs

# Documentation format
default_export_type: html  # or 'md' for markdown
```

See `fluen_config.example.yml` for a complete configuration example with all available options.

## 🔧 Requirements

- Python 3.9 or higher
- Git
- An API key from OpenAI or Mistral AI (recommended providers)

## 🚧 Roadmap

Exciting features coming soon:
- Interactive code chat interface with project-wide search
- Enhanced code element descriptions and relationships
- PDF export
- Custom template support
- Plugin system
- CI/CD integration

## 🤝 Contributing

We welcome contributions! Whether it's bug reports, feature requests, or code contributions, please feel free to contribute.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Install development dependencies:
```bash
pip install -e ".[dev]"
```
4. Make your changes
5. Run tests:
```bash
pytest
```
6. Submit a Pull Request

## 📄 License

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

## 🙋‍♂️ Support

- 📄 [Documentation](https://github.com/Fluen-io/fluen-core/wiki)
- 🐛 [Issue Tracker](https://github.com/Fluen-io/fluen-core/issues)
- 💬 [Discussions](https://github.com/Fluen-io/fluen-core/discussions)

## 🌟 Show your support

Give a ⭐️ if this project helped you!

---
Made with ❤️ by [Fluen](https://github.com/Fluen-io) using the [Jiva Framework](https://github.com/KarmaloopAI/Jiva) and Claude by [Anthropic](https://www.anthropic.com/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Fluen-io/fluen-core",
    "name": "fluen",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "documentation, llm, code-analysis",
    "author": "Abi Chatterjee",
    "author_email": "abi@fluen.io",
    "download_url": "https://files.pythonhosted.org/packages/6e/a8/6af7607d9f529eab48b8b5c4671a6dd1fd1e83afb913037b3825c0c2cf93/fluen-0.1.2.tar.gz",
    "platform": null,
    "description": "# Fluen: AI-Powered Code Documentation Generator\n\n[![Build Status](https://github.com/Fluen-io/fluen-core/actions/workflows/build.yml/badge.svg)](https://github.com/Fluen-io/fluen-core/actions)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)\n\nFluen is a modern, LLM-powered documentation generator that understands your code. Point it at any git repository, and it will create comprehensive, intelligent documentation that captures not just the structure, but the intent and relationships within your codebase.\n\n## \u2728 Features\n\n- **Language Agnostic**: Works with any programming language - understands patterns, idioms, and best practices across different languages\n- **Intelligent Analysis**: Uses LLMs to understand code purpose, relationships, and architectural patterns\n- **Git Integration**: Works with any git repository, tracks changes, and updates documentation incrementally\n- **Rich Documentation**: Generates both HTML and Markdown documentation with:\n  - Cross-referenced code elements\n  - Dependency graphs\n  - Public API documentation\n  - Code purpose analysis\n  - Framework detection\n\n## \ud83d\ude80 Quick Start\n\n1. Install Fluen:\n```bash\npip install fluen\n```\n\n2. Create a configuration file:\n```bash\n# Copy the example config\ncp fluen_config.example.yml fluen_config.yml\n\n# Edit the config file with your LLM provider settings\nvim fluen_config.yml\n```\n\n3. Generate documentation:\nThe generate command analyzes the project and generates a code manifest.json file. We recommend you to first clone a repository and then run fluen from the root of your local repository.\n\n```bash\n# For local repository\nfluen docs generate\n\n# For remote repository\nfluen docs generate --repo https://github.com/username/repo.git\n```\n\nOnce the manifest.json generation succeeds, run the export command to export in html or markdown format\n\n```bash\n# Default export type configured in fluen_config.yml\nfluen docs export\n\n# Explicitly tell the export format type html/md\nfluen docs export --type md\n```\n\n4. View your documentation:\n```bash\n# Documentation will be available in ./docs directory\nopen docs/html/index.html\n```\n\n5. Update your documentation\nFluen is designed to update documentation incrementally with git commits. However there might be scenarios where you need to fore an update. Simply use the `--force` flag\n```bash\nfluen docs generate --force\n```\n\n6. Selective scanning (of sub directories)\nIn case you want Fluen to look at only a specific sub-directory, then use the `--scan` flag\n```bash\nfluen docs generate --scan path:<your_sub_path>\n```\nYou may use the `--force` flag to force updates\n## \ud83d\udcd6 Use Cases\n\n### 1. Project Onboarding\nHelp new team members understand your codebase quickly with AI-generated documentation that explains not just what the code does, but why it does it.\n\n### 2. Code Audits\nGet a comprehensive view of your project's architecture, dependencies, and exposed APIs. Perfect for security audits and architectural reviews.\n\n### 3. Technical Documentation\nGenerate and maintain up-to-date technical documentation without manual effort. Fluen tracks changes and updates only what's needed.\n\n### 4. Legacy Code Understanding\nMake sense of legacy codebases by letting Fluen analyze patterns, dependencies, and architectural decisions embedded in the code.\n\n## \u2699\ufe0f Configuration\n\nFluen uses a YAML configuration file (`fluen_config.yml`) for customization. Here's a minimal configuration:\n\n```yaml\nllm:\n  # Choose your provider: 'openai' or 'mistral' or 'ollama' for local use\n  provider: openai\n  api_key: your-api-key-here\n  model: gpt-3.5-turbo  # or 'gpt-4o' for better results\n\n# Output directory for generated documentation\noutput_dir: docs\n\n# Documentation format\ndefault_export_type: html  # or 'md' for markdown\n```\n\nSee `fluen_config.example.yml` for a complete configuration example with all available options.\n\n## \ud83d\udd27 Requirements\n\n- Python 3.9 or higher\n- Git\n- An API key from OpenAI or Mistral AI (recommended providers)\n\n## \ud83d\udea7 Roadmap\n\nExciting features coming soon:\n- Interactive code chat interface with project-wide search\n- Enhanced code element descriptions and relationships\n- PDF export\n- Custom template support\n- Plugin system\n- CI/CD integration\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Whether it's bug reports, feature requests, or code contributions, please feel free to contribute.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Install development dependencies:\n```bash\npip install -e \".[dev]\"\n```\n4. Make your changes\n5. Run tests:\n```bash\npytest\n```\n6. Submit a Pull Request\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\ude4b\u200d\u2642\ufe0f Support\n\n- \ud83d\udcc4 [Documentation](https://github.com/Fluen-io/fluen-core/wiki)\n- \ud83d\udc1b [Issue Tracker](https://github.com/Fluen-io/fluen-core/issues)\n- \ud83d\udcac [Discussions](https://github.com/Fluen-io/fluen-core/discussions)\n\n## \ud83c\udf1f Show your support\n\nGive a \u2b50\ufe0f if this project helped you!\n\n---\nMade with \u2764\ufe0f by [Fluen](https://github.com/Fluen-io) using the [Jiva Framework](https://github.com/KarmaloopAI/Jiva) and Claude by [Anthropic](https://www.anthropic.com/)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "LLM-based AI powered Code Documentation Generator",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/Fluen-io/fluen-core"
    },
    "split_keywords": [
        "documentation",
        " llm",
        " code-analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f1dc15e6a64cd13620435d54b15218f6def458f0f97217e8f15bd66997f39685",
                "md5": "4e9e2cb262ce3a57e345ebbe004a3aac",
                "sha256": "641730044eca8f217eaca5034ed64e1359002db33e8ac9ae44bfb95c27222678"
            },
            "downloads": -1,
            "filename": "fluen-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4e9e2cb262ce3a57e345ebbe004a3aac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 37939,
            "upload_time": "2024-11-13T19:00:18",
            "upload_time_iso_8601": "2024-11-13T19:00:18.449766Z",
            "url": "https://files.pythonhosted.org/packages/f1/dc/15e6a64cd13620435d54b15218f6def458f0f97217e8f15bd66997f39685/fluen-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ea86af7607d9f529eab48b8b5c4671a6dd1fd1e83afb913037b3825c0c2cf93",
                "md5": "b84e91fe52fe797cb00ec08856428372",
                "sha256": "e819b4278c6e2a928e9ef868366c4ff2483ca10326dc3cf64cd0fcf86353a9f2"
            },
            "downloads": -1,
            "filename": "fluen-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b84e91fe52fe797cb00ec08856428372",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 33440,
            "upload_time": "2024-11-13T19:00:19",
            "upload_time_iso_8601": "2024-11-13T19:00:19.668262Z",
            "url": "https://files.pythonhosted.org/packages/6e/a8/6af7607d9f529eab48b8b5c4671a6dd1fd1e83afb913037b3825c0c2cf93/fluen-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 19:00:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Fluen-io",
    "github_project": "fluen-core",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "==",
                    "7.6.4"
                ]
            ]
        },
        {
            "name": "exceptiongroup",
            "specs": [
                [
                    "==",
                    "1.2.2"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.4"
                ]
            ]
        },
        {
            "name": "markdown-it-py",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "MarkupSafe",
            "specs": [
                [
                    "==",
                    "3.0.2"
                ]
            ]
        },
        {
            "name": "mdurl",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.1"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.5.0"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.18.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.3.3"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    "==",
                    "0.24.0"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "python-magic",
            "specs": [
                [
                    "==",
                    "0.4.27"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.9.4"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.0.2"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.12.2"
                ]
            ]
        },
        {
            "name": "mistralai",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    "==",
                    "1.43.0"
                ]
            ]
        }
    ],
    "lcname": "fluen"
}
        
Elapsed time: 1.51193s