# Start a dcupl project

dcupl is a TypeScript SDK, a CLI and a Console that give your app and your coding agent one typed model of your data.

```console title="New project"
$ npm install -g @dcupl/cli
$ dcupl init my-app --starter minimal --json
{"ok":true,"starter":"minimal","here":false,"name":"my-app","path":"…/my-app"}
```

Scaffolding and local queries need no account.

[CLI quickstart](/cli)

```console title="Your own data"
$ cp ~/exports/products.csv dcupl/data/
$ dcupl generate model --from dcupl/data/products.csv --name Product --register --json
{"ok":true,"modelKey":"Product","model":{"key":"Product","properties":[{"key":"id","type":"int"},{"key":"name","type":"string"},…,{"key":"price","type":"float"},{"key":"onSale","type":"boolean"}],"keyProperty":"id"},"keyStrategy":{"kind":"single-property","column":"id","reason":"only unique key-like column"},"registered":true,…}
```

The types and the key come from the file; the model and the data resource are registered in your project. Pass `--key-property` when no column is unique.

[Scaffolding](/cli/scaffolding)

```console title="For your agent"
# in your shell
$ npm install -g @dcupl/cli
# in Claude Code
/plugin marketplace add dcupl/dcupl-plugins
/plugin install dcupl@dcupl-plugins
```

Then ask: "Set up a dcupl project for products.csv and show me the model."

Cursor, Codex or Copilot need only the CLI; they read its `--json` answers.

[Agent setup](/agentic/setup)

## Product areas

- [TypeScript SDK](/sdk) — Load your models and data in the browser or Node.js, then query, facet and aggregate in memory.
- [CLI](/cli) — Scaffold a project, model an export, query it in a local app and sync files with the Console.
- [Console](/console) — Model your data and run workflows that load, join and clean your exports.
- [REST APIs](/console/rapi) — Deploy your application as a REST API (RAPI): it answers queries, facets and aggregations over HTTP, with an OpenAPI document.
- [MCP](/console/rapi/mcp) — Let an agent read a deployed REST API instance through read-only tools, where it is turned on.

## What is new

- [Local data apps](/cli/local-data-apps) — dcupl app loads your project or a CSV as a local app your agent can query.
- [MCP endpoint](/console/rapi/mcp) — Read-only tools for models, queries, facets and aggregations on a REST API instance, where it is turned on.
- [Scripted endpoints](/console/rapi/scripted-endpoints) — Your own HTTP routes on a REST API instance, answered by a script from your project.
- [SDK migration guide](/sdk/guides/migration) — The behaviour changes and the new query method names; the old names keep working.

## Three commands and what they return

1. ```console
   $ dcupl app models get --model Product --json
   {"key":"Product","properties":[…,{"key":"price","type":"float"},{"key":"onSale","type":"boolean"}]}
   ```

   The real model: every property with its type.

2. ```console
   $ dcupl app data upsert --file new-prices.csv --model Product --key-property id --json
   {"upserted":5,"model":"Product","built":false,…}
   ```

   Staged, not applied: nothing changes until the build.

3. ```console
   $ dcupl app build --json
   {"appId":"shop","built":true}
   ```

   A build step you approve applies the staged changes.

Replies from a local app started with `dcupl app create --app shop --load --auto-serve` on twelve demo products, shortened at …. With `--json`, errors come back as JSON too.

## The SDK in a few lines

TypeScript-first. Works in browser and Node.js.

