Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.1.0] - 2025-01-25

Initial release implementing Codex Document Format Specification v0.1.
Initial release implementing CDX Document Format Specification v0.1.

### Added

#### Core Infrastructure
- `Document` type with high-level API for working with Codex documents
- `Document` type with high-level API for working with CDX documents
- `DocumentBuilder` for fluent document creation
- `DocumentState` enum with state machine (Draft, Review, Frozen, Published)
- `DocumentId` for content-addressable document identification
Expand Down Expand Up @@ -326,7 +326,7 @@ Initial release implementing Codex Document Format Specification v0.1.
- `Signer` and `Verifier` traits for extensibility
- `EcdsaSigner` and `EcdsaVerifier` implementations
- `SignerInfo` with name, email, organization, certificate support
- Signature file structure per Codex security extension
- Signature file structure per CDX security extension

#### Asset Management
- `ImageAsset` with format support (AVIF, WebP, PNG, JPEG, SVG)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ src/
## Adding New Features

1. **Discuss first**: Open an issue to discuss significant changes
2. **Spec compliance**: Ensure changes align with the Codex specification
2. **Spec compliance**: Ensure changes align with the CDX specification
3. **Backward compatibility**: Avoid breaking changes unless necessary
4. **Testing**: Add tests for new functionality
5. **Documentation**: Update rustdoc and README as needed

## Specification Reference

