nlsql-coder

NLSQL's privacy-focused AI coding agent. Build, modify and explore codebases using natural language inside a controlled, tool-based execution environment.

Privacy-first Workspace-aware Multi-LLM CLI

What is nlsql-coder?

nlsql-coder is NLSQL's privacy-focused AI coding agent. It helps you build, modify and explore codebases using natural language, while operating inside a controlled tool-based execution environment.

Workspace-aware agent

Scopes every action to your project directory - no surprises.

Tool-driven execution

All actions pass through gated, auditable tool calls.

Multi-LLM support

Bedrock, Azure AI, GCP and SageMaker - pick your provider.

Secure by design

Built for local + cloud development workflows that care about privacy.

Requirements

Before using nlsql-coder you'll need:

  • An NLSQL API key
  • An LLM provider, from one of the following:
    • AWS Bedrock
    • Azure AI
    • Google Cloud (GCP)
    • SageMaker - Qwen / DeepSeek-style models

Getting Started

Install

$ pip install nlsql-coder

Initialise

$ nlsql-coder init

This starts the agent in your current working directory.

How It Works

Agent Loop

nlsql-coder runs in a continuous reasoning cycle:

  • Understands the user request
  • Plans an approach (ReAct reasoning)
  • Uses tools to interact with the workspace
  • Evaluates the results
  • Repeats until the task is complete
Note: The agent does not rely on a single response. It iterates until the task is resolved or a stopping condition is met.

README

For more information, check out the README on our PyPI page.

Modes of Operation

Plan Mode Read-only
  • Read-only access
  • Used for designing solutions
  • No file changes allowed
Best for
Architecture design Project planning Exploring approaches
Manual Mode Max control
  • User approves every tool call
  • Maximum control
Best for
Sensitive codebases Learning / debugging Strict review
Auto Mode Hands-off
  • Agent executes most actions automatically
  • Only risky actions require confirmation
Best for
Fast iteration Refactoring Routine dev tasks

Available Tools

The agent operates through a controlled tool system:

File operations
read_file write_file edit_file delete
Execution
execute_bash_command - whitelisted commands only
Knowledge
search_the_web
Extensibility
MCP server support - via mcp.json
Why this matters: This tool-based design ensures the agent never "free-runs" code outside controlled boundaries.

Workspace Awareness

The agent always operates within a defined workspace directory:

  • Prevents accidental system-wide changes
  • Ensures all operations are scoped
  • Enables project-level context awareness

Security Model

nlsql-coder is designed with security in mind:

  • Restricted file operations (CWD only)
  • Whitelisted bash execution
  • Tool-gated actions
  • User confirmation for sensitive operations (depending on mode)

CLI Arguments

Flag Description Default
-w / --workspace Root project directory .
-u / --usage Show token usage after each turn False

Feedback & Issues

We actively improve nlsql-coder - let us know how we can make it better.