Skip to main content

FuncHub

⚠️ Security Warning: FuncHub dynamically loads and executes code from remote Git repositories. Only install tools from sources you trust, and use in isolated environments.

FuncHub is a bilingual (Python + NestJS) tool registry and dynamic loader designed for AI Agents. It allows developers to publish, discover, install, and dynamically invoke tool functions.

Features

  • Dual SDKs: Python SDK + NestJS SDK, sharing the same design philosophy
  • Semver version management: Supports ^1.2.3, 1.x, latest, branch names, etc.
  • GitHub publishing integration: Automatic Fork + PR workflow via GitHub API v3
  • Cache management: .version file tracks installed versions; expired cache auto-refetches
  • Private registry support: Supports custom indexes and mirrors via config
  • Safety confirmation: Interactive confirmation on install; --yes to bypass

Installation

Python

pip install funchub-sdk

NestJS

npm install funchub-nestjs

Quick Start

1. Configure GitHub Token

# Python
funchub login --token ghp_xxxxxxxxxxxx

# NestJS
npx funchub login --token ghp_xxxxxxxxxxxx

2. Search for Tools

funchub search scraper
funchub search web

3. Install a Tool

# Install latest version
funchub install web_scraper

# Install with version constraint
funchub install web_scraper@^1.0

# Install development branch
funchub install web_scraper@main

4. List Installed Tools

funchub list

5. Use a Tool in Code

Python:

from funchub import FuncHub

hub = FuncHub()
scraper = hub.load("web_scraper")
result = scraper(url="https://example.com")

NestJS:

import { FuncHub } from '@funchub/nestjs';

const hub = new FuncHub();
const scraper = await hub.load('web_scraper');
const result = await scraper({ url: 'https://example.com' });

Command Reference

Command Description
funchub login --token <PAT> Save GitHub Personal Access Token
funchub config set <key> <value> Set configuration (e.g., custom registry)
funchub publish --version v1.0.0 Publish current directory as a tool
funchub publish --version v1.0.0 --force Overwrite existing tool with same name
funchub publish --version v1.0.0 --dry-run Preview without actual submission
funchub search <query> Search for tools in the registry
funchub install <name>@<constraint> Install a tool
funchub list List locally installed tools
funchub update <name> Update a tool to latest version
funchub update --all Update all installed tools
funchub info <name> Show tool details
funchub uninstall <name> Remove local tool cache

Publishing a Tool

  1. Create a funchub.json or funchub.yaml tool definition file in your project root:
{
  "name": "my_tool",
  "description": "My awesome tool",
  "version": "1.0.0",
  "entry_point": "src/index:handler",
  "parameters": {
    "type": "object",
    "properties": {
      "input": { "type": "string" }
    }
  }
}
  1. Publish:
funchub publish --version v1.0.0

If you have write access to the registry repo, the tool is committed directly. Otherwise, a Fork + PR is automatically created.


Decorator Usage (Python)

from funchub import funchub_tool

@funchub_tool(
    name="web_scraper",
    description="Scrape web page title",
    version="1.0.0"
)
def scrape_url(url: str) -> str:
    """Scrape the title from a URL."""
    import requests
    from bs4 import BeautifulSoup
    resp = requests.get(url)
    soup = BeautifulSoup(resp.text, 'html.parser')
    return soup.title.string if soup.title else "No title found"

License

Apache License 2.0

Metadata

Release files for funchub-sdk 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for funchub-sdk 0.1.3
File Size Uploaded
funchub_sdk-0.1.3.tar.gz 22.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for funchub-sdk 0.1.3
File Interpreter ABI Platform
funchub_sdk-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 38.3 kB

Release files / funchub_sdk-0.1.3.tar.gz

Download URL funchub_sdk-0.1.3.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1e6882646793c5d9b99aa2d09da32dd133ae8000efe5725e774814c3b49361e2
BLAKE2b-256 checksum
How to use checksums
141e1fc03bbdacdae2c40e51f8d849fd4ffd4c937d1f0a2360ad39e8876134bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / funchub_sdk-0.1.3-py3-none-any.whl

Download URL funchub_sdk-0.1.3-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79ce6560703366bf02071a8675ea7a59141d715db67d8d5e60e00f3eb130222a
BLAKE2b-256 checksum
How to use checksums
29c5947303d8805cca143b839403845e833f8d239709e06cfb81e2d88a3f5237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page