8000 GitHub - btwld/ack: A modern Dart schema library for structured data, with a focus on LLM tools in mind. · GitHub
[go: up one dir, main page]

Skip to content
btwldPublic

About

A modern Dart schema library for structured data, with a focus on LLM tools in mind.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

64 stars

Watchers

1 watching

Forks

Latest commit

 

History

247 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ack

CI pub package License Documentation llms.txt

Ack validates data in Dart and Flutter. This branch documents 2.0.0-beta.4; see the migration guide for 1.x changes.

Start here

Install the version documented on this branch:

dart pub add ack:^2.0.0-beta.4
import 'package:ack/ack.dart';

final userSchema = Ack.object({
  'name': Ack.string().minLength(2).maxLength(50),
  'age': Ack.integer().min(0).max(120),
  'email': Ack.string().email().nullable(),
});

final result = userSchema.safeParse({
  'name': 'Ada',
  'age': 36,
  'email': 'ada@example.com',
});

if (result.isOk) {
  print('Welcome, ${result.getOrThrow()!['name']}');
} else {
  print(result.getError()); // one path: message line per failure
}

See installation for SDK requirements, model generation for @Schemable, and codecs for encoding and callback failure semantics.

Packages

Package Purpose
ack Runtime schemas, codecs, JSON Schema import/export, annotations
ack_generator Models from schemas and schemas from classes
ack_firebase_ai Firebase AI response JSON Schema maps
ack_json_schema_builder Bidirectional json_schema_builder bridge
ack_mcp_dart MCP input schemas and typed argument validation

Examples demonstrate the packages together.

Documentation and contributing

About

A modern Dart schema library for structured data, with a focus on LLM tools in mind.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

64 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0