The CLI: Your Command Line

The AgenticSQL CLI is the primary way to interact with our platform. It's a single, powerful command that lives in your terminal, designed to be the starting point of your workflow. This guide covers all available commands and options.

Installation

No installation is required. The AgenticSQL CLI is executed directly using npx, ensuring you always have the latest, most secure version.

# Run anywhere, in any project npx @agenticsql/cli

Works in Any Environment

The AgenticSQL CLI is environment-agnostic. Whether you're a professional developer, a vibe coder, or building with no-code tools, the CLI works wherever you have a terminal. One command. Infinite environments.

Agentic IDEs

  • • Kiro - AWS AI IDE
  • • Cursor - AI code editor
  • • Windsurf - Codeium AI IDE
  • • VS Code with AI extensions
  • • JetBrains with AI plugins

CLI Assistants & Tools

  • • Amazon Q Developer CLI
  • • Gemini CLI - Google terminal AI
  • • Jules Tools - Google CLI agent
  • • GitHub Copilot CLI
  • • Terminal (zsh, bash, PowerShell)

AI Coding Assistants

  • • Claude Code CLI - Anthropic
  • • Codex CLI - OpenAI
  • • Tabnine CLI - AI completion
  • • GitHub Copilot Workspace
  • • Replit - Database for No-Code

For Vibe Coders

  • • Database for Vibe Coders
  • • Database for Bolt.new
  • • Database for v0.dev
  • • Database for Lovable
  • • AI-First Database

Mobile Development

  • • React Native CLI
  • • Expo CLI - React Native
  • • Flutter CLI - Google mobile
  • • Ionic CLI - Hybrid mobile
  • • Android Studio / Xcode

Cloud & DevOps Tools

  • • AWS CloudShell
  • • Google Cloud Shell
  • • Azure Cloud Shell
  • • Docker CLI environments
  • • Kubernetes kubectl

Cloud Platforms

  • • Vercel - Database for Vercel
  • • Netlify
  • • Railway
  • • Render
  • • GitHub Actions / GitLab CI

Traditional IDEs

  • • Vim / Neovim
  • • Emacs
  • • Sublime Text
  • • Atom
  • • Terminal / SSH

CI/CD & Automation

  • • GitHub Actions
  • • GitLab CI/CD
  • • CircleCI
  • • Jenkins
  • • Travis CI

This is our CLI power. One command. Any terminal. Any IDE. Any cloud. Any workflow.

This is database infrastructure for the AI generation—built for developers who create with AI assistants, vibe coders who ship fast, no-code builders who need real databases, and professionals who demand production-grade infrastructure without the complexity.

View all supported environments

Command: init

This is the core command. It analyzes your project, generates the database blueprint (schema.sql), and prepares you for deployment. This command is the default action when you run npx @agenticsql/cli.

Basic Usage

# The simplest way to run AgenticSQL npx @agenticsql/cli init  # Or even shorter npx @agenticsql/cli

Workflow

After a successful analysis, the init command will save the schema.sql file to your project directory and then prompt you to deploy via the AgenticSQL Dashboard.

Options & Flags

Customize the init command's behavior with the following flags.

--auto-deploy

Activates the Automated Workflow for professional developers. This flag will prompt a one-time login via your browser to link your account. After linking, it will perform the analysis, generate the schema, and deploy the database in a single, non-interactive flow, printing the final connection URL to your terminal. It bypasses the web dashboard entirely.

npx @agenticsql/cli init --auto-deploy

--output <filename>

Specify a custom output path and filename for the generated schema file. By default, it is saved as agenticsql_schema.sql in the current directory.

# Saves the schema to a 'prisma' folder npx @agenticsql/cli init --output ./prisma/schema.sql

--silent

Runs the command in silent mode, suppressing all informational output except for errors. Useful for scripting and CI/CD environments.

npx @agenticsql/cli init --silent

Command: import

Coming Soon

The import command will allow you to migrate your existing database schema from other providers directly into the AgenticSQL ecosystem. This feature is currently in development.

Future Usage Examples

# Future capability: Import from a Supabase project npx @agenticsql/cli import --from supabase  # Future capability: Import from a Firebase project npx @agenticsql/cli import --from firebase

Environment Variables

The CLI respects the following environment variables for advanced configuration.

AGENTICSQL_API_KEY

Optional. Pre-authenticate the CLI for automated deployments without browser interaction.

AGENTICSQL_REGION

Optional. Specify the AWS region for database deployment. Defaults to us-east-1.

Exit Codes

The CLI uses standard exit codes for scripting and automation.

CodeMeaning
0Success
1General error
2Invalid command or arguments
3Authentication failure
4Network or API error

One Command. Infinite Possibilities.

The AgenticSQL CLI is designed to be invisible when you don't need it and powerful when you do. Every command is optimized for speed, clarity, and reliability. Your infrastructure is one command away.