Observed since 20 Oct, 22:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Author DSL Parser – A robust parser for author configuration files with support for blocks, types, and multiline values.
The Author DSL parser reads and validates author.txt files. It turns them into a clean abstract syntax tree (AST) for use in scripts, websites, or applications. The format is designed for author profiles and metadata. It supports blocks, typed keys, lists, and multiline values.
Full specification: Author DSL Specification
author.txt/author.txt or /.well-known/author.txtThe DSL is line-oriented. Each line is a statement, block, or comment.
# are ignored.Key: Value pairs.Key@type: Value. Common types include url, email, date, and multiline.Begin Name and end with End Name.""" to span multiple lines.Include: <path> to reference another file.Author-DSL – DSL versionInclude – references another fileExpires – expiration datePublicKey / Fingerprint – optional identity proof# Author file example
Author-DSL: 1.0
Author: Lexi
Handle: 0x800a6
Alias: lexi, author, sysprog
Website@url: https://0x800a6.dev
Contact@email: mailto:lexi@example.com
Bio@multiline: """
Systems programmer.
Privacy advocate.
Inspired by Serial Experiments Lain.
"""
Begin Profile
Skills: Assembly, Rust, C, TypeScript
Motto: "Building the future, one line at a time"
End Profile
Include: https://0x800a6.dev/more-links.txt
{
"Author": "Lexi",
"Handle": "0x800a6",
"Alias": ["lexi", "author", "sysprog"],
"Website": { "type": "url", "value": "https://0x800a6.dev" },
"Bio": "Systems programmer.\nPrivacy advocate.\nInspired by Serial Experiments Lain.",
"Profile": [
{ "Skills": ["Assembly", "Rust", "C", "TypeScript"], "Motto": "Building the future, one line at a time" }
]
}
npm install @0x800a6/author-txt
or clone directly:
git clone https://github.com/0x800a6/author.txt.git
cd author.txt
import { readFileSync } from "fs";
import {
parseAuthorDSL,
formatParsedData,
validateParsedData,
} from "@0x800a6/author-txt";
function main(): void {
const inputPath = "author.txt";
let input: string;
try {
input = readFileSync(inputPath, "utf-8");
} catch (err) {
console.error(`Failed to read file: ${inputPath}`);
if (err instanceof Error) {
console.error(err.message);
}
process.exit(1);
return;
}
try {
const data = parseAuthorDSL(input);
console.log("Parsed JSON:", JSON.stringify(data, null, 2));
console.log("Formatted:\n", formatParsedData(data));
const warnings: string[] = validateParsedData(data);
if (warnings.length > 0) {
console.warn("Validation warnings:");
for (const warning of warnings) {
console.warn(`- ${warning}`);
}
}
} catch (err) {
console.error("Parsing failed.");
if (err instanceof Error) {
console.error(err.message);
} else {
console.error("Unknown error:", err);
}
process.exit(1);
}
}
main();
import {
parseAuthorDSLWithPlugins,
validateParsedDataWithPlugins,
PluginManager,
JsonFormatterPlugin,
YamlFormatterPlugin
} from "@0x800a6/author-txt";
// Use with default plugins
const data = parseAuthorDSLWithPlugins(input);
const warnings = validateParsedDataWithPlugins(data);
// Or create custom plugin manager
const pluginManager = new PluginManager();
pluginManager.register(new JsonFormatterPlugin());
pluginManager.register(new YamlFormatterPlugin());
// Get available output formats
const formats = pluginManager.getAvailableFormats();
console.log('Available formats:', formats); // ['json', 'yaml', 'yml']
// Format data
const jsonOutput = pluginManager.formatData(data, 'json', { indent: 2 });
const yamlOutput = pluginManager.formatData(data, 'yaml');
The parser reports descriptive errors with line numbers. It will throw when:
The Author DSL Parser includes a comprehensive plugin system for extensibility:
@phone, @github, @color)@url, @email, @date, @phone, @githubimport { TypePlugin, PluginContext, PluginMetadata } from '@0x800a6/author-txt';
class CustomTypePlugin implements TypePlugin {
metadata: PluginMetadata = {
name: 'custom-type',
version: '1.0.0',
description: 'Custom type plugin'
};
supportedTypes = ['custom'];
processValue(value: string, type: string, context: PluginContext): any {
return { type, value: value.toUpperCase() };
}
}
// Register and use
const pluginManager = new PluginManager();
pluginManager.register(new CustomTypePlugin());
const data = parseAuthorDSL(input, pluginManager);
See Plugin System Documentation for complete details.
The DSL can grow without breaking existing files. You can:
@phone, @github, @color)Social::Handle{preferred=main})Parsers should ignore unknown keys to stay forward-compatible.
MIT License. See LICENSE.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0Registry latest | 26 Sept 2025 | 6 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b06c8799657563db1068b8c671e2e20481444cb6c73eee3935bf874ab07634d6