@via-dev/via 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +167 -8
  2. package/package.json +24 -2
package/README.md CHANGED
@@ -1,14 +1,96 @@
1
1
  # Via
2
2
 
3
- **Via** is a pattern-aware developer toolkit that helps you capture and reuse code patterns in your project. It "learns" from your existing codebase and allows you to instantiate those patterns (modules) with intelligent, context-aware renaming.
3
+ Via helps you reuse real project patterns instead of rewriting boilerplate.
4
+
5
+ It learns from your existing codebase and lets you recreate modules
6
+ without repeated AI calls or fragile templates.
7
+
8
+ > Your code is the source of truth — not scaffolds, not prompts.
9
+
10
+ ## Quick start
11
+
12
+ ```bash
13
+ npm install -g @via-dev/via
14
+
15
+ cd existing-project
16
+ via learn
17
+ via list
18
+ via users create accounts
19
+ ```
20
+
21
+ ## Why Via exists
22
+
23
+ Via was created to solve a very specific problem:
24
+
25
+ > Reusing existing code patterns should **not** require repeated AI calls.
26
+
27
+ In many workflows today, AI is used every time you:
28
+ - generate a similar module
29
+ - rename an entity
30
+ - recreate CRUD logic
31
+ - scaffold the same structure with minor changes
32
+
33
+ This leads to:
34
+ - unnecessary token usage
35
+ - repeated costs for the same logic
36
+ - unpredictable output
37
+ - reliance on AI for problems that are already solved in your codebase
38
+
39
+ ### Via’s approach
40
+
41
+ Via uses AI **once**, only to *understand* your project structure.
42
+
43
+ After that:
44
+ - the learned patterns are stored locally
45
+ - generation is deterministic
46
+ - no AI calls are required
47
+ - no tokens are consumed
48
+
49
+ If a pattern already exists in your project, Via reuses it directly
50
+ instead of asking an AI model to regenerate it again.
51
+
52
+ ### What this means in practice
53
+
54
+ - AI helps with **discovery**, not repetition
55
+ - Your existing code becomes the source of truth
56
+ - You don’t pay tokens for minimal changes
57
+ - You get consistent output every time
58
+ - Via works offline once learning is complete
59
+
60
+ This gives you the benefits of AI **without turning it into a runtime dependency**.
61
+
62
+ ### AI is optional
63
+
64
+ If you already know the module boundaries:
65
+ - you can run `via learn <folder_path>`
66
+ - select the entry file manually
67
+ - and skip AI entirely
68
+
69
+ Via will trace dependencies and build the module deterministically.
70
+
71
+ AI is there when you need it - not when you don’t.
72
+
73
+
4
74
 
5
75
  ## Key Features
6
76
 
7
77
  - **Pattern Learning**: Extract specific folders or components from your project and save them as reusable modules.
8
78
  - **Smart Renaming**: When creating a new instance of a module, Via automatically renames files, classes, variables, and imports while preserving the original casing (PascalCase, camelCase, kebab-case, etc.) and handling plurality.
9
- - **AI-Powered (Optional)**: Can lean on AI for complex pattern recognition and documentation.
79
+ - **AI-Assisted (Optional)**: Uses AI only for pattern discovery never for repeated generation.
10
80
  - **Web UI**: A built-in documentation server to browse and manage your saved modules.
11
81
 
82
+
83
+ ## Language support
84
+
85
+ Via currently supports **TypeScript-based projects and modules only**.
86
+
87
+ This allows Via to:
88
+ - understand imports and dependencies accurately
89
+ - perform safe, context-aware renaming
90
+ - validate generated code deterministically
91
+
92
+ Support for other languages or plain JavaScript may be explored in the future.
93
+
12
94
  ## Supported Technologies
13
95
 
14
96
  Currently, Via is optimized for backend patterns in the following ecosystems:
@@ -16,15 +98,74 @@ Currently, Via is optimized for backend patterns in the following ecosystems:
16
98
  - **Express.js**
17
99
  - **Hono.js**
18
100
  - **NestJS**
19
- - **Next.js** (API routes and backend logic)
101
+ - **Next.js** (Beta - API routes and backend logic)
20
102
 
