| Crates.io | codama-cli |
| lib.rs | codama-cli |
| version | 0.7.2 |
| created_at | 2025-11-25 14:49:22.251355+00 |
| updated_at | 2026-01-23 15:12:29.229634+00 |
| description | Command-line interface for Codama |
| homepage | |
| repository | https://github.com/codama-idl/codama-rs |
| max_upload_size | |
| id | 1949901 |
| size | 24,401 |
Command-line interface for generating Codama IDL from Rust projects.
cargo install --path codama-cli
Or build from source:
cargo build --release -p codama-cli
codama-rs generate-idl ./my-program
codama-rs generate-idl ./my-program --pretty
codama-rs generate-idl ./my-program -o idl.json
codama-rs generate-idl ./my-program --pretty --output idl.json
Command-line interface for Codama
Usage: codama-rs <COMMAND>
Commands:
generate-idl Generate IDL from a Rust project
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
generate-idl subcommandGenerate IDL from a Rust project
Usage: codama-rs generate-idl [OPTIONS] [PATH]
Arguments:
[PATH] Path to the Rust project (defaults to current directory) [default: .]
Options:
-o, --output <OUTPUT> Output file path (defaults to stdout)
-p, --pretty Pretty-print the JSON output
-h, --help Print help
cd my-solana-program
codama-rs generate-idl
codama-rs generate-idl ./programs/my-program --pretty
Output:
{
"kind": "rootNode",
"standard": "codama",
"program": {
"kind": "programNode",
"name": "myProgram",
...
}
}
codama-rs generate-idl ./my-program -o idl.json
# IDL written to: idl.json
Cargo.toml and library or binary targetApache-2.0