You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
Coda is an automated client generation tool for Solana programs. Built on top of [Codama](https://github.com/codama-idl/codama), Coda provides a zero-config CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
7
+
Coda is an automated client generation tool for Solana programs. Built on top of [Codama](https://github.com/codama-idl/codama), Coda provides a CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
8
8
9
9
The monorepo contains:
10
10
-**Coda CLI** - The main tool for generating TypeScript clients from Anchor IDLs
@@ -71,7 +71,7 @@ coda/
71
71
## Core Packages
72
72
73
73
### 1. **@macalinao/coda** - CLI for client generation
74
-
-Zero-config by default (looks for `./idls/*.json`)
74
+
-Works out of the box (looks for `./idls/*.json` by default)
75
75
- Configurable via `coda.config.mjs`
76
76
- Generates TypeScript clients with full type safety
Coda automatically generates type-safe TypeScript clients from your Anchor IDLs. Built on [Codama](https://github.com/codama-idl/codama), it provides a zero-config CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
14
+
Coda automatically generates type-safe TypeScript clients from your Anchor IDLs. Built on [Codama](https://github.com/codama-idl/codama), it provides a CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
description: The main CLI tool for automated client generation from Solana IDLs
4
4
---
5
5
6
-
The core Coda package provides a zero-config CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
6
+
The core Coda package provides a CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
7
7
8
8
## Installation
9
9
@@ -18,7 +18,7 @@ npm install -D @macalinao/coda
18
18
19
19
## Features
20
20
21
-
- 🚀 **Zero configuration** - Works out of the box with sensible defaults
21
+
- 🚀 **Minimal configuration** - Works out of the box with sensible defaults
22
22
- 🔧 **Fully customizable** - Extend and transform generated code with visitors
23
23
- 📦 **ES modules native** - Modern JavaScript with proper `.js` extensions
24
24
- 🎯 **Type-safe** - Full TypeScript support with precise types
@@ -54,7 +54,7 @@ Options:
54
54
55
55
## Configuration
56
56
57
-
### Zero-Config (Default)
57
+
### Default Configuration
58
58
59
59
Coda works without any configuration by looking for IDLs in `./idls/*.json`:
60
60
@@ -309,25 +309,123 @@ Use the dedupe visitor to flatten nested account structures:
1. Ensure `"type": "module"` is in your package.json
404
+
2. Check that tsconfig.json uses `"moduleResolution": "NodeNext"`
405
+
3. Verify all local imports use `.js` extensions
406
+
407
+
### Type Errors
408
+
409
+
If TypeScript shows errors:
410
+
411
+
1. Run `bun install` to ensure dependencies are installed
412
+
2. Check that `@solana/web3.js` is installed
413
+
3. Verify tsconfig includes the generated directory
414
+
415
+
## Examples
416
+
417
+
### Single Program
418
+
419
+
See the [token-metadata client](https://github.com/macalinao/coda/tree/master/clients/token-metadata) for a complete example of a single program setup.
420
+
421
+
### Multiple Programs
422
+
423
+
See the [Quarry client](https://github.com/macalinao/coda/tree/master/clients/quarry) for an example with multiple programs and custom visitors.
0 commit comments