Docs

amfelt advise

Profile source tables and generate PCF configuration recommendations.

Profiles each table in an ODCS contract against the source database and calls the Claude API to generate a recommended PCF “tables:” configuration block.

The profiler collects aggregate statistics (row count, null rate, distinct count, min/max for temporal columns) and computes heuristic signals (unique_identifier, temporal, event_date_candidate, always_null, etc.) entirely in Go — no raw data values are sent to the LLM.

Requires ANTHROPIC_API_KEY to be set in the environment.

Usage  

amfelt advise [flags]

Examples  

advise --contract contracts/sales.odcs.yaml --source-url
postgres://user:pass@localhost:5432/sales --namespace public

Profiles the sales contract and prints recommended PCF YAML with token usage.

Flags  

FlagTypeDefaultDescription
--applyboolfalseWrite the recommended tables: block into the PCF (requires --path)
-c, --contractstring—path to the ODCS contract file to deploy
--modestring—Advisor mode: api (default) or direct (overrides advisor.mode in the agent’s config.yaml)
--modelstringclaude-sonnet-4-6Claude model to use (direct mode only)
--namespacestring—source namespace to interact with (comma-separated for multi-schema; ‘all’ for all schemas)
--pathstringamfelt.yamlpath of the Amfelt project file
--save-profileboolfalseSave data profile as <contract>.profile.yaml next to the contract file
--show-tokensbooltruePrint token usage after the call
--source-urlstring—connection URL for the source database plugin (e.g. postgres://user:pass@host:5432/db)

Global flags  

FlagTypeDefaultDescription
--amfelt-dirstring.amfeltdirectory for workspace files (such as plugins); does not move agent identity (controlled by AMFELT_DIR)
--configstring—directory or filename of the application configuration
-f, --formatstringdefaultlog format to use; either default, pretty, or json
-l, --levelstringinfominimum log level to display; either error, warn, info, or debug
-v, --verboseboolfalsetrigger to use verbose logging

Generated from amfelt v5.6.3.


Last updated on November 1, 2026