```ts filename="app.ts"
import { Dcupl } from '@dcupl/core';

const products = [
  { key: 'p1', name: 'iPhone 16', brand: 'Apple', category: 'Electronics' },
  { key: 'p2', name: 'MacBook Air', brand: 'Apple', category: 'Electronics' },
  { key: 'p3', name: 'Galaxy S25', brand: 'Samsung', category: 'Electronics' },
  { key: 'p4', name: 'Air Max 90', brand: 'Nike', category: 'Shoes' },
];

// Initialize dcupl with a model and your data
const dcupl = new Dcupl();
dcupl.models.set({
  key: 'Product',
  properties: [
    { key: 'name', type: 'string' },
    { key: 'brand', type: 'string' },
    { key: 'category', type: 'string' },
  ],
});
dcupl.data.set(products, { model: 'Product' });
await dcupl.init();

// Create a list for querying
const productsList = dcupl.lists.create({ modelKey: 'Product' });

// Apply filters — runs instantly, in-memory
productsList.catalog.query.addCondition({
  attribute: 'category',
  operator: 'eq',
  value: 'Electronics',
});

// Get facets for filter UI
const brands = productsList.catalog.fn.facets({ attribute: 'brand' });
// => [{ value: 'Apple', size: 2, ... }, { value: 'Samsung', size: 1, ... }]

// Get results
const items = productsList.catalog.query.items();
// => iPhone 16, MacBook Air, Galaxy S25
```

## Use cases

From quick prototypes to production applications

### Rapid prototyping

Validate ideas fast with real data

1. Use spreadsheets or static JSON/CSV as your data source
2. Define models in Console or code
3. Build the UI on SDK queries and facets

### Data preparation (ETL)

Transform messy data into clean models

1. Customer provides data (API, CSV or JSON export)
2. Create ETL workflow in Console (load → transform → write)
3. Load prepared data via SDK in your app

### Product catalogs

Search, filter, facets — all in-memory

1. Load product data from Console or any source
2. Build filters, search, and faceted navigation
3. No server round-trips — queries run in the browser

### Dashboards and analytics

Aggregations, pivots, real-time updates

1. Connect data via Workflows or direct load
2. Use SDK aggregations (sum, avg, min, max)
3. Build interactive charts and pivot tables

### Product configurators

Complex rules, instant feedback

1. Model products with variants and dependencies
2. Filter valid combinations in real-time
3. Instant UI updates — no server round-trips

### Internal tools

Admin panels, data browsers, reports

1. Connect internal data sources via Workflows
2. Filter, search and aggregate the data in the browser
3. Ship without a dedicated backend team

## Your first query is a CLI command away.

Add the Console when you need workflows or a REST API.

[Install the CLI](/cli) [Open Console](https://console.dcupl.com)

## Frequently asked questions

Common questions about dcupl

**What is dcupl?**

dcupl is a TypeScript SDK, a CLI and a Console that give your app and your coding agent one typed model of your data. The model runs in your app through the SDK, behind a REST API (RAPI) once you deploy it, and for agents over MCP where it is turned on.

**Does it only work with Claude Code?**

No. Any agent that runs shell commands can drive the CLI and parse its JSON. The skill makes Claude Code faster; it is not required.

**Is dcupl free to use?**

Yes. The CLI and the SDK are free on npm; scaffolding and querying run locally without an account. The dcupl Console has a free tier for hosted workflows and REST APIs; talk to us for more.

**How much data can dcupl handle?**

It depends on your data structure and on the memory available in the browser or Node.js, and query time grows with the number of records. Measured with 1 million items: indexed queries took 25–65 ms, facets about 2.7 s. Test with realistic data volumes.

**Do I need the Console to use the SDK?**

No. The SDK works completely standalone — you can define models and load data directly in code. The Console is optional and provides visual data modeling, ETL workflows, and hosted APIs for teams that want a managed solution.

**Which frameworks does dcupl support?**

dcupl is framework-agnostic and works with React, Vue, Angular, Svelte, or vanilla JavaScript/TypeScript. The Learn section has integration tutorials for React and Vue.

**Can I use dcupl with server-side rendering (SSR)?**

Yes. The SDK runs in Node.js, so you can load data and run queries on the server in Next.js, Nuxt, Angular SSR, or any other SSR framework. There is no built-in state transfer: the client creates and initializes its own dcupl instance.
