# skene

> PLG (Product-Led Growth) codebase analysis toolkit. Analyzes codebases to detect growth opportunities, revenue leakage, and generates actionable growth plans.

- Version: 0.2.1
- License: MIT
- Python: >=3.11
- PyPI: skene
- Docs: https://www.skene.ai/resources/docs/skene

## Commands

skene analyze [PATH]
  Analyze a codebase. Generates growth-manifest.json and growth-template.json.
  Flags: -o/--output, --api-key, -p/--provider, -m/--model, --base-url, -v/--verbose, --product-docs, -e/--exclude, --debug, --no-fallback

skene plan
  Generate a growth plan from manifest and template using Council of Growth Engineers.
  Flags: --manifest, --template, -c/--context, -o/--output, --api-key, -p/--provider, -m/--model, --base-url, -v/--verbose, --activation, --prompt, --debug, --no-fallback

skene build
  Generate implementation prompt from growth plan. Send to Cursor, Claude, or display in terminal.
  Flags: --plan, -c/--context, --api-key, -p/--provider, -m/--model, --base-url, --debug, --no-fallback, -t/--target (cursor|claude|show|file — skips interactive menu)

skene status [PATH]
  Check implementation status of growth loop requirements. Uses AST parsing to verify files, functions, and patterns.
  Flags: -c/--context, --find-alternatives, --api-key, -p/--provider, -m/--model

skene push [PATH]
  Build Supabase migrations from growth loop telemetry and push to upstream.
  Flags: -c/--context, -l/--loop, -u/--upstream, --push-only

skene login
  Log in to Skene Cloud upstream for push.
  Flags: -u/--upstream, -s/--status

skene logout
  Log out from upstream (remove saved token).

skene init [PATH]
  Create skene base schema migration (event_log, failed_events, enrichment_map).

skene features export [PATH]
  Export feature registry in json, csv, or markdown format.
  Flags: -c/--context, -f/--format, -o/--output

skene chat [PATH]
  Interactive terminal chat with function calling. LLM invokes skene tools.
  Flags: --api-key, -p/--provider, -m/--model, --base-url, --max-steps, --tool-output-limit, --debug

skene config
  Manage configuration. --init creates config file, --show displays current values, no flags for interactive editing.

skene validate MANIFEST
  Validate a growth-manifest.json against the schema.

skene-mcp
  MCP server exposing 12 tools for AI assistants (Claude Desktop, Claude Code).

## LLM Providers

openai (default) — model: gpt-4o — key from platform.openai.com
gemini — model: gemini-3-flash-preview — key from aistudio.google.com
anthropic/claude — model: claude-sonnet-4-5 — key from console.anthropic.com
lmstudio — model: custom-model — local, no key, http://localhost:1234/v1
ollama — model: llama3.3 — local, no key, http://localhost:11434/v1
generic — model: custom-model — any OpenAI-compatible endpoint, requires --base-url

## Configuration

File: .skene.config (TOML, project-level)
File: ~/.config/skene/config (TOML, user-level)
Priority: user config < project config < env vars < CLI flags

Options: api_key, provider, model, base_url, output_dir, verbose, debug, exclude_folders, upstream

Environment variables: SKENE_API_KEY, SKENE_PROVIDER, SKENE_BASE_URL, SKENE_DEBUG, SKENE_UPSTREAM_API_KEY, LMSTUDIO_BASE_URL, OLLAMA_BASE_URL

## Output Files

Default output directory: ./skene-context/

growth-manifest.json — Structured analysis: tech_stack, current_growth_features, growth_opportunities, revenue_leakage, industry
growth-template.json — Custom PLG template with lifecycle stages and metrics
growth-plan.md — Actionable plan with 3-5 growth loops, implementation roadmap, metrics
growth-loops/*.json — Individual loop definitions with requirements, telemetry specs, and feature links
feature-registry.json — Persistent feature registry tracking features across analysis runs
product-docs.md — User-facing feature documentation (with --product-docs flag)

## Key Concepts

Growth Manifest (v1.0): project_name, description, tech_stack (framework, language, database, auth, deployment, package_manager, services), industry (primary, secondary, confidence, evidence), current_growth_features (feature_name, file_path, detected_intent, confidence_score, entry_point, growth_potential), growth_opportunities (feature_name, description, priority), revenue_leakage (issue, file_path, impact, recommendation)

Docs Manifest (v2.0): Extends v1.0 with product_overview (tagline, value_proposition, target_audience) and features (name, description, file_path, usage_example, category). Generated with --product-docs flag.

## MCP Tools

Tier 1 (quick, no LLM): get_codebase_overview, search_codebase
Tier 2 (analysis, cached): analyze_tech_stack, analyze_product_overview, analyze_growth_hubs, analyze_features, analyze_industry
Tier 3 (generation): generate_manifest, generate_growth_template, write_analysis_outputs
Utility: get_manifest, clear_cache

Cache: SKENE_CACHE_ENABLED (true), SKENE_CACHE_DIR (~/.cache/skene-mcp), SKENE_CACHE_TTL (3600s)

## Python API

Core: CodebaseExplorer, ManifestAnalyzer, TechStackAnalyzer, GrowthFeaturesAnalyzer
Config: Config, load_config, save_upstream_to_config, remove_upstream_from_config, resolve_upstream_token
LLM: LLMClient, create_llm_client
Schemas: GrowthManifest, DocsManifest, TechStack, GrowthFeature, GrowthOpportunity, IndustryInfo, ProductOverview, Feature
Feature Registry: load_feature_registry, merge_features_into_registry, merge_registry_and_enrich_manifest, export_registry_to_format
Growth Loops: load_existing_growth_loops, build_loops_to_supabase, push_to_upstream, build_package
Docs: DocsGenerator, PSEOBuilder
Planning: Planner, decline_plan, load_declined_plans
