@strike48/picjs
v0.1.6
Published
Native TypeScript implementation of PIC-like diagram language to SVG
Maintainers
Readme
picjs
pic Draw diagrams using plain-text descriptions. Embed drawing in (for example) Markdown.
A bit like Mermaid, but:
- no specific drawing types
- dependable, consistent layout controls based on constraints
- variables, loops, and color support
Extras
- Syntax highlighting support (currently vim and VSC) under
editor-support/ SKILL.mdlets agents create diagrams- CLI for local processing
- GitHub action for formatting README.md on push
Examples
(click to open in playground)
CLI
Give it a
picjsfile on stdin, or pass it the name of a file ending.picjsand it writes the generated SVG to stdout.Pass it a Markdown file and it will process ```` picjs blocks. An SVG will be generated in a subdirectory (
_diagramsby default) and the Markdown will embed that image. The originalpicjsmarkup is left in the file, but placed into an HTML comment. The CLI tool will also process pictures in these comments, so you can edit your diagram, rerunpicjsand it will update the SVG.
For The Impatient
- Load the library
<script src="https://cdn.jsdelivr.net/npm/@strike48/picjs@latest/dist/picjs.umd.js"></script>- Format
picjscode blocks in the page.
<script>
picjs.processCodeBlocks();
</</script>- Make pretty pictures.
<pre><code class="language-picjs">
box "Hello"
arrow
box "World"
</code></pre>With Thanks
To Brian Kernighan and the folks at Bell Labs who wrote the amazing Designers Work Bench over fifty years ago. They changed the way we write documents profoundly.
And to D. Richard Hipp, who created both SQLite and pikchr, the pic clone on which this was based.
Copyright and License
Copyright 2026 Devo, Inc
Licensed under the Mozilla Public License