21
- ## Installation
22
103
 
23
- To install Via globally:
104
+ ## AI support (optional, transparent, and secure)
24
105
 
25
- ```bash
26
- npm install -g @via-dev/via
27
- ```
106
+ Via can use AI to detect modules and patterns from large or complex codebases.
107
+ AI is **optional** and used only during the learning phase.
108
+
109
+ ### Supported AI providers
110
+
111
+ Via supports multiple providers out of the box:
112
+
113
+ - **OpenAI** (GPT models)
114
+ - **Anthropic** (Claude models)
115
+ - **Google** (Gemini)
116
+ - **Ollama** (locally running open-source models)
117
+
118
+ This can be selected or modified using `via config` command.
119
+
120
+ ### What data is sent to AI
121
+
122
+ When AI is enabled, **Via sends only project metadata**, never your source code.
123
+
124
+ This includes:
125
+ - folder paths
126
+ - file names
127
+ - file relationships and imports
128
+ - detected symbols and keywords
129
+ - structural summaries
130
+
131
+ ❌ **Your actual code is never sent to any AI provider.**
132
+
133
+ This design ensures:
134
+ - code privacy
135
+ - security for private repositories
136
+ - safe usage in enterprise environments
137
+
138
+ ### When AI is used
139
+
140
+ - AI is used **only during `via learn`** and only if a path is not provided
141
+ - AI helps detect:
142
+ - logical modules
143
+ - entry files
144
+ - structural boundaries
145
+ - AI is **not used** during:
146
+ - module generation
147
+ - listing modules
148
+ - removing modules
149
+
150
+ All generation after learning is **deterministic and offline-friendly**.
151
+
152
+ ### No lock-in, predictable costs
153
+
154
+ - You choose the AI provider and model
155
+ - No background AI calls
156
+ - No surprise token usage
157
+ - Once learning is complete, Via works without AI
158
+
159
+ This gives you the benefits of AI-assisted understanding
160
+ without runtime dependency or exposing your code.
161
+
162
+ ### Local models with Ollama
163
+
164
+ Via also supports locally running models via **Ollama**.
165
+ This is ideal for:
166
+ - offline environments
167
+ - highly sensitive codebases
168
+ - zero API cost workflows
28
169
 
29
170
  ## Usage
30
171
 
@@ -61,6 +202,24 @@ Explore your learned modules in a beautiful web interface.
61
202
  via ui
62
203
  ```
63
204
 
205
+ ### 5. Remove a Module
206
+ Delete a saved module
207
+
208
+ ```bash
209
+ # General syntax: via <module_name> create <new_name>
210
+ via remove <name>
211
+ ```
212
+
213
+ ### 5. Configure AI Provider
214
+
215
+ Configure the AI provider if in AI mode (`via learn` without path)
216
+
217
+ ```bash
218
+ # General syntax: via <module_name> create <new_name>
219
+ via config
220
+ ```
221
+
222
+
64
223
  ## Command Reference
65
224
 
66
225
  | Command | Description |
package/package.json CHANGED
@@ -1,10 +1,32 @@
1
1
  {
2
2
  "name": "@via-dev/via",
3
- "version": "0.1.2",
4
- "description": "Via is a CLI tool designed to 'learn' from common code patterns and 'use' them to generate new code efficiently.",
3
+ "version": "0.1.4",
4
+ "description": "Via is a CLI tool that learns real project patterns and lets you reuse them without boilerplate or templates.",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
+ "keywords": [
9
+ "via",
10
+ "cli",
11
+ "ai",
12
+ "productivity",
13
+ "code-generation",
14
+ "boilerplate",
15
+ "template",
16
+ "automation",
17
+ "pattern-learning",
18
+ "typescript",
19
+ "reusability",
20
+ "developer-tools"
21
+ ],
22
+ "homepage": "https://github.com/viping7/via",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/viping7/via"
26
+ },
27
+ "bugs": {
28
+ "url": "https://github.com/viping7/via/issues"
29
+ },
8
30
  "license": "MIT",
9
31
  "author": "viping7",
10
32
  "type": "commonjs",