### NocoDB CLI Setup and Environment Variables Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Instructions on how to set up the NocoDB CLI, including required environment variables and their purpose. ```APIDOC ## NocoDB CLI Setup ### Description Set up your environment variables to authenticate and configure the NocoDB CLI for API access. ### Method Environment Variables ### Parameters #### Environment Variables - **NOCODB_TOKEN** (string) - Required - Your NocoDB API token. - **NOCODB_URL** (string) - Optional - The base URL for your NocoDB instance. Defaults to `https://app.nocodb.com`. - **NOCODB_VERBOSE** (integer) - Optional - Set to `1` to display resolved IDs during command execution. ### Setup Example ```bash export NOCODB_TOKEN="your-api-token" export NOCODB_URL="https://app.nocodb.com" export NOCODB_VERBOSE=1 ``` **Note:** Obtain your API token from NocoDB → Team & Settings → API Tokens → Add New Token. ``` -------------------------------- ### Install NocoDB Agent Skills using npx Source: https://github.com/nocodb/agent-skills/blob/main/README.md This command installs the NocoDB Agent Skills package using the npx command-line tool. It allows AI agents to discover and utilize these skills for NocoDB-related tasks. ```bash npx skills add nocodb/agent-skills ``` -------------------------------- ### Setup NocoDB CLI Environment Variables Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Sets up the necessary environment variables for the NocoDB CLI to authenticate and connect to your NocoDB instance. Requires a NocoDB API token and optionally the NocoDB URL and a verbose flag. ```bash export NOCODB_TOKEN="your-api-token" export NOCODB_URL="https://app.nocodb.com" # optional, this is default export NOCODB_VERBOSE=1 # optional, shows resolved IDs ``` -------------------------------- ### Where Filter Syntax Examples Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Demonstrates the syntax for constructing filters using the 'where' clause, including basic operators, date operators, and combining multiple conditions with AND, OR, and NOT. ```bash # Basic Syntax (field,operator,value) (field,operator) # for null/blank/checked operators (field,operator,sub_op) # for date operators (field,operator,sub_op,value) # for date with value # Common Operators # eq: Equal # neq: Not equal # like: Contains (% wildcard) # in: In list # gt, lt, gte, lte: Numeric comparison # blank, notblank: Null or empty # checked, notchecked: Boolean # Date Operators (created_at,eq,today) (created_at,isWithin,pastWeek) (created_at,isWithin,pastNumberOfDays,14) (due_date,lt,today) # overdue (event_date,eq,exactDate,2024-06-15) # Combining Filters # IMPORTANT: Use `~and`, `~or`, `~not` (with tilde prefix) (name,eq,John)~and(age,gte,18) (status,eq,active)~or(status,eq,pending) ~not(is_deleted,checked) (status,in,active,pending)~and(country,eq,USA) # Complex Examples # Active users created this month "(status,eq,active)~and(created_at,isWithin,pastMonth)" # Overdue high-priority tasks "(due_date,lt,today)~and(priority,eq,high)~and(completed,notchecked)" # Orders $100-$500 in pending/processing "(amount,gte,100)~and(amount,lte,500)~and(status,in,pending,processing)" ``` -------------------------------- ### Install NocoDB Agent Skills as Claude Code Plugin Source: https://github.com/nocodb/agent-skills/blob/main/README.md This command installs the NocoDB Agent Skills as a plugin for Claude Code. This integration enables Claude Code to leverage the skills for more accurate and efficient NocoDB operations. ```bash /plugin marketplace add nocodb/agent-skills ``` -------------------------------- ### Get Help for NocoDB Filter Syntax Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Displays help information for constructing filter conditions (WHERE clauses) for NocoDB queries. This is a utility command available on free plans. ```bash # Filter syntax help nc where:help ``` -------------------------------- ### NocoDB CLI Verbose Mode Example Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Demonstrates how to use the `NOCODB_VERBOSE=1` environment variable to see resolved IDs during NocoDB CLI operations. This helps in understanding the mapping between human-readable names and internal IDs. ```bash NOCODB_VERBOSE=1 nc field:list MyBase Users # → base: MyBase → pdef5678uvw # → table: Users → mghi9012rst ``` -------------------------------- ### Manage NocoDB Tables Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Provides commands to get, create, update, and delete NocoDB tables within a base. These operations are available on free plans. ```bash nc table:get pdef5678uvw mghi9012rst nc table:create pdef5678uvw '{"title":"NewTable"}' nc table:update pdef5678uvw mghi9012rst '{"title":"Customers"}' nc table:delete pdef5678uvw mghi9012rst ``` -------------------------------- ### Manage NocoDB Views (Enterprise) Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Provides commands to get, create, update, and delete views for a NocoDB table. These operations are available only on Enterprise plans. ```bash nc view:get pdef5678uvw mghi9012rst vwmno7890abc nc view:create pdef5678uvw mghi9012rst '{"title":"Active Users","type":"grid"}' nc view:update pdef5678uvw mghi9012rst vwmno7890abc '{"title":"Renamed"}' nc view:delete pdef5678uvw mghi9012rst vwmno7890abc ``` -------------------------------- ### Manage NocoDB Workspaces (Enterprise) Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Provides commands to get, create, update, delete, and manage members of NocoDB workspaces. These operations are available only on Enterprise plans. ```bash nc workspace:get wabc1234xyz nc workspace:create '{"title":"New Workspace"}' nc workspace:update wabc1234xyz '{"title":"Renamed"}' nc workspace:delete wabc1234xyz nc workspace:members wabc1234xyz nc workspace:members:add wabc1234xyz '{"email":"user@example.com","roles":"workspace-creator"}' nc workspace:members:update wabc1234xyz '{"email":"user@example.com","roles":"workspace-viewer"}' nc workspace:members:remove wabc1234xyz '{"email":"user@example.com"}' ``` -------------------------------- ### Manage NocoDB Bases Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Provides commands to get, create, update, delete, and manage members of NocoDB bases. Base management and collaboration features are available on free and Enterprise plans respectively. ```bash nc base:get pdef5678uvw nc base:create wabc1234xyz '{"title":"New Base"}' nc base:update pdef5678uvw '{"title":"Renamed"}' nc base:delete pdef5678uvw # Base Collaboration (Enterprise plans only) nc base:members pdef5678uvw nc base:members:add pdef5678uvw '{"email":"user@example.com","roles":"base-editor"}' nc base:members:update pdef5678uvw '{"email":"user@example.com","roles":"base-viewer"}' nc base:members:remove pdef5678uvw '{"email":"user@example.com"}' ``` -------------------------------- ### NocoDB CLI: Record and Filter Commands Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md This snippet covers commands for interacting with records and filters in NocoDB. It includes listing and getting records, and listing filters. These functionalities are available on free plans. ```bash nc record:list pdef5678uvw mghi9012rst nc record:get pdef5678uvw mghi9012rst 31 nc filter:list pdef5678uvw mghi9012rst vwmno7890abc nc where:help ``` -------------------------------- ### Manage NocoDB Views (List, Get, Create, Update, Delete) Source: https://context7.com/nocodb/agent-skills/llms.txt Commands for managing views within a NocoDB table. This includes listing all views, retrieving details of a specific view, creating new views of various types (grid, gallery, kanban, calendar), updating existing views, and deleting views. Requires table and database IDs. ```bash # List all views for a table nc view:list pdef5678uvw mghi9012rst # Output: Grid View grid vwmno7890abc # Kanban Board kanban vwstu1234def # Get view details nc view:get pdef5678uvw mghi9012rst vwmno7890abc # Create views of different types nc view:create pdef5678uvw mghi9012rst '{"title":"Active Users","type":"grid"}' nc view:create pdef5678uvw mghi9012rst '{"title":"Gallery","type":"gallery"}' nc view:create pdef5678uvw mghi9012rst '{"title":"Task Board","type":"kanban"}' nc view:create pdef5678uvw mghi9012rst '{"title":"Schedule","type":"calendar"}' # Update view nc view:update pdef5678uvw mghi9012rst vwmno7890abc '{"title":"Renamed View"}' # Delete view nc view:delete pdef5678uvw mghi9012rst vwmno7890abc ``` -------------------------------- ### Manage NocoDB Fields Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Provides commands to get, create, update, and delete fields within a NocoDB table. Supports various field types and is available on free plans. ```bash nc field:get pdef5678uvw mghi9012rst cjkl3456opq nc field:create pdef5678uvw mghi9012rst '{"title":"Phone","type":"PhoneNumber"}' nc field:update pdef5678uvw mghi9012rst cjkl3456opq '{"title":"Mobile"}' nc field:delete pdef5678uvw mghi9012rst cjkl3456opq ``` -------------------------------- ### Manage Workspace Teams (Enterprise Only) Source: https://context7.com/nocodb/agent-skills/llms.txt These commands manage teams and their members within a workspace. They allow listing teams, getting team details, creating new teams, updating existing teams, deleting teams, and managing team members (adding, updating roles, removing). Requires workspace ID and team ID where applicable. ```bash # List teams in a workspace nc team:list wabc1234xyz # Output: Engineering team123 # Marketing team456 ``` ```bash # Get team details nc team:get wabc1234xyz team123 ``` ```bash # Create a team nc team:create wabc1234xyz '{"title":"Engineering"}' ``` ```bash # Update a team nc team:update wabc1234xyz team123 '{"title":"Product Engineering"}' ``` ```bash # Delete a team nc team:delete wabc1234xyz team123 ``` ```bash # Manage team members nc team:members:add wabc1234xyz team123 '{"email":"developer@example.com"}' nc team:members:update wabc1234xyz team123 '{"email":"developer@example.com","roles":"member"}' nc team:members:remove wabc1234xyz team123 '{"email":"developer@example.com"}' ``` -------------------------------- ### Get Single Record Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Fetches a specific record by its ID. Allows specifying which fields to retrieve. ```bash nc record:get pdef5678uvw mghi9012rst 31 nc record:get pdef5678uvw mghi9012rst 31 "name,email" ``` -------------------------------- ### List API Tokens Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Lists available API tokens. Requires Enterprise plan. ```bash nc token:list ``` -------------------------------- ### List Scripts Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Lists available scripts. Requires Enterprise plan. ```bash nc script:list pdef5678uvw ``` -------------------------------- ### Create Script Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Creates a new script. Requires Enterprise plan. ```bash nc script:create pdef5678uvw '{"title":"My Script"}' ``` -------------------------------- ### Create Team Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Creates a new team within a workspace. Requires Enterprise plan. ```bash nc team:create wabc1234xyz '{"title":"Engineering"}' ``` -------------------------------- ### Create API Token Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Creates a new API token. Requires Enterprise plan. ```bash nc token:create '{"title":"CI Token"}' ``` -------------------------------- ### List NocoDB Workspaces (Enterprise) Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Lists all available NocoDB workspaces. This command is only available for Enterprise plans (self-hosted or cloud-hosted). It requires the `nc` CLI tool and outputs workspace IDs. ```bash # Workspace APIs (Enterprise only) nc workspace:list # → wabc1234xyz ``` -------------------------------- ### Base APIs Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Manage NocoDB bases. These APIs are available on free plans. ```APIDOC ## Base APIs ### Description Manage NocoDB bases. These APIs are available on free plans. ### Method `nc` (CLI command) ### Endpoints - `base:list [workspace_id]` - `base:get [base_id]` - `base:create [workspace_id] '[{"title":"New Base"}]'` - `base:update [base_id] '[{"title":"Renamed"}]'` - `base:delete [base_id]` **Base Collaboration (Enterprise plans only)** - `base:members [base_id]` - `base:members:add [base_id] '[{"email":"user@example.com","roles":"base-editor"}]'` - `base:members:update [base_id] '[{"email":"user@example.com","roles":"base-viewer"}]'` - `base:members:remove [base_id] '[{"email":"user@example.com"}]'` ### Parameters #### Path Parameters - **workspace_id** (string) - Required - The ID of the workspace. - **base_id** (string) - Required - The ID of the base. - **email** (string) - Required for member operations - The email of the member. - **roles** (string) - Required for member operations - The role of the member (e.g., "base-editor", "base-viewer"). #### Query Parameters None #### Request Body - **title** (string) - Required for create/update - The title of the base. ### Request Example ```bash nc base:create wabc1234xyz '{"title":"My New Base"}' nc base:members:add pdef5678uvw '{"email":"collaborator@example.com","roles":"base-admin"}' ``` ### Response #### Success Response (200) - **id** (string) - The ID of the base. - **title** (string) - The title of the base. - **workspaceId** (string) - The ID of the workspace the base belongs to. #### Response Example ```json { "id": "pdef5678uvw", "title": "My New Base", "workspaceId": "wabc1234xyz" } ``` ``` -------------------------------- ### Get a Specific NocoDB Record Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Retrieves a specific record from a NocoDB table using its ID. This command is available on free plans and requires the base ID or name, table ID or name, and the record ID. ```bash nc record:get pdef5678uvw mghi9012rst 31 ``` -------------------------------- ### Using Names vs IDs Source: https://context7.com/nocodb/agent-skills/llms.txt Information on how to use resource names versus IDs in API calls. ```APIDOC ## Using Names vs IDs ### Description The CLI supports both human-readable names and NocoDB internal IDs for all resources. Using IDs directly is faster as it skips the name resolution step. ### Examples **Using Names (human-readable, resolved automatically):** ```bash nc record:list MyBase Users nc field:list "My Project" Customers ``` **Using IDs (faster execution, no resolution needed):** ```bash nc record:list pdef5678uvw mghi9012rst nc field:list pdef5678uvw mghi9012rst ``` ### Verbose Mode Enable verbose mode to see resolved IDs: ```bash NOCODB_VERBOSE=1 nc field:list MyBase Users ``` **Output Example:** ``` → base: MyBase → pdef5678uvw → table: Users → mghi9012rst Name SingleLineText cjkl3456opq Email Email cmno7890abc ``` ### ID Prefixes for Reference - `w` = workspace (e.g., `wabc1234xyz`) - `p` = base (e.g., `pdef5678uvw`) - `m` = table (e.g., `mghi9012rst`) - `c` = column/field (e.g., `cjkl3456opq`) - `vw` = view (e.g., `vwmno7890abc`) ``` -------------------------------- ### List Teams Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Lists teams within a workspace. Requires Enterprise plan. ```bash nc team:list wabc1234xyz ``` -------------------------------- ### Table APIs Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Manage NocoDB tables. These APIs are available on free plans. ```APIDOC ## Table APIs ### Description Manage NocoDB tables. These APIs are available on free plans. ### Method `nc` (CLI command) ### Endpoints - `table:list [base_id]` - `table:get [base_id] [table_id]` - `table:create [base_id] '[{"title":"NewTable"}]'` - `table:update [base_id] [table_id] '[{"title":"Customers"}]'` - `table:delete [base_id] [table_id]` ### Parameters #### Path Parameters - **base_id** (string) - Required - The ID of the base. - **table_id** (string) - Required - The ID of the table. #### Query Parameters None #### Request Body - **title** (string) - Required for create/update - The title of the table. ### Request Example ```bash nc table:create pdef5678uvw '{"title":"Tasks"}' nc table:update pdef5678uvw mghi9012rst '{"title":"Active Tasks"}' ``` ### Response #### Success Response (200) - **id** (string) - The ID of the table. - **title** (string) - The title of the table. - **baseId** (string) - The ID of the base the table belongs to. #### Response Example ```json { "id": "mghi9012rst", "title": "Tasks", "baseId": "pdef5678uvw" } ``` ``` -------------------------------- ### Manage NocoDB Workspaces (Enterprise Only) Source: https://context7.com/nocodb/agent-skills/llms.txt Perform CRUD operations on NocoDB workspaces, including listing, getting details, creating, updating, deleting, and managing workspace members. These commands are only available on Enterprise plans. ```bash # List all workspaces nc workspace:list # Output: Production wabc1234xyz # Development wdef5678uvw # Get workspace details nc workspace:get wabc1234xyz # Output: {"id":"wabc1234xyz","title":"Production","members":[...]} # Create a new workspace nc workspace:create '{"title":"New Workspace"}' # Update workspace nc workspace:update wabc1234xyz '{"title":"Renamed Workspace"}' # Delete workspace nc workspace:delete wabc1234xyz # Manage workspace members nc workspace:members wabc1234xyz nc workspace:members:add wabc1234xyz '{"email":"user@example.com","roles":"workspace-creator"}' nc workspace:members:update wabc1234xyz '{"email":"user@example.com","roles":"workspace-viewer"}' nc workspace:members:remove wabc1234xyz '{"email":"user@example.com"}' ``` -------------------------------- ### Manage NocoDB Tables Source: https://context7.com/nocodb/agent-skills/llms.txt Perform CRUD operations on tables within a NocoDB base, including listing, getting details, creating, updating, and deleting tables. These operations are fundamental for structuring data within a base. ```bash # List all tables in a base nc table:list pdef5678uvw # Output: Users mghi9012rst # Orders mjkl3456opq # Get table details with fields nc table:get pdef5678uvw mghi9012rst # Output: {"id":"mghi9012rst","title":"Users","fields":[...]} # Create a new table nc table:create pdef5678uvw '{"title":"Customers"}' # Update table nc table:update pdef5678uvw mghi9012rst '{"title":"Contacts"}' # Delete table nc table:delete pdef5678uvw mghi9012rst ``` -------------------------------- ### Manage NocoDB Bases Source: https://context7.com/nocodb/agent-skills/llms.txt Perform CRUD operations on NocoDB bases (databases) within a workspace, including listing, getting details, creating, updating, deleting, and managing base collaboration. Base collaboration features require an Enterprise plan. ```bash # List all bases in a workspace nc base:list wabc1234xyz # Output: Inventory pdef5678uvw # CRM pghi9012rst # Get base details nc base:get pdef5678uvw # Output: {"id":"pdef5678uvw","title":"Inventory","tables":[...]} # Create a new base nc base:create wabc1234xyz '{"title":"New Base"}' # Update base nc base:update pdef5678uvw '{"title":"Updated Base Name"}' # Delete base nc base:delete pdef5678uvw # Base collaboration (Enterprise only) nc base:members pdef5678uvw nc base:members:add pdef5678uvw '{"email":"user@example.com","roles":"base-editor"}' nc base:members:update pdef5678uvw '{"email":"user@example.com","roles":"base-viewer"}' nc base:members:remove pdef5678uvw '{"email":"user@example.com"}' ``` -------------------------------- ### Manage Automation Scripts (Enterprise Only) Source: https://context7.com/nocodb/agent-skills/llms.txt These commands manage automation scripts within a base. They allow listing all scripts, getting script details, creating new scripts, updating existing scripts, and deleting scripts. Requires base ID and script ID where applicable. ```bash # List all scripts in a base nc script:list pdef5678uvw # Output: Daily Report script123 # Sync Data script456 ``` ```bash # Get script details nc script:get pdef5678uvw script123 ``` ```bash # Create a script nc script:create pdef5678uvw '{"title":"My Automation Script"}' ``` ```bash # Update a script nc script:update pdef5678uvw script123 '{"title":"Updated Script Name"}' ``` ```bash # Delete a script nc script:delete pdef5678uvw script123 ``` -------------------------------- ### NocoDB Where Clause Help Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Provides help on the syntax for constructing 'where' clauses used in filtering NocoDB data. ```APIDOC ## NocoDB Where Clause Help ### Description This command provides assistance and syntax information for constructing 'where' clauses, which are used for filtering data in NocoDB operations. ### Method CLI Command ### Endpoint `nc where:help` ### Parameters None ### Request Example ```bash nc where:help ``` ### Response #### Success Response (200) Displays help text and syntax examples for NocoDB 'where' clauses. ``` -------------------------------- ### NocoDB CLI Script for Linux/macOS Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md This entry points to the NocoDB CLI script available for Linux and macOS systems. It requires Bash, curl, and jq to function correctly. This script acts as the primary interface for command-line operations. ```bash # Linux / macOS: scripts/nocodb.sh (Bash, requires `curl` and `jq`) ``` -------------------------------- ### Manage Record Links with Pagination, Filtering, and Sorting Source: https://context7.com/nocodb/agent-skills/llms.txt This command allows listing records with support for pagination, filtering by status, sorting by creation date, and selecting specific fields like Name and Email. It requires base, table, and view IDs, along with pagination and filter parameters. ```bash nc link:list pdef5678uvw mghi9012rst cjkl3456opq 31 1 25 "(Status,eq,active)" "-CreatedAt" "Name,Email" ``` -------------------------------- ### Manage Nocodb Scripts (CLI - Enterprise) Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Commands for listing and creating scripts in Nocodb. Script APIs are available on Enterprise plans only. Requires table ID for listing and script definition for creation. ```bash nc script:list nc script:create ``` -------------------------------- ### NocoDB CLI Platform Support Scripts Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Illustrates the platform-specific shell scripts for running the NocoDB CLI. The Bash script requires `curl` and `jq`, while the PowerShell script has no external dependencies. ```bash # Linux / macOS: scripts/nocodb.sh (Bash, requires curl and jq) # Windows: scripts/nocodb.ps1 (PowerShell 5.1+, no external dependencies) ``` -------------------------------- ### Manage Nocodb Records (CLI) Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Commands for listing, retrieving, creating, updating, and deleting records in Nocodb. Supports pagination, filtering, sorting, and selecting specific fields. Requires table and view IDs. ```bash nc record:list [page_num] [page_size] [filter_query] [sort_query] nc record:get [fields] nc record:create nc record:update nc record:update-many nc record:delete nc record:count [filter_query] ``` -------------------------------- ### Manage API Tokens (Enterprise Only) Source: https://context7.com/nocodb/agent-skills/llms.txt These commands manage API tokens for authentication. They allow listing all tokens, creating new tokens with a title, and deleting existing tokens by their ID. The output for creation includes the token details. ```bash # List all API tokens nc token:list # Output: CI Token tkn1a2b3c4d5e6f7g # Dev Token tkn8h9i0j1k2l3m4n ``` ```bash # Create a new token nc token:create '{"title":"CI Token"}' # Output: {"id":"tkn1a2b3c4d5e6f7g","title":"CI Token","token":"xc-..."} ``` ```bash # Delete a token nc token:delete tkn1a2b3c4d5e6f7g ``` -------------------------------- ### Create Sort Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Creates a new sort configuration for a specified view. ```bash nc sort:create pdef5678uvw mghi9012rst vwmno7890abc '{"field_id":"cjkl3456opq","direction":"desc"}' ``` -------------------------------- ### NocoDB CLI: Base Management Commands Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Contains commands for managing NocoDB bases, such as listing, retrieving, creating, updating, and deleting bases. It also includes commands for managing base collaboration, which requires Enterprise plans. ```bash nc base:list wabc1234xyz # → pdef5678uvw nc base:get pdef5678uvw nc base:create wabc1234xyz '{"title":"New Base"}' nc base:update pdef5678uvw '{"title":"Renamed"}' nc base:delete pdef5678uvw # Base Collaboration (Enterprise plans only) nc base:members pdef5678uvw nc base:members:add pdef5678uvw '{"email":"user@example.com","roles":"base-editor"}' nc base:members:update pdef5678uvw '{"email":"user@example.com","roles":"base-viewer"}' nc base:members:remove pdef5678uvw '{"email":"user@example.com"}' ``` -------------------------------- ### Create Record Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Creates a new record in a specified table with provided field data. ```bash nc record:create pdef5678uvw mghi9012rst '{"fields":{"name":"Alice"}}' ``` -------------------------------- ### Manage Nocodb API Tokens (CLI - Enterprise) Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Commands for listing, creating, and deleting API tokens in Nocodb. API Token APIs are available on Enterprise plans only. Requires token ID for deletion and token definition for creation. ```bash nc token:list nc token:create nc token:delete ``` -------------------------------- ### Record APIs Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Manage NocoDB records within tables. These APIs are available on free plans. ```APIDOC ## Record APIs ### Description Manage NocoDB records within tables. These APIs are available on free plans. ### Method `nc` (CLI command) ### Endpoints - `record:list [base_id] [table_id]` - `record:get [base_id] [table_id] [record_id]` ### Parameters #### Path Parameters - **base_id** (string) - Required - The ID of the base. - **table_id** (string) - Required - The ID of the table. - **record_id** (string) - Required - The ID of the record. #### Query Parameters None #### Request Body None ### Request Example ```bash nc record:list pdef5678uvw mghi9012rst nc record:get pdef5678uvw mghi9012rst 31 ``` ### Response #### Success Response (200) - **id** (string) - The ID of the record. - **data** (object) - The data fields of the record. #### Response Example ```json { "id": "31", "data": { "Title": "Sample Record", "Status": "Open" } } ``` ``` -------------------------------- ### Scripts API Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Manage custom scripts. Available on Enterprise plans. ```APIDOC ## Scripts API ### Description Manage custom scripts. Available on Enterprise plans. ### Endpoints #### List Scripts * **Method:** `GET` (simulated via `nc script:list`) * **Endpoint:** `/api/v1/scripts` (conceptual) * **Description:** Retrieves a list of available scripts. * **Usage:** `nc script:list ` * **Parameters:** * `workspaceId` (string) - Required - The ID of the workspace. #### Create Script * **Method:** `POST` (simulated via `nc script:create`) * **Endpoint:** `/api/v1/scripts` (conceptual) * **Description:** Creates a new script. * **Usage:** `nc script:create ''` * **Parameters:** * `jsonData` (string) - Required - JSON object defining the script properties. * **Request Body Example:** ```json { "title": "My Script" } ``` ``` -------------------------------- ### Manage Nocodb Filters (CLI) Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Commands for listing and creating filters for Nocodb views. Filters define criteria for displaying records. Requires table, view, and filter definition. ```bash nc filter:list nc filter:create ``` -------------------------------- ### Use Resource Names vs. IDs in CLI Commands Source: https://context7.com/nocodb/agent-skills/llms.txt This section demonstrates how NocoDB CLI commands can use either human-readable names or internal IDs for resources like bases, tables, and fields. Using IDs directly is faster as it bypasses the name resolution step. Verbose mode can be enabled to see resolved IDs. ```bash # Using names (human-readable, resolved automatically) nc record:list MyBase Users nc field:list "My Project" Customers ``` ```bash # Using IDs (faster execution, no resolution needed) nc record:list pdef5678uvw mghi9012rst nc field:list pdef5678uvw mghi9012rst ``` ```bash # Enable verbose mode to see resolved IDs NOCODB_VERBOSE=1 nc field:list MyBase Users # Output: → base: MyBase → pdef5678uvw # → table: Users → mghi9012rst # Name SingleLineText cjkl3456opq # Email Email cmno7890abc ``` ```bash # ID prefixes for reference: # w = workspace (wabc1234xyz) # p = base (pdef5678uvw) # m = table (mghi9012rst) # c = column/field (cjkl3456opq) # vw = view (vwmno7890abc) ``` -------------------------------- ### List NocoDB Tables Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Lists all tables within a specified NocoDB base. This command is available on free plans and requires the base ID or name. It outputs table IDs. ```bash nc table:list pdef5678uvw # → mghi9012rst ``` -------------------------------- ### Manage Nocodb Teams (CLI - Enterprise) Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Commands for listing and creating teams in Nocodb. Team APIs require Enterprise plans. Requires workspace ID for listing and team definition for creation. ```bash nc team:list nc team:create ``` -------------------------------- ### List NocoDB Bases Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Lists all bases within a specified NocoDB workspace. This command is available on free plans and requires the workspace ID or name. It outputs base IDs. ```bash # Free plan APIs nc base:list wabc1234xyz # → pdef5678uvw ``` -------------------------------- ### List Sorts Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Retrieves a list of sort configurations for a specific view. ```bash nc sort:list pdef5678uvw mghi9012rst vwmno7890abc ``` -------------------------------- ### Filters and Sorts API Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Manage filters and sorting configurations for views. ```APIDOC ## Filters & Sorts API ### Description Manage filters and sorting configurations for views. ### Endpoints #### List Filters * **Method:** `GET` (simulated via `nc filter:list`) * **Endpoint:** `/api/v1/views/{viewId}/filters` (conceptual) * **Description:** Retrieves the list of filters applied to a view. * **Usage:** `nc filter:list ` * **Parameters:** * `tableId` (string) - Required - The ID of the table. * `viewId` (string) - Required - The ID of the view. #### Create Filter * **Method:** `POST` (simulated via `nc filter:create`) * **Endpoint:** `/api/v1/views/{viewId}/filters` (conceptual) * **Description:** Creates a new filter for a view. * **Usage:** `nc filter:create ''` * **Parameters:** * `tableId` (string) - Required - The ID of the table. * `viewId` (string) - Required - The ID of the view. * `jsonData` (string) - Required - JSON object defining the filter. * **Request Body Example:** ```json { "field_id": "cjkl3456opq", "operator": "eq", "value": "active" } ``` #### List Sorts * **Method:** `GET` (simulated via `nc sort:list`) * **Endpoint:** `/api/v1/views/{viewId}/sorts` (conceptual) * **Description:** Retrieves the list of sorting configurations for a view. * **Usage:** `nc sort:list ` * **Parameters:** * `tableId` (string) - Required - The ID of the table. * `viewId` (string) - Required - The ID of the view. #### Create Sort * **Method:** `POST` (simulated via `nc sort:create`) * **Endpoint:** `/api/v1/views/{viewId}/sorts` (conceptual) * **Description:** Creates a new sorting configuration for a view. * **Usage:** `nc sort:create ''` * **Parameters:** * `tableId` (string) - Required - The ID of the table. * `viewId` (string) - Required - The ID of the view. * `jsonData` (string) - Required - JSON object defining the sort. * **Request Body Example:** ```json { "field_id": "cjkl3456opq", "direction": "desc" } ``` ``` -------------------------------- ### View APIs Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Manage NocoDB views within tables. These APIs are available only on self-hosted and cloud-hosted Enterprise plans. ```APIDOC ## View APIs ### Description Manage NocoDB views within tables. These APIs are available only on self-hosted and cloud-hosted Enterprise plans. ### Method `nc` (CLI command) ### Endpoints - `view:list [base_id] [table_id]` - `view:get [base_id] [table_id] [view_id]` - `view:create [base_id] [table_id] '[{"title":"Active Users","type":"grid"}]'` - `view:update [base_id] [table_id] [view_id] '[{"title":"Renamed"}]'` - `view:delete [base_id] [table_id] [view_id]` ### Parameters #### Path Parameters - **base_id** (string) - Required - The ID of the base. - **table_id** (string) - Required - The ID of the table. - **view_id** (string) - Required - The ID of the view. #### Query Parameters None #### Request Body - **title** (string) - Required for create/update - The title of the view. - **type** (string) - Required for create - The type of the view (e.g., "grid", "gallery", "kanban", "calendar"). ### Request Example ```bash nc view:create pdef5678uvw mghi9012rst '{"title":"Kanban Board","type":"kanban"}' nc view:update pdef5678uvw mghi9012rst vwmno7890abc '{"title":"My Kanban"}' ``` ### Response #### Success Response (200) - **id** (string) - The ID of the view. - **title** (string) - The title of the view. - **type** (string) - The type of the view. - **baseId** (string) - The ID of the base the view belongs to. - **tableId** (string) - The ID of the table the view belongs to. #### Response Example ```json { "id": "vwmno7890abc", "title": "Kanban Board", "type": "kanban", "baseId": "pdef5678uvw", "tableId": "mghi9012rst" } ``` ``` -------------------------------- ### Workspace APIs Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Manage NocoDB workspaces. These APIs are available only on self-hosted and cloud-hosted Enterprise plans. ```APIDOC ## Workspace APIs ### Description Manage NocoDB workspaces. These APIs are available only on self-hosted and cloud-hosted Enterprise plans. ### Method `nc` (CLI command) ### Endpoints - `workspace:list` - `workspace:get [workspace_id]` - `workspace:create '[{"title":"New Workspace"}]'` - `workspace:update [workspace_id] '[{"title":"Renamed"}]'` - `workspace:delete [workspace_id]` - `workspace:members [workspace_id]` - `workspace:members:add [workspace_id] '[{"email":"user@example.com","roles":"workspace-creator"}]'` - `workspace:members:update [workspace_id] '[{"email":"user@example.com","roles":"workspace-viewer"}]'` - `workspace:members:remove [workspace_id] '[{"email":"user@example.com"}]'` ### Parameters #### Path Parameters - **workspace_id** (string) - Required - The ID of the workspace. #### Query Parameters None #### Request Body - **title** (string) - Required for create/update - The title of the workspace. - **email** (string) - Required for member operations - The email of the member. - **roles** (string) - Required for member operations - The role of the member (e.g., "workspace-creator", "workspace-viewer"). ### Request Example ```bash nc workspace:create '{"title":"My New Workspace"}' nc workspace:members:add wabc1234xyz '{"email":"test@example.com","roles":"workspace-admin"}' ``` ### Response #### Success Response (200) - **id** (string) - The ID of the workspace. - **title** (string) - The title of the workspace. - **members** (array) - List of workspace members. #### Response Example ```json { "id": "wabc1234xyz", "title": "My New Workspace", "members": [ { "email": "test@example.com", "roles": "workspace-admin" } ] } ``` ``` -------------------------------- ### Manage NocoDB Views (Enterprise Only) Source: https://context7.com/nocodb/agent-skills/llms.txt Manage different views for NocoDB tables, such as grid, gallery, kanban, and calendar views. These commands allow for different ways of visualizing and interacting with table data and are exclusive to Enterprise plans. ```bash # Example: List views for a table (syntax not provided in source, assuming similar pattern) # nc view:list # Example: Create a new grid view (syntax not provided in source, assuming similar pattern) # nc view:create '{"title":"My Grid View","type":"grid"}' # Example: Update a view (syntax not provided in source, assuming similar pattern) # nc view:update '{"title":"Updated Grid View"}' # Example: Delete a view (syntax not provided in source, assuming similar pattern) # nc view:delete ``` -------------------------------- ### List NocoDB Fields Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Lists all fields within a specified NocoDB table. This command is available on free plans and requires the base ID or name and the table ID or name. It outputs field IDs. ```bash nc field:list pdef5678uvw mghi9012rst # → cjkl3456opq ``` -------------------------------- ### Create Filter Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Creates a new filter for a specified view with given criteria. ```bash nc filter:create pdef5678uvw mghi9012rst vwmno7890abc '{"field_id":"cjkl3456opq","operator":"eq","value":"active"}' ``` -------------------------------- ### Field APIs Source: https://github.com/nocodb/agent-skills/blob/main/plugins/nc-skills/SKILL.md Manage NocoDB fields within tables. These APIs are available on free plans. ```APIDOC ## Field APIs ### Description Manage NocoDB fields within tables. These APIs are available on free plans. ### Method `nc` (CLI command) ### Endpoints - `field:list [base_id] [table_id]` - `field:get [base_id] [table_id] [field_id]` - `field:create [base_id] [table_id] '[{"title":"Phone","type":"PhoneNumber"}]'` - `field:update [base_id] [table_id] [field_id] '[{"title":"Mobile"}]'` - `field:delete [base_id] [table_id] [field_id]` ### Parameters #### Path Parameters - **base_id** (string) - Required - The ID of the base. - **table_id** (string) - Required - The ID of the table. - **field_id** (string) - Required - The ID of the field. #### Query Parameters None #### Request Body - **title** (string) - Required for create/update - The title of the field. - **type** (string) - Required for create - The data type of the field (e.g., "PhoneNumber", "SingleLineText", "Number"). ### Request Example ```bash nc field:create pdef5678uvw mghi9012rst '{"title":"EmailAddress","type":"Email"}' nc field:update pdef5678uvw mghi9012rst cjkl3456opq '{"title":"Primary Email"}' ``` ### Response #### Success Response (200) - **id** (string) - The ID of the field. - **title** (string) - The title of the field. - **type** (string) - The data type of the field. - **baseId** (string) - The ID of the base the field belongs to. - **tableId** (string) - The ID of the table the field belongs to. #### Response Example ```json { "id": "cjkl3456opq", "title": "EmailAddress", "type": "Email", "baseId": "pdef5678uvw", "tableId": "mghi9012rst" } ``` ``` -------------------------------- ### Teams API Source: https://github.com/nocodb/agent-skills/blob/main/SKILL.md Manage workspace teams. Available on Enterprise plans. ```APIDOC ## Teams API ### Description Manage workspace teams. Available on Enterprise plans. ### Endpoints #### List Teams * **Method:** `GET` (simulated via `nc team:list`) * **Endpoint:** `/api/v1/workspaces/{workspaceId}/teams` (conceptual) * **Description:** Retrieves a list of teams within a workspace. * **Usage:** `nc team:list ` * **Parameters:** * `workspaceId` (string) - Required - The ID of the workspace. #### Create Team * **Method:** `POST` (simulated via `nc team:create`) * **Endpoint:** `/api/v1/workspaces/{workspaceId}/teams` (conceptual) * **Description:** Creates a new team within a workspace. * **Usage:** `nc team:create ''` * **Parameters:** * `workspaceId` (string) - Required - The ID of the workspace. * `jsonData` (string) - Required - JSON object defining the team properties. * **Request Body Example:** ```json { "title": "Engineering" } ``` ``` -------------------------------- ### Button Actions API Source: https://context7.com/nocodb/agent-skills/llms.txt APIs for triggering button field actions on records. ```APIDOC ## Button Actions API ### Description Trigger button field actions on records. ### Trigger a Button Action on a Record **Method:** POST (implied) **Endpoint:** `/action:trigger` **Parameters:** - **baseId** (string) - Required - The ID of the base. - **tableId** (string) - Required - The ID of the table. - **buttonFieldId** (string) - Required - The ID of the button field. - **recordId** (string) - Required - The ID of the record. **Response Example (Success):** ```json { "success": true } ``` ```