Skip to main content

PLG analysis toolkit for codebases - analyze code, detect growth opportunities, generate documentation

Project description

skene-growth

PLG (Product-Led Growth) analysis toolkit for codebases. Analyze your code, detect growth opportunities, and generate documentation.

Quick Start

No installation required - just run with uvx:

# Analyze your codebase
uvx skene-growth analyze . --api-key "your-gemini-api-key"

# Or set the API key as environment variable
export SKENE_API_KEY="your-gemini-api-key"
uvx skene-growth analyze .

Get a free Gemini API key at: https://aistudio.google.com/apikey

What It Does

skene-growth scans your codebase and generates a growth manifest containing:

  • Tech Stack Detection - Framework, language, database, auth, deployment
  • Growth Hubs - Features with growth potential (signup flows, sharing, invites, billing)
  • GTM Gaps - Missing features that could drive user acquisition and retention

Installation

Option 1: uvx (Recommended)

Zero installation - runs instantly (requires API key):

uvx skene-growth analyze . --api-key "your-gemini-api-key"
uvx skene-growth generate
uvx skene-growth inject
uvx skene-growth validate ./growth-manifest.json

Note: The analyze command requires a Gemini API key. Get one free at https://aistudio.google.com/apikey

Option 2: pip install

pip install skene-growth

CLI Commands

analyze - Analyze a codebase

Requires a Gemini API key (set via --api-key, SKENE_API_KEY env var, or config file).

# Analyze current directory
uvx skene-growth analyze . --api-key "your-gemini-api-key"

# Using environment variable
export SKENE_API_KEY="your-gemini-api-key"
uvx skene-growth analyze .

# Analyze specific path with custom output
uvx skene-growth analyze ./my-project -o manifest.json

# With verbose output
uvx skene-growth analyze . -v

# Use a specific model
uvx skene-growth analyze . --model gemini-2.5-pro

Output: ./skene-context/growth-manifest.json

generate - Generate documentation

# Generate docs from manifest (auto-detected)
uvx skene-growth generate

# Specify manifest and output directory
uvx skene-growth generate -m ./manifest.json -o ./docs

Output: Markdown documentation in ./skene-docs/

inject - Generate growth loop injection plan

# Generate injection plan using built-in growth loops
uvx skene-growth inject

# Use custom growth loops from CSV
uvx skene-growth inject --csv loops.csv

# Specify manifest
uvx skene-growth inject -m ./manifest.json

Output: ./skene-injection-plan.json

validate - Validate a manifest

uvx skene-growth validate ./growth-manifest.json

config - Manage configuration

# Show current configuration
uvx skene-growth config

# Create a config file in current directory
uvx skene-growth config --init

Configuration

skene-growth supports configuration files for storing defaults:

Configuration Files

Location Purpose
./.skene-growth.toml Project-level config (checked into repo)
~/.config/skene-growth/config.toml User-level config (personal settings)

Sample Config File

# .skene-growth.toml

# API key for LLM provider (can also use SKENE_API_KEY env var)
# api_key = "your-gemini-api-key"

# LLM provider to use (default: gemini)
provider = "gemini"

# Default output directory
output_dir = "./skene-context"

# Enable verbose output
verbose = false

Configuration Priority

Settings are loaded in this order (later overrides earlier):

  1. User config (~/.config/skene-growth/config.toml)
  2. Project config (./.skene-growth.toml)
  3. Environment variables (SKENE_API_KEY, SKENE_PROVIDER)
  4. CLI arguments

Python API

CodebaseExplorer

Safe, sandboxed access to codebase files:

from skene_growth import CodebaseExplorer

explorer = CodebaseExplorer("/path/to/repo")

# Get directory tree
tree = await explorer.get_directory_tree(".", max_depth=3)

# Search for files
files = await explorer.search_files(".", "**/*.py")

# Read file contents
content = await explorer.read_file("src/main.py")

# Read multiple files
contents = await explorer.read_multiple_files(["src/a.py", "src/b.py"])

Analyzers

from pydantic import SecretStr
from skene_growth import ManifestAnalyzer, CodebaseExplorer
from skene_growth.llm import create_llm_client

# Initialize
codebase = CodebaseExplorer("/path/to/repo")
llm = create_llm_client(
    provider="gemini",
    api_key=SecretStr("your-api-key"),
    model_name="gemini-2.0-flash",
)

