-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreference.html
More file actions
189 lines (181 loc) · 9.19 KB
/
Copy pathreference.html
File metadata and controls
189 lines (181 loc) · 9.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>NovaDev Reference</title>
<meta name="description" content="NovaDev reference for CLI commands, shell commands, compiler pipeline, file structure, project structure, and generated output." />
<link rel="icon" href="assets/icons/novadev.ico" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.15.1/cdn/themes/light.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/github-dark.min.css" />
<link rel="stylesheet" href="assets/css/styles.css" />
</head>
<body>
<header class="site-header">
<a class="brand" href="index.html"><span class="brand-mark"><img src="assets/icons/novadev-logo.svg" alt="" /></span><span>NovaDev</span></a>
<nav class="nav-links" aria-label="Main navigation">
<a href="index.html">Home</a>
<a href="learn.html">Learn</a>
<a href="projects.html">Projects</a>
<a href="packages.html">Packages</a>
<a href="examples.html">Examples</a>
<a href="reference.html">Reference</a>
<a href="https://novadev-ide.vercel.app/" target="_blank" rel="noopener noreferrer">Novadev Ide⌨️</a>
</nav>
<a class="nav-cta" href="packages.html#install">Install</a>
</header>
<main>
<section class="page-hero">
<p class="eyebrow">Reference</p>
<h1>Commands, structure, and compiler details.</h1>
<p>
Use this page when you need a quick map of NovaDev commands, shell commands, file layout, compiler pipeline,
project architecture, and generated output.
</p>
</section>
<section class="section" id="cli">
<div class="section-heading">
<p class="eyebrow">CLI</p>
<h2>NovaDev command-line tools.</h2>
</div>
<div class="grid two">
<div class="code-block">
<div class="code-title">nova.py commands</div>
<pre><code class="language-bash">python nova.py new my_app --frontend Vue --backend Flask --database SQLite
python nova.py run examples/scripts/math_tool.nova
python nova.py shell
python nova.py ir examples/apps/ecommerce_1_1
python nova.py explain examples/apps/ecommerce_1_1
python nova.py validate examples/apps/ecommerce_1_1
python nova.py tokens examples/apps/webshield
python nova.py ast examples/apps/webshield --json
python nova.py lint examples/apps/webshield
python nova.py format examples/apps/webshield --check
python nova.py docs examples/apps/webshield
python nova.py build-ui examples/apps/webshield
python nova.py build-backend examples/apps/webshield
python nova.py build-fullstack examples/apps/webshield
python nova.py dev examples/apps/webshield
python nova.py clean generated/web-shield</code></pre>
</div>
<div class="code-block">
<div class="code-title">novapm.py commands</div>
<pre><code class="language-bash">python novapm.py doctor
python novapm.py install-language --source .
python novapm.py init-registry
python novapm.py configure-registry https://example.com/nova-packages.json
python novapm.py search ui
python novapm.py install packages/hello-ui
python novapm.py list
python novapm.py info hello-ui
python novapm.py remove hello-ui
python novapm.py pack packages/hello-ui</code></pre>
</div>
</div>
</section>
<section class="section alt" id="shell">
<div class="section-heading">
<p class="eyebrow">Shell</p>
<h2>Interactive commands inside <code>python shell.py</code>.</h2>
</div>
<div class="grid three">
<article class="feature-card"><strong>.load</strong><p>Load and run a NovaDev file inside the shell session.</p></article>
<article class="feature-card"><strong>.tokens</strong><p>Show lexer tokens for a file or project.</p></article>
<article class="feature-card"><strong>.ast</strong><p>Inspect parsed AST output, including JSON mode when supported.</p></article>
<article class="feature-card"><strong>.lint</strong><p>Find common project or syntax issues before generation.</p></article>
<article class="feature-card"><strong>.docs</strong><p>Generate documentation from Nova project declarations.</p></article>
<article class="feature-card"><strong>.build-fullstack</strong><p>Generate frontend and backend project files from a NovaDev app.</p></article>
</div>
</section>
<section class="section" id="pipeline">
<div class="section-heading">
<p class="eyebrow">Compiler Pipeline</p>
<h2>How NovaDev thinks about source code.</h2>
</div>
<div class="timeline">
<article><span>1</span><div><h3>Lexer</h3><p>Reads source text and emits tokens for identifiers, keywords, strings, numbers, booleans, nil, operators, punctuation, and comments.</p></div></article>
<article><span>2</span><div><h3>Parser</h3><p>Converts tokens into AST nodes for programs, expressions, statements, app declarations, pages, tables, routes, workflows, and modules.</p></div></article>
<article><span>3</span><div><h3>Interpreter</h3><p>Walks the AST, evaluates expressions, stores variables in environments, runs functions, loops, conditions, classes, and print calls.</p></div></article>
<article><span>4</span><div><h3>ProjectIR</h3><p>Collects app-level declarations into a structured intermediate representation used by project-specific generators.</p></div></article>
<article><span>5</span><div><h3>Generators</h3><p>Write Vue, Tailwind, Flask, models, routes, workflow hooks, custom files, and docs from the declared project structure.</p></div></article>
</div>
</section>
<section class="section tint" id="file-structure">
<div class="section-heading">
<p class="eyebrow">File Structure</p>
<h2>Recommended folders for NovaDev and generated projects.</h2>
</div>
<div class="grid two">
<div class="file-tree">
<div class="code-title">NovaDev source tree</div>
<pre><code>novadev/
lexer.py
parser.py
ast_nodes.py
interpreter.py
runtime.py
project_ir.py
package_manager.py
nova.py
shell.py
novapm.py
examples/
packages/
docs/
nova website/</code></pre>
</div>
<div class="file-tree">
<div class="code-title">Generated full-stack project</div>
<pre><code>generated/my-app/
frontend/
src/
pages/
services/
style.css
package.json
backend/
app.py
models.py
routes.py
workflows.py
modules/
requirements.txt
docs/
project.md</code></pre>
</div>
</div>
</section>
<section class="section">
<div class="section-heading">
<p class="eyebrow">FAQ</p>
<h2>Developer questions.</h2>
</div>
<div class="grid two">
<sl-details summary="Is NovaDev only a template generator?">
No. NovaDev has a lexer, parser, AST, interpreter, shell, runtime, module system, package manager, and a ProjectIR compiler layer. The generator should use declarations and custom code, not blindly copy the same files into every project.
</sl-details>
<sl-details summary="When should I use mode custom?">
Use <code>mode custom</code> when the app does not fit a common category. NovaDev should generate only from the tables, pages, workflows, routes, modules, architecture, and custom code you declare.
</sl-details>
<sl-details summary="Why Tailwind?">
Tailwind makes project-driven styling easier because the generator can compose utility classes from mode, theme, page type, and component role without sharing one global CSS look across every project.
</sl-details>
<sl-details summary="How do Python modules work?">
Nova-wrapped Python modules let developers add project-specific backend logic. Workflows and generated routes can call those helpers when the app declares them.
</sl-details>
</div>
</section>
</main>
<footer class="site-footer">
<div><h4>NovaDev</h4><p>Reference material for using the language and compiler in real projects.</p></div>
<div class="footer-links"><h4>Learn</h4><a href="learn.html">Language</a><a href="projects.html">Projects</a><a href="examples.html">Examples</a></div>
<div class="footer-links"><h4>Tools</h4><a href="packages.html">Package Manager</a><a href="#cli">CLI</a><a href="#shell">Shell</a></div>
<div class="footer-links"><h4>Build</h4><a href="packages.html#install">Install</a><a href="#file-structure">File Structure</a><a href="projects.html#modes">Modes</a></div>
<div>Reserved by NovaDev 2026 </div>
</footer>
<script type="module" async src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.15.1/cdn/shoelace-autoloader.js"></script>
<script src="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/lib/common.min.js"></script>
<script src="assets/js/site.js"></script>
<script type="module" async src="assets/js/novadev-scene.js"></script>
</body>
</html>