This library implements the [Codex Document Format Specification](https://github.com/Entrolution/codex-file-format-spec). When implementing new features:
This library implements the [CDX Document Format Specification](https://github.com/Entrolution/codex-file-format-spec). When implementing new features:

- Reference the relevant spec section
- Note any deviations or extensions
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Codex Document Format Contributors
Copyright 2025 CDX Document Format Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Codex Document Format Contributors
Copyright (c) 2025 CDX Document Format Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

# cdx-core

Core Rust library for reading, writing, and validating [Codex Document Format](https://github.com/Entrolution/codex-file-format-spec) (`.cdx`) files.
Core Rust library for reading, writing, and validating [CDX Document Format](https://github.com/Entrolution/codex-file-format-spec) (`.cdx`) files.

## Overview

Codex is an open document format designed for:
CDX is an open document format designed for:

- **Semantic content** - Structured content blocks, not just rendered output
- **Verifiable integrity** - Content-addressable hashing and digital signatures
- **Machine readability** - JSON-based format with well-defined schemas
- **Modern security** - Built-in support for signatures and encryption

This library provides the foundational capabilities for working with Codex documents in Rust, with support for WASM compilation.
This library provides the foundational capabilities for working with CDX documents in Rust, with support for WASM compilation.

## Features

Expand Down Expand Up @@ -79,9 +79,9 @@ fn main() -> Result<()> {
.title("My Document")
.creator("Jane Doe")
.add_heading(1, "Introduction")
.add_paragraph("This is my first Codex document.")
.add_paragraph("This is my first CDX document.")
.add_heading(2, "Features")
.add_paragraph("Codex provides semantic structure and verifiable integrity.")
.add_paragraph("CDX provides semantic structure and verifiable integrity.")
.build()?;

// Compute the document ID
Expand Down Expand Up @@ -161,7 +161,7 @@ cargo run --example open_and_verify path/to/document.cdx

## Specification Compliance

This library implements the [Codex Document Format Specification v0.1](https://github.com/Entrolution/codex-file-format-spec).
This library implements the [CDX Document Format Specification v0.1](https://github.com/Entrolution/codex-file-format-spec).

### Module Status

Expand Down
4 changes: 2 additions & 2 deletions cdx-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "Command-line interface for working with Codex Document Format (.cdx) files"
description = "Command-line interface for working with CDX Document Format (.cdx) files"
readme = "README.md"
keywords = ["codex", "document", "cli", "format"]
keywords = ["cdx", "document", "cli", "format"]
categories = ["command-line-utilities"]
documentation = "https://docs.rs/cdx-cli"

Expand Down
6 changes: 3 additions & 3 deletions cdx-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cdx-cli

Command-line interface for working with Codex Document Format (.cdx) files.
Command-line interface for working with CDX Document Format (.cdx) files.

## Installation

Expand All @@ -20,7 +20,7 @@ cargo build -p cdx-cli --release
cdx <command> [options]

Commands:
create Create a new Codex document
create Create a new CDX document
validate Validate document structure and hashes
inspect Display document information
status Show comprehensive document status
Expand All @@ -38,7 +38,7 @@ Commands:
get-metadata Display document metadata
set-metadata Set document metadata fields
pack Pack a directory or JSON into a .cdx archive
diff Compare two Codex documents
diff Compare two CDX documents
show-timestamps Show timestamps in a document
verify-timestamps Verify timestamps in a document
add-timestamp Add a timestamp record to a document
Expand Down
50 changes: 25 additions & 25 deletions cdx-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::PathBuf;

#[derive(Parser)]
#[command(name = "cdx")]
#[command(author, version, about = "Codex Document Format CLI", long_about = None)]
#[command(author, version, about = "CDX Document Format CLI", long_about = None)]
#[command(propagate_version = true)]
pub struct Cli {
#[command(subcommand)]
Expand Down Expand Up @@ -38,7 +38,7 @@ pub enum ColorChoice {

#[derive(Subcommand)]
pub enum Commands {
/// Create a new Codex document
/// Create a new CDX document
Create {
/// Document title (required)
#[arg(short, long)]
Expand All @@ -62,13 +62,13 @@ pub enum Commands {

/// Validate document structure and hashes
Validate {
/// Codex document to validate
/// CDX document to validate
file: PathBuf,
},

/// Display document information
Inspect {
/// Codex document to inspect
/// CDX document to inspect
file: PathBuf,

/// Show detailed block information
Expand All @@ -86,13 +86,13 @@ pub enum Commands {

/// Show comprehensive document status
Status {
/// Codex document to check
/// CDX document to check
file: PathBuf,
},

/// Add a digital signature
Sign {
/// Codex document to sign
/// CDX document to sign
file: PathBuf,

/// Private key file (PEM format)
Expand All @@ -118,7 +118,7 @@ pub enum Commands {

/// Verify signatures and integrity
Verify {
/// Codex document to verify
/// CDX document to verify
file: PathBuf,

/// Public key file(s) for signature verification
Expand All @@ -128,7 +128,7 @@ pub enum Commands {

/// Extract content or assets
Extract {
/// Codex document to extract from
/// CDX document to extract from
file: PathBuf,

/// Output directory for extraction
Expand Down Expand Up @@ -161,7 +161,7 @@ pub enum Commands {
/// Submit document for review (draft → review)
#[command(name = "submit-review")]
SubmitReview {
/// Codex document to submit
/// CDX document to submit
file: PathBuf,

/// Output file (default: overwrite input)
Expand All @@ -171,7 +171,7 @@ pub enum Commands {

/// Freeze document (review → frozen)
Freeze {
/// Codex document to freeze
/// CDX document to freeze
file: PathBuf,

/// Output file (default: overwrite input)
Expand All @@ -181,7 +181,7 @@ pub enum Commands {

/// Publish document (frozen → published)
Publish {
/// Codex document to publish
/// CDX document to publish
file: PathBuf,

/// Output file (default: overwrite input)
Expand All @@ -191,7 +191,7 @@ pub enum Commands {

/// Revert document to draft (review → draft)
Revert {
/// Codex document to revert
/// CDX document to revert
file: PathBuf,

/// Output file (default: overwrite input)
Expand All @@ -201,7 +201,7 @@ pub enum Commands {

/// Fork document to create new version with lineage
Fork {
/// Codex document to fork
/// CDX document to fork
file: PathBuf,

/// Output file for the forked document
Expand All @@ -215,7 +215,7 @@ pub enum Commands {

/// Generate a Merkle proof for a block
Prove {
/// Codex document
/// CDX document
file: PathBuf,

/// Block ID to prove
Expand All @@ -234,7 +234,7 @@ pub enum Commands {
/// Verify a Merkle proof against a document
#[command(name = "verify-proof")]
VerifyProof {
/// Codex document
/// CDX document
file: PathBuf,

/// Proof JSON file
Expand All @@ -244,21 +244,21 @@ pub enum Commands {
/// Show document lineage (ancestor chain)
#[command(name = "show-lineage")]
ShowLineage {
/// Codex document
/// CDX document
file: PathBuf,
},

/// Display document metadata
#[command(name = "get-metadata")]
GetMetadata {
/// Codex document
/// CDX document
file: PathBuf,
},

/// Set document metadata fields
#[command(name = "set-metadata")]
SetMetadata {
/// Codex document
/// CDX document
file: PathBuf,

/// Set title
Expand Down Expand Up @@ -308,7 +308,7 @@ pub enum Commands {
from_json: bool,
},

/// Compare two Codex documents
/// Compare two CDX documents
Diff {
/// First document
file1: PathBuf,
Expand All @@ -320,21 +320,21 @@ pub enum Commands {
/// Show timestamps in a document
#[command(name = "show-timestamps")]
ShowTimestamps {
/// Codex document
/// CDX document
file: PathBuf,
},

/// Verify timestamps in a document
#[command(name = "verify-timestamps")]
VerifyTimestamps {
/// Codex document
/// CDX document
file: PathBuf,
},

/// Add a timestamp record to a document
#[command(name = "add-timestamp")]
AddTimestamp {
/// Codex document
/// CDX document
file: PathBuf,

/// Timestamp method (rfc3161, bitcoin, ethereum, opentimestamps)
Expand Down Expand Up @@ -365,7 +365,7 @@ pub enum Commands {
/// Acquire a timestamp from a timestamp authority
#[command(name = "timestamp-acquire")]
TimestampAcquire {
/// Codex document to timestamp
/// CDX document to timestamp
file: PathBuf,

/// Timestamp method (rfc3161, ots, auto)
Expand All @@ -383,7 +383,7 @@ pub enum Commands {

/// Encrypt a document with password-based encryption
Encrypt {
/// Codex document to encrypt
/// CDX document to encrypt
file: PathBuf,

/// Password (will prompt if not provided)
Expand All @@ -397,7 +397,7 @@ pub enum Commands {

/// Decrypt a password-encrypted document
Decrypt {
/// Codex document to decrypt
/// CDX document to decrypt
file: PathBuf,

/// Password (will prompt if not provided)
Expand Down
2 changes: 1 addition & 1 deletion cdx-cli/src/commands/decrypt.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Decrypt command implementation.
//!
//! Decrypts a Codex document that was encrypted with password-based encryption.
//! Decrypts a CDX document that was encrypted with password-based encryption.

#[cfg(feature = "encryption")]
use anyhow::Context;
Expand Down
2 changes: 1 addition & 1 deletion cdx-cli/src/commands/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::path::Path;

use crate::output::OutputConfig;

/// Compare two Codex documents.
/// Compare two CDX documents.
pub fn run(file1: &Path, file2: &Path, config: &OutputConfig) -> Result<()> {
config.verbose(&format!(
"Comparing: {} vs {}",
Expand Down
2 changes: 1 addition & 1 deletion cdx-cli/src/commands/encrypt.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Encrypt command implementation.
//!
//! Encrypts a Codex document using AES-256-GCM with password-based key derivation.
//! Encrypts a CDX document using AES-256-GCM with password-based key derivation.

#[cfg(feature = "encryption")]
use anyhow::Context;
Expand Down
2 changes: 1 addition & 1 deletion cdx-cli/src/commands/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub fn run(
Ok(())
}

/// Extract assets from a Codex document.
/// Extract assets from a CDX document.
fn extract_assets(
file: &Path,
output_dir: &Path,
Expand Down
Loading
Loading