Skip to main content

Add your description here

Project description

FSC Assistant

Version Python License

Overview

FSC Assistant (Fully Self-Coding Assistant) is a powerful command-line tool that leverages Large Language Models to help you build software with ease. It provides an interactive AI-powered shell for coding assistance, document analysis, web scraping, and seamless integration with external services like JIRA and GitHub.

Key Features

  • ๐Ÿค– Interactive AI Shell - Chat with LLMs in a rich terminal interface
  • ๐Ÿ“ File Operations - Read, write, and analyze files and projects
  • ๐ŸŒ Web Scraping - Fetch webpages, take screenshots, search Google
  • ๐Ÿ”— Service Integrations - JIRA and GitHub integration
  • โšก Blazing Fast - Optimized startup (0.92s, 93% faster than v0.0.1)
  • ๐Ÿ› ๏ธ Developer Tools - Execute shell commands, manage conversation history
  • ๐ŸŽจ Rich Output - Beautiful Markdown rendering in the terminal

Quick Start

Installation

# Clone the repository
git clone https://github.com/devsunny/fsc-assistant.git
cd fsc-assistant

# Install in development mode
pip install -e .

# Install with optional dependencies (recommended)
pip install 'fsc-assistant[web]'
playwright install chromium

Configuration

Create a configuration file at ~/.fsc-assistant.env.toml:

[llm]
default_model = "claude-3-5-sonnet-20241022"
max_completion_tokens = 8192
provider = "anthropic"

[anthropic]
api_key = "your-anthropic-api-key"
base_url = 


[openai]
api_key = "your-openai-api-key"
base_url = 

Basic Usage

# Start the interactive shell
fsc-assistant shell

# Or use Python module
python -m assistant.agents.shell

Usage Examples

Interactive Shell

Once in the shell, you can:

# Ask about your code
Explain how the shell.py file works

# Analyze documents
Summarize the docs/proposals/ directory

# Execute system commands
!ls -la
!git status

# Web operations


# Integration with external services
Create a JIRA issue in project PROJ with title "Bug fix needed"
Create a GitHub PR from branch feature-branch to main

# Manage conversation
history          # Show conversation history
clear            # Clear screen
exit             # Exit shell

Special Commands

Command Description
!command Execute system command
exit/quit/q/bye Exit the shell
clear Clear the screen
history Show conversation history
model Show current LLM model

Architecture

Core Components

src/assistant/
โ”œโ”€โ”€ agents/           # AI Agent implementations
โ”‚   โ”œโ”€โ”€ shell.py     # Interactive shell (main entry)
โ”‚   โ”œโ”€โ”€ agent_repo.py # Tool repository (lazy loaded)
โ”‚   โ”œโ”€โ”€ tools/       # Core tools (file, system, time)
โ”‚   โ”œโ”€โ”€ web/         # Web scraping tools
โ”‚   โ””โ”€โ”€ integrations/ # JIRA, GitHub integrations
โ”œโ”€โ”€ cli.py           # CLI entry point
โ”œโ”€โ”€ config/          # Configuration management
โ”œโ”€โ”€ llm/            # LLM orchestration
โ””โ”€โ”€ utils/          # Utility functions

Performance Optimized

The assistant is highly optimized for fast startup:

  • Lazy Loading: Heavy modules (Google API, JIRA, GitHub) load only when used
  • Smart Imports: Explicit imports avoid unnecessary loading
  • Caching: Tool lists and configurations cached after first access

