zig langref cli
nate.tngl.io/zigman
1<!doctype html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<title>zigman - the Zig language reference in your terminal</title>
7<meta name="description" content="zigman reads the official Zig language reference in your terminal, caches it, and prints matching sections as clean markdown for humans and agents.">
8<link rel="stylesheet" href="site.css">
9<script defer src="nav.js"></script>
10</head>
11<body>
12<main>
13 <section class="window" aria-labelledby="title">
14 <nav class="bar" aria-label="Primary">
15 <a data-nav-item data-hotkey="p" href="prompt.md">setup</a>
16 <a data-nav-item data-hotkey="g" data-nav-target="guide" href="guide.html">guide</a>
17 <a data-nav-item data-hotkey="l" data-nav-target="llms" href="llms.txt">llms</a>
18 <a data-nav-item data-hotkey="s" href="https://tangled.org/zzstoatzz.io/zigman">source</a>
19 <a data-nav-item data-hotkey="r" href="https://ziglang.org/documentation/master/">langref</a>
20 </nav>
21
22 <div class="brand">
23 <div>
24 <h1 id="title">zigman</h1>
25 <p class="lede">The official Zig language reference, cached locally and rendered as clean markdown in your terminal.</p>
26 </div>
27 <div class="card" aria-label="Status">
28 <div class="frame-top"><div class="card-title">status</div></div>
29 <div class="card-body">
30 <p><span class="muted">surface</span> <span class="badge">static binary</span></p>
31 <p><span class="muted">scope</span> language reference, not stdlib</p>
32 <p><span class="muted">built for</span> humans, shell pipes, and coding agents</p>
33 </div>
34 </div>
35 </div>
36
37 <div class="section" id="install">
38 <h2>install</h2>
39 <pre class="terminal"><code>curl -fsSL https://nate.tngl.io/zigman/install.sh | sh</code></pre>
40 <p class="muted">macOS and Linux, aarch64 and x86_64. Installs to <code>$ZIGMAN_INSTALL</code> or <code>~/.local/bin</code>.</p>
41 </div>
42
43 <div class="section grid" aria-label="Offerings">
44 <div class="card">
45 <div class="frame-top"><div class="card-title">lookup</div></div>
46 <div class="card-body">
47 <p>Type any part of a section name. One match renders the section; many matches render a candidate list.</p>
48 </div>
49 </div>
50 <div class="card">
51 <div class="frame-top"><div class="card-title">cache</div></div>
52 <div class="card-body">
53 <p>Fetches the single-page Zig langref once, then reads from <code>$XDG_CACHE_HOME</code> or <code>~/.cache</code>.</p>
54 </div>
55 </div>
56 <div class="card">
57 <div class="frame-top"><div class="card-title">skill</div></div>
58 <div class="card-body">
59 <p>Ships a cross-client <code>SKILL.md</code> so agents know when to read Zig semantics instead of guessing.</p>
60 </div>
61 </div>
62 </div>
63
64 <div class="section grid two" id="use">
65 <div>
66 <h2>use</h2>
67 <pre class="terminal"><code>zigman comptime
68zigman error
69zigman -o comptime
70zigman -l
71zigman -V 0.15.1 comptime</code></pre>
72 </div>
73 <div>
74 <h2>contracts</h2>
75 <table class="spec">
76 <thead>
77 <tr><th>command</th><th>behavior</th></tr>
78 </thead>
79 <tbody>
80 <tr><td><code>zigman <query></code></td><td>render one matching section as markdown</td></tr>
81 <tr><td><code>zigman -l</code></td><td>list the whole table of contents</td></tr>
82 <tr><td><code>zigman -o</code></td><td>open the matching langref anchor in a browser</td></tr>
83 <tr><td><code>zigman --no-pager</code></td><td>raw deterministic output for tools</td></tr>
84 </tbody>
85 </table>
86 </div>
87 </div>
88
89 <div class="section grid two" id="agent-loop">
90 <div class="card">
91 <div class="frame-top"><div class="card-title">agent loop</div></div>
92 <div class="card-body">
93 <p>Give a weak local model a Zig task and the <code>zigman</code> tool. Score the final file with <code>zig test</code>. When the tool helps, keep the pattern. When it fails, improve the lookup surface.</p>
94 <ul>
95 <li>objective oracle: the compiler</li>
96 <li>quality signal: tool-call trace</li>
97 <li>goal: measurable lift over a bare model</li>
98 </ul>
99 </div>
100 </div>
101 <div class="actions" aria-label="Links">
102 <a data-nav-item data-hotkey="r" class="action" href="https://ziglang.org/documentation/master/"><b>></b><span>read the official Zig language reference</span><kbd>R</kbd></a>
103 <a data-nav-item data-hotkey="p" class="action" href="prompt.md"><b>></b><span>read the agent setup prompt</span><kbd>P</kbd></a>
104 <a data-nav-item data-hotkey="g" class="action" href="guide.html"><b>></b><span>read the practical zigman workflow guide</span><kbd>G</kbd></a>
105 <a data-nav-item data-hotkey="l" class="action" href="llms.txt"><b>></b><span>read the llms.txt index for agents</span><kbd>L</kbd></a>
106 <a data-nav-item class="action" href="skill.md"><b>></b><span>fetch the canonical zigman skill</span><kbd>SK</kbd></a>
107 <a data-nav-item data-hotkey="s" class="action" href="https://tangled.org/zzstoatzz.io/zigman"><b>></b><span>view the source on tangled</span><kbd>S</kbd></a>
108 <a data-nav-item data-hotkey="c" class="action" href="https://github.com/internet-development/www-sacred"><b>></b><span>aesthetic adapted from Sacred Computer / SRCL</span><kbd>C</kbd></a>
109 <a data-nav-item data-hotkey="i" class="action" href="install.sh"><b>></b><span>inspect the install script</span><kbd>I</kbd></a>
110 </div>
111 </div>
112
113 <div class="section">
114 <details>
115 <summary>build from source</summary>
116 <pre class="terminal"><code>git clone https://tangled.org/zzstoatzz.io/zigman
117cd zigman
118zig build -Doptimize=ReleaseSafe</code></pre>
119 </details>
120 <details>
121 <summary>shell completion</summary>
122 <pre class="terminal"><code>eval "$(zigman --completions zsh)"
123eval "$(zigman --completions bash)"
124zigman --completions fish | source</code></pre>
125 </details>
126 <details>
127 <summary>options and paging</summary>
128 <pre class="terminal"><code>-l, --list list section names instead of rendering
129-o, --open open the section in your browser
130-V, --version <ver> langref version to read
131-r, --refresh bypass the cache and refetch
132 --no-pager do not page terminal output
133-h, --help show help</code></pre>
134 </details>
135 </div>
136 </section>
137</main>
138</body>
139</html>