Skip to content
CLI docs

CLI Reference

Reference for the Skene journey workflow and related commands. Checked against OSS source revision 8eb7942 on 12 October 2026. The published package is 0.5.1; live database input uses the pinned source command below.

The registered commands are analyze, analyse-journey, plan, build, status, push, config, validate, login, logout, and features. Run uvx skene <command> --help for options outside this workflow. The current source does not register serve or attach.

For in-depth usage of individual commands, see the guides. This page is a lookup reference.


Global Options

FlagDescription
--version, -VShow version and exit
--helpShow help message and exit

When invoked with no arguments, skene prints help and exits.


analyse-journey

Generate a journey.yaml describing the user lifecycle of a product.

The journey pipeline runs code and schema agents in parallel when their inputs are supplied. Each proposes candidate milestones. A deterministic merge step with no model in the loop reconciles the two sets, a per-milestone classification pass places them, and the run assembles one validated Customer Journey across seven lifecycle stages: discovery, onboarding, activation, engagement, retention, expansion, and virality. The only artifact written into your project is skene-context/journey.yaml. The CLI executes the journey pipeline locally using the configured model provider. A remote provider receives analysis context.

skene analyse-journey [PATH] [OPTIONS]

Arguments

ArgumentDefaultDescription
PATHnonePath to codebase directory. Pass . for the current directory; omit only when supplying a schema input.

Options

FlagShortDefaultDescription
--schema-dir PATHDirectory of pre-exported *.sql files for the schema agent
--db-url TEXTPostgreSQL connection string for live schema introspection (source revision only; alternative to --schema-dir; also SKENE_DB_URL)
--output PATH-o./skene-context/journey.yamlOutput path for journey.yaml
--product-name TEXTProduct name in the output (default: inferred from repo directory name, DB name, or schema dir name)
--api-key TEXT$SKENE_API_KEY or configAPI key for the LLM provider
--provider TEXT-pconfig valueLLM provider: openai, gemini, anthropic/claude, lmstudio, ollama, generic, skene
--model TEXT-mprovider defaultLLM model name
--base-url TEXT$SKENE_BASE_URL or configBase URL for API endpoint
--schema-max-turns INT150Maximum agent turns for the schema agent (range: 1–500)
--code-max-turns INT200Maximum agent turns for the code agent (range: 1–500)
--classify-concurrency INT8Parallel classifier requests (range: 1–64)
--no-specializefalseSkip stage specialization; use canonical stage vocabulary
--quiet-qfalseSuppress status messages; show only errors and final results
--debugfalseShow diagnostic messages and log all LLM input/output
--no-fallbackfalseDisable model fallback on rate limits; retry same model instead

Schema sources

The schema agent requires one of two inputs, never both:

  • SQL files (--schema-dir): Provide a directory of pre-exported *.sql files defining tables, views, constraints, and indexes.
  • Live database (--db-url): Connect directly to a running PostgreSQL database. Skene introspects all user-defined schemas at runtime (excluding pg_catalog, information_schema, pg_toast, and any schema prefixed with pg_). Credentials are never stored.

--schema-dir and --db-url are mutually exclusive. At least one of PATH, --schema-dir, or --db-url must be provided. When PATH is omitted, only the schema agent runs (no code agent).

Behavior notes

  • Requires a configured LLM (API key + provider). Local providers (lmstudio, ollama, generic) do not require an API key.
  • The generic provider requires --base-url.
  • When --db-url is used without --product-name, the database name is extracted from the connection string for the product name.
  • --db-url credentials are used live and never persisted; anything stored or streamed shows a redacted form.
  • A normal CLI run writes the local journey. A linked TUI run using the Skene provider can automatically publish the first journey when that workspace has none. See the push guide.

See the CLI help output (skene analyse-journey --help) for detailed usage.


serve

This command is not registered in the current OSS source or the published 0.5.1 package. Use analyse-journey for local analysis.

attach

This command and remote-server mode are not supported by the current OSS source or published package. See the HTTP API status.


status

Show implementation status for skene-context/engine.yaml.

