@jotx-labs/cli
v2.4.253
Published
jotx command-line interface
Downloads
100
Readme
@jotx-labs/cli
Command-line interface for jotx - demonstrates platform independence.
Installation
npm install -g @jotx-labs/cliUsage
Parse a file
jotx parse notes.jotShows the AST (Abstract Syntax Tree) of the document.
Validate a file
jotx validate notes.jotChecks if the file is valid jotx syntax.
Convert to HTML
# Output to stdout
jotx convert notes.jot
# Output to file
jotx convert notes.jot -o notes.htmlConverts a .jot file to HTML.
Show info
jotx info notes.jotShows document metadata and statistics.
Examples
# Validate all .jot files in current directory
for file in *.jot; do jotx validate "$file"; done
# Convert all .jot files to HTML
for file in *.jot; do jotx convert "$file" -o "${file%.jot}.html"; done
# Parse and pretty-print
jotx parse notes.jot | jq .Architecture
The CLI demonstrates jotx's platform independence:
- Uses
@jotx-labs/corefor parsing/validation - Uses
NodePlatformfrom@jotx-labs/adaptersfor file I/O - Uses
HTMLRendererfrom@jotx-labs/adaptersfor output - Zero VS Code dependencies
- Zero browser dependencies
Same core logic, different platform!
Development
# Build
npm run build
# Test locally
node dist/cli.js parse test.jot