46 tools available in single-command and interactive REPL modes — no LLM subscription required for direct tool invocation.
Every tool works the same way in both modes. The difference is session management: single-command mode runs one tool and exits, while the REPL keeps your context loaded across multiple commands.
Run a tool and exit. Provide --product and --template on every invocation. Ideal for scripting, automation, and one-off operations.
ask-forge <command> [options]
Examples:
# List all tables in a template
ask-forge list-tables --product ./MyProduct --template Default
# Review schema for issues
ask-forge review-schema --product ./MyProduct --template Default
# Show a specific table's structure
ask-forge show-table --product ./MyProduct \
--template Default --table Users
# Output as JSON for scripting
ask-forge list-tables --product ./MyProduct \
--template Default --json
Launch with no arguments. The --product and --template context persists across commands. If an LLM is configured, natural-language questions work too.
ask-forge
Example session:
> navigate-context --product ./MyProduct --template Default
> list-tables
> show-table --table Users
> show-dependencies --table Users
> review-schema --tables "Users,Orders"
# Natural language (requires LLM provider)
> What tables reference the Users table?
> Show me missing indexes on Orders
The same tool has three name formats depending on where you use it:
| Context | Format | Example |
|---|---|---|
| Internal / code registry | snake_case |
list_tables |
| CLI & REPL | kebab-case |
list-tables |
| MCP server | forge_ prefix + snake_case |
forge_list_tables |
In the CLI and REPL, always use kebab-case. The MCP server uses the forge_ prefix to avoid tool-name collisions with other MCP servers.
All 46 tools are organized into four tiers based on their impact level. Access is controlled by trust levels.
Available at all trust levels. Read and analyze schema data without making changes.
| Command | Description |
|---|---|
show-context | Show current product, template, and table selection |
show-table | Show table structure including columns, keys, and indexes |
list-tables | List all tables in the current template |
list-templates | List all templates in the current product |
list-folders | List all script folders with summary info |
list-scripts | List scripts in a specified folder |
show-config | Show current configuration including connections and tool paths |
list-connections | List configured database connections |
show-platform-capabilities | Show platform feature support and naming rules |
check-nulls | Generate query to check for NULL values in a column |
check-orphans | Generate query to check for orphaned FK references |
check-duplicates | Generate query to check for duplicate values |
check-naming | Check naming conventions against platform rules |
show-dependencies | Show FK dependency graph for a table |
show-all-dependencies | Show all FK relationships across the template |
analyze-dependency-graph | Detect circular dependencies, topological ordering, cascade impact |
show-conventions | Detect and display naming conventions from the template |
diff-tables | Compare two table definitions and show differences |
review-schema | Comprehensive schema review with severity and recommendations |
analyze-indexes | Analyze index coverage, missing FK indexes, redundant indexes |
plan-migration | Compare schema between git refs and produce a migration plan |
search-knowledge | Search the knowledge base for articles and best practices |
search-schemas | Search columns across all tables by name, type, or table |
validate-json | Validate table or template JSON structure |
Requires Assistant trust level. Generate scripts, schemas, and configuration changes without modifying existing files.
| Command | Description |
|---|---|
generate-migration | Generate SQL migration script for a schema change |
suggest-changes | Analyze a proposed change with risk assessment and recommendations |
generate-schema | Generate platform-specific table JSON from a blueprint spec |
save-script | Save a SQL script to a script folder |
save-migration | Save a migration plan to disk as markdown and SQL files |
set-connection | Set or update the database connection for a platform |
set-tool-path | Set the path to a SchemaSmith tool for a platform |
clear-connection | Remove the database connection for a platform |
clear-tool-path | Remove a tool path configuration for a platform |
Requires Operator trust level. Modify schema JSON files on disk. All tools prompt for confirmation before execution.
| Command | Description |
|---|---|
navigate-context | Change the current product, template, or table selection |
apply-change | Modify schema JSON files to apply column, index, or FK changes |
create-table | Create a new table with platform-correct conventions |
rename-column | Rename a column with full cascade through indexes and FKs |
rename-table | Rename a table with cascade through FK references |
apply-generated-schema | Write generated schema tables to template directory |
create-package | Create a deployment package (zip) with schema and scripts |
add-folder | Create a new script folder with QuenchSlot registration |
manage-tokens | Manage script tokens: list, add, update, remove, scan, suggest |
Requires Operator trust level. Run external SchemaSmith applications that interact with live databases. All tools prompt for confirmation.
| Command | Description |
|---|---|
run-schema-tongs | Extract schema from a database to JSON files |
run-schema-quench | Apply schema JSON to a database (defaults to dry-run) |
run-data-tongs | Extract table data to JSON content files and MERGE scripts |
view-log | View or open external tool log files |
These options are available on all commands:
| Option | Short | Description |
|---|---|---|
--product <path> |
-p |
Path to the SchemaSmith product directory. Persists across commands in REPL mode. |
--template <name> |
-t |
Template name within the product. Persists across commands in REPL mode. |
--json |
Output results as JSON instead of formatted text. Useful for scripting and automation. | |
--yes |
-y |
Skip confirmation prompts. Applies to single-command mode only (not REPL). |
--trust-level |
Override the trust level for the session (observer, assistant, operator). | |
--platform |
Override the target database platform (mssql, postgres, mysql). |
Parameters that accept large JSON or multi-line content can load from files using the @ prefix:
ask-forge apply-change --table Users --definition @column-def.json
ask-forge save-script --content @migration.sql --folder Migrations \
--filename update.sql
# List all commands
ask-forge --help
# Help for a specific command
ask-forge list-tables --help
# Check installed version
ask-forge --version