Skip to main content
Astra first-party packages are optional libraries published and maintained by Astra Kairo. They extend your application beyond Kairo Core with capabilities like JSON serialization, HTTP communication, file system access, database connectivity, and more. Unlike the Core prelude or Pulse Runtime Services, Astra packages are not bundled with the toolchain — you explicitly declare the ones you need, keeping your dependency surface small and your build intentional.

Adding an Astra package

To use an Astra package, declare it in the [dependencies] section of your kairo.toml manifest. After editing the manifest, run forge restore to fetch and register the package in your project.
Once restored, import the package in any source file where you need it:
Only declare the Astra packages your application actually uses. Each declared dependency is fetched, compiled, and linked — keeping your manifest lean improves build times and reduces your attack surface.

Available packages

Astra.Money

Monetary values and arithmetic. Provides the Money type with currency-aware addition, subtraction, rounding, and formatting. Money is not a Kairo Core primitive — this package is the canonical source for any currency-denominated value in your domain.

Astra.Json

JSON serialization and deserialization. Convert Kairo values and objects to JSON text and parse JSON text back into typed Kairo values.

Astra.Xml

XML processing. Parse XML documents into structured representations, navigate elements and attributes, and generate well-formed XML output.

Astra.Configuration

Application configuration. Load and access structured configuration from files, environment variables, or layered sources with type-safe retrieval.

Astra.Http

HTTP client and server. Make typed outbound HTTP requests and define inbound HTTP handlers for building APIs and web services.

Astra.Cryptography

Cryptographic primitives. Hashing, HMAC, digital signing, symmetric and asymmetric encryption, and secure random number generation.

Astra.FileSystem

File system access. Read and write files, enumerate directories, manage paths, and perform common file operations in a platform-aware way.

Astra.Database

Database access. Connect to relational and other database systems, execute queries, and map results to typed Kairo values.

Package details

Astra.Money

Money is not part of Kairo Core. If your domain involves prices, balances, invoices, or any currency-denominated quantity, use Astra.Money — it is the canonical source for monetary values in Kairo.
Do not represent monetary values as Decimal or Float64. Floating-point arithmetic introduces rounding errors that are unacceptable in financial calculations. Always use Astra.Money for currency-denominated values.

Astra.Json

Serialize Kairo value types to JSON text and deserialize JSON text back into typed values with Astra.Json.

Astra.Http

Use Astra.Http to make outbound HTTP requests or define handlers for inbound HTTP traffic.

Astra.FileSystem

Astra.FileSystem provides platform-aware file and directory operations for reading, writing, and navigating the local file system.

Astra.Configuration

Load and access structured application configuration with Astra.Configuration. It supports layered sources and type-safe retrieval so your application code never has to parse raw strings from environment variables by hand.

Astra.Cryptography

Astra.Cryptography provides cryptographic primitives including hashing algorithms, HMAC, digital signatures, symmetric and asymmetric encryption, and secure random generation.

Astra.Xml

Parse and generate XML documents with Astra.Xml. Navigate elements, read attributes, and produce well-formed output for interoperability with XML-based systems and formats.

Astra.Database

Astra.Database enables connection to relational and other database systems, parameterized query execution, and result mapping to typed Kairo values.

Astra package documentation expands as each package stabilizes and reaches its first stable release. Refer to the individual package reference pages for the most current API details, supported options, and usage patterns.