# Run analysis
analyzer = ManifestAnalyzer()
result = await analyzer.run(
    codebase=codebase,
    llm=llm,
    request="Analyze this codebase for growth opportunities",
)

# Access results (the manifest is in result.data["output"])
manifest = result.data["output"]
print(manifest["tech_stack"])
print(manifest["growth_hubs"])

Growth Loop Catalog

from skene_growth import GrowthLoopCatalog

catalog = GrowthLoopCatalog()

# Get all loops
all_loops = catalog.get_all()

# Get by category
referral_loops = catalog.get_by_category("referral")
activation_loops = catalog.get_by_category("activation")

# Get specific loop
invite_loop = catalog.get_by_id("user-invites")

# Load custom loops from CSV
catalog.load_from_csv("my-loops.csv")

Documentation Generator

from skene_growth import DocsGenerator, GrowthManifest

# Load manifest
manifest = GrowthManifest.parse_file("growth-manifest.json")

# Generate docs
generator = DocsGenerator()
context_doc = generator.generate_context_doc(manifest)
product_doc = generator.generate_product_docs(manifest)

Injection Planner

from skene_growth import InjectionPlanner, GrowthLoopCatalog, GrowthManifest

manifest = GrowthManifest.parse_file("growth-manifest.json")
catalog = GrowthLoopCatalog()
planner = InjectionPlanner()

# Generate quick plan (no LLM required)
plan = planner.generate_quick_plan(manifest, catalog)

# Save plan
planner.save_plan(plan, "injection-plan.json")

Growth Manifest Schema

The growth-manifest.json output contains:

{
  "version": "1.0",
  "project_name": "my-app",
  "description": "A SaaS application",
  "tech_stack": {
    "framework": "Next.js",
    "language": "TypeScript",
    "database": "PostgreSQL",
    "auth": "NextAuth.js",
    "deployment": "Vercel"
  },
  "growth_hubs": [
    {
      "feature_name": "User Invites",
      "file_path": "src/components/InviteModal.tsx",
      "detected_intent": "referral",
      "confidence_score": 0.85,
      "growth_potential": ["viral_coefficient", "user_acquisition"]
    }
  ],
  "gtm_gaps": [
    {
      "feature_name": "Social Sharing",
      "description": "No social sharing for user content",
      "priority": "high"
    }
  ],
  "generated_at": "2024-01-15T10:30:00Z"
}

Built-in Growth Loops

The catalog includes these growth loop templates:

Loop Category Description
User Invites Referral Users invite others to join
Social Sharing Acquisition Share content on social media
Onboarding Completion Activation Guide users to key actions
Usage Streaks Retention Encourage regular usage
Upgrade Prompts Revenue Prompt upgrades at limits
User-Generated Content Acquisition Content that attracts users
Re-engagement Notifications Retention Bring back inactive users

Environment Variables

Variable Description
SKENE_API_KEY API key for LLM provider (Gemini)
SKENE_PROVIDER LLM provider to use (default: gemini)

Requirements

License

MIT

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

skene_growth-0.1.0.tar.gz (76.6 kB view details)

Uploaded Source

Built Distribution

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

skene_growth-0.1.0-py3-none-any.whl (62.2 kB view details)

Uploaded Python 3

File details

Details for the file skene_growth-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for skene_growth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b80ac10b9d5a7597defa25da48afdf371f04f6d325cbb2d21de7318c89d234f3
MD5 172dded319b690ca4a2008b171420429
BLAKE2b-256 832688936a7ab050901a29e28f4185d0e7eeacdb1353160c793e487191efea8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for skene_growth-0.1.0.tar.gz:

Publisher: publish.yml on SkeneTechnologies/skene-growth

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

File details

Details for the file skene_growth-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for skene_growth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92bc85de2e0ba02c8a0b5122d4a337deaaf9d8ae545faddd40b22b3ec309ab7a
MD5 617c95d9ebaaab5c901667cbe7f0b8d8
BLAKE2b-256 a99ebb6bb2fc79708da2c064258470a6f48c0fca1789d6b5575be807c81da92c

See more details on using hashes here.

Provenance

The following attestation bundles were made for skene_growth-0.1.0-py3-none-any.whl:

Publisher: publish.yml on SkeneTechnologies/skene-growth

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