.agents/skills/tinybird/rules/project-files.md
tinybird/ folder at the project root and nest Tinybird folders under it..tinyb credentials file is at the same level where the CLI commands are run.tinybird.config.json file in the project root controls build/deploy behavior.Use tb info to confirm CLI context, especially for credentials issues.
It reports information about Local and Cloud environments:
.tinyb file fromIt can show values for both Cloud and Local environments.
Default locations (use these unless the project uses a different structure):
/endpoints/materializations/sinks/copies/connections/datasources/fixtures/testsAs projects grow, consider organizing endpoints and datasources by domain or consumer. The include field in tinybird.config.json controls which directories are included in builds.
For example, a project with multiple consumers might use:
tinybird/
├── datasources/
├── endpoints/ # General-purpose API endpoints
├── endpoints_dashboard/ # Dashboard-specific endpoints
├── endpoints_public/ # Public-facing endpoints
├── materializations/
├── copies/
├── connections/
└── fixtures/
This pattern helps when different teams or applications consume different sets of endpoints, and keeps the endpoint count manageable per directory.
For complex projects, organizing datasources and pipes into logical data layers improves clarity:
| Layer | Purpose | Example |
|---|---|---|
| Landing | Raw ingested data from external sources | raw_events, s3_import_logs |
| Cleaned | Deduplicated or transformed data | events_dedup, normalized_logs |
| Dimensions | Lookup and reference tables | dim_organizations, dim_users |
| Aggregation | Materialized views for pre-computed metrics | mv_events_daily, mv_usage_hourly |
| API | Endpoint pipes that serve the final queries | kpis, top_pages, user_activity |
| Export | Sink pipes for sending data to external systems | sink_to_s3, sink_to_kafka |
Not every project needs all layers. Start simple and add layers as complexity grows.
When writing descriptions, comments, or documentation for Tinybird resources, use consistent capitalization:
Datafile instructions should be referenced in uppercase: FORWARD_QUERY, ENGINE_SORTING_KEY, ENGINE_PARTITION_KEY, COPY_SCHEDULE, COPY_MODE, TYPE, SCHEMA, DESCRIPTION.
See these rule files for detailed requirements:
rules/datasource-files.mdrules/pipe-files.mdrules/endpoint-files.mdrules/materialized-files.mdrules/sink-files.mdrules/copy-files.mdrules/connection-files.mdAfter making changes in the project files, check rules/build-deploy.md for next steps.