Loads skene-context/engine.yaml, validates structure, and checks whether action-enabled features have matching trigger/function entries in supabase/migrations/*.sql.

skene status [PATH] [OPTIONS]

Arguments

ArgumentDefaultDescription
PATH.Path to the project root directory (must exist)

Options

FlagShortDefaultDescription
--context PATH-cDeprecated. If set to a Skene bundle directory (skene-context/ or legacy skene/), the parent directory is used as project root.
--find-alternativesfalseDeprecated for engine status checks; currently ignored.
--api-key TEXT$SKENE_API_KEY or configDeprecated for engine status checks; currently ignored.
--provider TEXT-pconfig valueDeprecated for engine status checks; currently ignored.
--model TEXT-mprovider defaultDeprecated for engine status checks; currently ignored.

Project root resolution

  • Uses PATH as project root by default.
  • If --context points to a Skene bundle directory (.../skene-context or .../skene), uses the parent directory as project root.

Behavior notes

  • Validates skene-context/engine.yaml and checks duplicate keys/required fields.
  • For features with action, expects matching trigger/function tokens in SQL migrations. The detail column shows the latest matching migration filename; if the same trigger appears in older files, the suffix (+N) indicates how many additional matches exist.
  • For features without action, reports code-only mode (no trigger required).
  • Returns non-zero exit code when required engine/migration checks fail.

See the status guide for detailed usage.


config

Manage skene configuration files.

skene config [OPTIONS]

Options

FlagDefaultDescription
--initfalseCreate a sample .skene.config file in the current directory
--showfalseShow current configuration values and exit (no interactive editing)

Default behavior (no flags)

When invoked without --init or --show:

  1. Displays current configuration values (same as --show)
  2. Asks whether you want to edit the configuration
  3. If yes, launches an interactive setup flow to select provider, model, and enter an API key

Configuration load order

Configuration is resolved in this order (later sources override earlier ones):

  1. User config: ~/.config/skene/config
  2. Project config: ./.skene.config
  3. Environment variables: SKENE_API_KEY, SKENE_PROVIDER
  4. CLI flags

See the configuration guide for file format and all supported options.


push

Upload the Skene bundle (all files under {output_dir}) and the latest trigger migration to Skene Cloud.

push uploads existing files from the bundle. It does not generate them. Engine metadata and the latest trigger migration are included when present; a journey-only bundle does not require them.

skene push [PATH] [OPTIONS]

Arguments

ArgumentDefaultDescription
PATH.Project root. Artifact paths and sticky output_dir resolution use this directory (see configuration).

Options

FlagShortDefaultDescription
--upstream TEXT-uconfig / default cloudWorkspace URL (e.g. https://skene.ai/workspace/my-app). Also read from .skene.config.
--quiet-qfalseSuppress non-error output.
--debugfalseDiagnostic messages and LLM debug logging.

Behavior notes

  • Includes all existing bundle files and the latest eligible trigger migration when present. Missing engine metadata does not block the upload.
  • Sends a JSON payload with manifest and files (project-relative paths and file contents) to the upstream /api/v1/push API.
  • Use skene login (or SKENE_UPSTREAM_API_KEY) for authentication.

See the push guide for detailed usage.


login

Log in to Skene Cloud upstream for push.

skene login [OPTIONS]

Options

FlagShortDefaultDescription
--upstream TEXT-uUpstream workspace URL (e.g. https://skene.ai/workspace/my-app)
--status-sfalseShow current login status for this project

Behavior notes

  • Saves upstream URL, workspace, and API key to .skene.config with restrictive permissions (0600).
  • Use --status to check whether you are logged in for the current project.

See the login guide for detailed usage.


logout

Log out from upstream (remove saved token).

skene logout

Behavior notes

  • Removes upstream credentials from .skene.config.
  • Does not invalidate the token server-side.

features

Manage the growth feature registry.

features export

Export the feature registry for use in external tools.

skene features export [PATH] [OPTIONS]

Arguments

ArgumentDefaultDescription
PATH.Project root (to locate the Skene bundle directory)

Options

FlagShortDefaultDescription
--context PATH-cauto-detectedPath to the Skene bundle directory (skene-context/ or legacy skene/)
--format TEXT-fjsonOutput format: json, csv, markdown
--output PATH-ostdoutOutput file path. Prints to stdout if omitted.

Behavior notes

  • Reads feature-registry.json from the context directory.
  • The registry is populated by analysis runs; it must exist before exporting.
  • Use for integrating with dashboards, Linear, Notion, or documentation.

See the features guide for detailed usage.


Environment Variables

VariableUsed byDescription
SKENE_API_KEYanalyse-journeyAPI key for the LLM provider. Equivalent to --api-key.
SKENE_BASE_URLanalyse-journeyBase URL for OpenAI-compatible endpoints. Equivalent to --base-url.
SKENE_PROVIDERconfig loadingLLM provider override at the environment level.
SKENE_OUTPUT_DIRall commandsOverride output_dir for commands that have no dedicated flag (primarily push).
SKENE_UPSTREAM_API_KEYpush, loginAPI key for upstream authentication.
SKENE_DEBUGall commandsEnable debug mode (true/false).
SKENE_DB_URLanalyse-journeyPostgreSQL connection string for live schema introspection. Equivalent to --db-url.

Exit Codes

CodeMeaning
0Success
1Command failure, such as missing credentials or failed validation
2Invalid command usage or conflicting/missing journey inputs

Examples

# Full workflow
uvx skene config --init
uvx skene config
uvx skene analyse-journey .

# Analyse user journey with SQL schema files
uvx skene analyse-journey ./my-app --schema-dir ./schemas

# Analyse with a live database using the verified source revision
uvx --from git+https://github.com/SkeneTechnologies/skene.git@8eb7942f569a4f99387e5c05b086c7babc8ce3d3 skene analyse-journey --db-url "postgresql://user:pass@localhost:5432/mydb"

# Journey analysis with custom output
uvx skene analyse-journey ./my-app --schema-dir ./schemas -o ./output/journey.yaml

# Journey analysis with explicit provider settings
uvx skene analyse-journey . -p gemini -m gemini-3-flash-preview --api-key "YOUR_KEY"

# Journey analysis with a local LLM (no API key needed)
uvx skene analyse-journey . -p ollama -m llama3

# Check engine implementation status
uvx skene status

# Push artifacts upstream
uvx skene push
uvx skene push --upstream https://skene.ai/workspace/my-app

# Login/logout from upstream
uvx skene login --upstream https://skene.ai/workspace/my-app
uvx skene login --status
uvx skene logout

# Export feature registry
uvx skene features export --format markdown -o features.md