Performance Metrics:

  • Startup time: 0.92s (93% improvement from v0.0.1)
  • Memory footprint: Minimal (only load what's needed)
  • File operations: 52% reduction in system calls

Tool Reference

File System Tools

Tool Description
save_text_file_to_disk Save text content to a file
load_text_file_from_disk Load text content from a file
save_binary_file_to_disk Save binary content to a file
load_image_files_from_disk Load image files
list_files_in_current_project List all files in project
get_current_project_root_folder Get project root directory

System Tools

Tool Description
run_shell_command Execute shell commands interactively
get_current_local_time Get current local time with timezone

Web Tools

Tool Description
fetch_webpage_content Extract content from webpages
capture_web_page_screenshot Take screenshots of webpages
download_web_file_from_url Download files from URLs
search_google_custom_api Search Google with custom API

Integration Tools

Tool Description
get_jira_issue Get JIRA issue details
update_jira_issue_status Update JIRA issue status
add_jira_comment Add comment to JIRA issue
create_jira_issue Create new JIRA issue
create_github_pull_request Create GitHub pull request

Configuration

Configuration File

The assistant uses a TOML configuration file (.fsc-assistant.env.toml):

[llm]
default_model = "claude-3-5-sonnet-20241022"
max_completion_tokens = 8192
temperature = 0.7

[llm.anthropic]
api_key = "sk-ant-..."

[llm.openai]
api_key = "sk-..."

[google]
api_key = "your-google-api-key"
search_engine_id = "your-search-engine-id"

[jira]
server = "https://your-domain.atlassian.net"
username = "your-email@example.com"
api_token = "your-jira-api-token"

[github]
token = "ghp_..."

Environment Variables

  • FSC_ASSISTANT_CONFIG - Path to custom config file
  • ANTHROPIC_API_KEY - Anthropic API key
  • OPENAI_API_KEY - OpenAI API key
  • DEBUG - Enable debug mode (true/false)

Installation Options

Minimal Installation

pip install -e .

With Web Scraping

pip install 'fsc-assistant[web]'
playwright install chromium

Full Installation

pip install 'fsc-assistant[all]'
playwright install chromium

Development Installation

git clone https://github.com/yourusername/fsc-assistant.git
cd fsc-assistant
pip install -e ".[dev]"

Development

Project Structure

fsc-assistant/
โ”œโ”€โ”€ src/assistant/          # Main package
โ”‚   โ”œโ”€โ”€ agents/            # AI agents and tools
โ”‚   โ”œโ”€โ”€ cli.py             # CLI entry point
โ”‚   โ”œโ”€โ”€ config/            # Configuration
โ”‚   โ”œโ”€โ”€ llm/              # LLM orchestration
โ”‚   โ”œโ”€โ”€ mcp/              # Model Context Protocol
โ”‚   โ””โ”€โ”€ utils/            # Utilities
โ”œโ”€โ”€ docs/                  # Documentation
โ”‚   โ””โ”€โ”€ proposals/        # Architecture proposals
โ”œโ”€โ”€ tests/                # Test suite
โ”œโ”€โ”€ pyproject.toml        # Project configuration
โ””โ”€โ”€ README.md            # This file

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=src/assistant

# Test startup performance
python verify_optimizations.py

# Performance analysis
python analyze_performance.py

Code Quality

# Format code
black src/

# Type checking
mypy src/

# Linting
flake8 src/

Recent Updates

v0.1.0 (Current)

Performance Improvements

  • โšก 93% faster startup (13.7s โ†’ 0.92s)
  • ๐Ÿš€ Lazy loading for heavy dependencies
  • ๐Ÿ“‰ 52% reduction in file system operations
  • ๐ŸŽฏ Optimized import patterns

New Features

  • ๐Ÿ” Google Custom Search API integration
  • ๐Ÿ“„ Enhanced document analysis
  • ๐ŸŽจ Rich Markdown output in terminal
  • ๐Ÿ›ก๏ธ Improved error handling

Bug Fixes

  • Fixed import loops and circular dependencies
  • Improved error messages for missing dependencies
  • Better handling of missing configuration

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Steps

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite (pytest)
  6. Submit a pull request

Roadmap

Planned Features

  • Plugin System - Extensible tool architecture
  • More LLM Providers - Gemini, Llama, etc.
  • Database Integration - PostgreSQL, MySQL support
  • Advanced Web Scraping - JavaScript rendering, forms
  • Team Collaboration - Shared configurations and history
  • IDE Integration - VS Code extension
  • Cloud Storage - S3, GCS, Azure integration

Long-term Vision

  • AI-Powered Development - End-to-end software development assistance
  • Multi-modal Support - Image and code analysis
  • Project Generation - Scaffold entire projects from descriptions
  • Smart Refactoring - AI-assisted code refactoring
  • Documentation Generation - Auto-generate docs from code

Troubleshooting

Common Issues

Slow Startup

If startup is slow (>2s), check:

  • Are you using the latest version? (pip install -U fsc-assistant)
  • Is lazy loading working? (python -c "from assistant.agents.shell import AgenticShell; print('OK')")
  • Are there unnecessary imports in your config?

Missing Dependencies

# Install missing web dependencies
pip install 'fsc-assistant[web]'
playwright install chromium

# Install all optional dependencies
pip install 'fsc-assistant[all]'

Configuration Issues

# Check config file location
echo $FSC_ASSISTANT_CONFIG

# Validate config syntax
python -c "import toml; toml.load('.fsc-assistant.env.toml')"

Getting Help

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to all contributors who have helped shape this project
  • Inspired by the need for better AI-assisted development tools
  • Built with amazing open-source libraries and tools

Happy Coding! ๐Ÿค–โœจ

For more information, check out our documentation and examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fsc_assistant-0.1.8.tar.gz (96.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fsc_assistant-0.1.8-py3-none-any.whl (108.1 kB view details)

Uploaded Python 3

File details

Details for the file fsc_assistant-0.1.8.tar.gz.

File metadata

  • Download URL: fsc_assistant-0.1.8.tar.gz
  • Upload date:
  • Size: 96.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fsc_assistant-0.1.8.tar.gz
Algorithm Hash digest
SHA256 b5fcf419d55f5116ca90bde5bcc1a35b27bf2ee975f0cb7a4b2d90f0fa033fce
MD5 d706d9955784173cdd47900de01c8141
BLAKE2b-256 4751647c071f8a61c060124663c193182a8531d11089cc21cfb428e31fc053b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fsc_assistant-0.1.8.tar.gz:

Publisher: python-publish.yml on devsunny/fsc-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fsc_assistant-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: fsc_assistant-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 108.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fsc_assistant-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f1cd088ce8213acb764c3cc4b249810ace0aa05056ecaa2fa32c23791eca7a2d
MD5 0989e0d351d883dc976771e5fa3871fd
BLAKE2b-256 091f7fed0dfad4f156ae2a8bffc48a45e54d25a4faa28efc6ea54e1628e7d5c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fsc_assistant-0.1.8-py3-none-any.whl:

Publisher: python-publish.yml on devsunny/fsc-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page