@anatolykoptev/krolik-cli 0.1.5 → 0.3.0

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.
package/LICENSE ADDED
@@ -0,0 +1,105 @@
1
+ Functional Source License, Version 1.1, Apache 2.0 Future License
2
+
3
+ Abbreviation: FSL-1.1-Apache-2.0
4
+
5
+ Notice
6
+
7
+ Copyright 2024-2025 Anatoly Koptev
8
+
9
+ Terms and Conditions
10
+
11
+ Licensor ("We")
12
+
13
+ The party offering the Software under these Terms and Conditions.
14
+
15
+ The Software
16
+
17
+ The "Software" is each version of the software that we make available under
18
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
19
+ Conditions with the Software.
20
+
21
+ License Grant
22
+
23
+ Subject to your compliance with this License Grant and the Patents,
24
+ Redistribution and Trademark clauses below, we hereby grant you the right to
25
+ use, copy, modify, create derivative works, publicly perform, publicly display
26
+ and redistribute the Software for any Permitted Purpose identified below.
27
+
28
+ Permitted Purpose
29
+
30
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
31
+ means making the Software available to others in a commercial product or
32
+ service that:
33
+
34
+ 1. substitutes for the Software;
35
+
36
+ 2. substitutes for any other product or service we offer using the Software
37
+ that exists as of the date we make the Software available; or
38
+
39
+ 3. offers the same or substantially similar functionality as the Software.
40
+
41
+ Permitted Purposes specifically include using the Software:
42
+
43
+ 1. for your internal use and access;
44
+
45
+ 2. for non-commercial education;
46
+
47
+ 3. for non-commercial research; and
48
+
49
+ 4. in connection with professional services that you provide to a licensee
50
+ using the Software in accordance with these Terms and Conditions.
51
+
52
+ Patents
53
+
54
+ To the extent your use for a Permitted Purpose would necessarily infringe our
55
+ patents, the license grant above includes a license under our patents. If you
56
+ make a claim against any party that the Software infringes or contributes to
57
+ the infringement of any patent, then your patent license to the Software ends
58
+ immediately.
59
+
60
+ Redistribution
61
+
62
+ The Terms and Conditions apply to all copies, modifications and derivatives of
63
+ the Software.
64
+
65
+ If you redistribute any copies, modifications or derivatives of the Software,
66
+ you must include a copy of or a link to these Terms and Conditions and not
67
+ remove any copyright notices provided in or with the Software.
68
+
69
+ Disclaimer
70
+
71
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
72
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
73
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
74
+
75
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
76
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
77
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
78
+
79
+ Trademarks
80
+
81
+ Except for displaying the License Details and identifying us as the origin of
82
+ the Software, you have no right under these Terms and Conditions to use our
83
+ trademarks, trade names, service marks or product names.
84
+
85
+ Change License
86
+
87
+ Change Date: 2027-12-26
88
+ Change License: Apache License, Version 2.0
89
+
90
+ License Details
91
+
92
+ License: Functional Source License, Version 1.1, Apache 2.0 Future License
93
+ Licensor: Anatoly Koptev
94
+ Licensed Work: krolik-cli (Copyright 2024-2025 Anatoly Koptev)
95
+
96
+ Additional Use Grant:
97
+
98
+ You may use the Licensed Work for any purpose except for providing a commercial
99
+ AI development toolkit, code analysis service, or MCP server that competes with
100
+ krolik-cli.
101
+
102
+ Change Date: Two years from the date the Licensed Work is published (2027-12-26)
103
+ Change License: Apache License, Version 2.0
104
+
105
+ For commercial licensing inquiries: https://github.com/anatolykoptev/krolik-cli/issues
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  [![CI](https://github.com/anatolykoptev/krolik-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/anatolykoptev/krolik-cli/actions/workflows/ci.yml)
12
12
  [![npm version](https://img.shields.io/npm/v/@anatolykoptev/krolik-cli.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/@anatolykoptev/krolik-cli)
13
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://opensource.org/licenses/MIT)
13
+ [![License: FSL-1.1-Apache-2.0](https://img.shields.io/badge/License-FSL--1.1-blue.svg?style=flat&colorA=18181B&colorB=28CF8D)](./LICENSE)
14
14
 
15
15
  [Get Started](#installation) · [Commands](#commands) · [MCP Server](#mcp-server)
16
16
 
@@ -39,7 +39,9 @@ One command replaces 10+ manual searches. AI gets complete project context insta
39
39
  ```bash
40
40
  krolik context --feature auth # Everything about auth feature
41
41
  krolik context --issue 42 # Context from GitHub issue
42
- krolik context --quick # Fast mode for simple tasks
42
+ krolik context --minimal # Ultra-compact (~1500 tokens)
43
+ krolik context --quick # Compact with repo-map (~3500 tokens)
44
+ krolik context --deep # Full analysis (~5s)
43
45
  ```
44
46
 
45
47
  **What it collects**: git state, database schema, API routes, project structure, types, past decisions, library docs.
@@ -88,16 +90,19 @@ krolik fix --all # Include risky fixes
88
90
 
89
91
  ---
90
92
 
91
- ### `krolik refactor` — Find Duplicates
93
+ ### `krolik refactor` — Find Duplicates & Improve Structure
92
94
 
93
- Finds duplicate functions and types across the codebase.
95
+ Analyzes module structure, finds duplicate functions/types, suggests migrations.
94
96
 
95
97
  ```bash
96
- krolik refactor # Find duplicates
97
- krolik refactor --apply # Apply suggested migrations
98
+ krolik refactor # Default: function duplicates + structure (~3s)
99
+ krolik refactor --quick # Fast: structure only (~1.5s)
100
+ krolik refactor --deep # Full: + type duplicates (~10s)
101
+ krolik refactor --apply # Apply migrations (with backup)
102
+ krolik refactor --fix-types # Auto-fix identical type duplicates
98
103
  ```
99
104
 
100
- **Output**: List of duplicates with locations, suggested consolidation points, migration plan.
105
+ **Output**: XML report with duplicates, structure score, domain analysis, migration plan. Saved to `.krolik/REFACTOR.xml`.
101
106
 
102
107
  ---
103
108
 
@@ -115,6 +120,19 @@ krolik agent --orchestrate --task "review" # Multi-agent mode
115
120
 
116
121
  ---
117
122
 
123
+ ### `krolik docs` — Library Documentation Cache
124
+
125
+ Search and cache library documentation from Context7.
126
+
127
+ ```bash
128
+ krolik docs search "app router" # Search cached docs
129
+ krolik docs fetch next.js # Fetch docs for a library
130
+ krolik docs detect # Auto-detect from package.json
131
+ krolik docs list # List cached libraries
132
+ ```
133
+
134
+ ---
135
+
118
136
  ### Other Commands
119
137
 
120
138
  | Command | What it does |
@@ -123,7 +141,12 @@ krolik agent --orchestrate --task "review" # Multi-agent mode
123
141
  | `krolik schema` | Database schema as structured docs |
124
142
  | `krolik routes` | API routes as structured docs |
125
143
  | `krolik review` | Code review for current changes |
126
- | `krolik docs` | Search library documentation |
144
+ | `krolik issue 42` | Parse GitHub issue for context |
145
+ | `krolik codegen` | Generate hooks, schemas, tests, barrels |
146
+ | `krolik sync` | Sync CLAUDE.md with project state |
147
+ | `krolik security` | Audit dependencies for vulnerabilities |
148
+ | `krolik init` | Initialize krolik config in project |
149
+ | `krolik setup` | Install Claude Code plugins (memory) |
127
150
 
128
151
  ---
129
152
 
@@ -163,6 +186,14 @@ export default defineConfig({
163
186
  - Node.js >= 20.0.0
164
187
  - TypeScript >= 5.0.0
165
188
 
189
+ ## Contributing
190
+
191
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and release process.
192
+
193
+ **Important**: Releases are published **only via GitHub Actions** using npm Trusted Publisher. Manual `npm publish` is not allowed.
194
+
166
195
  ## License
167
196
 
168
- [MIT](LICENSE) © Anatoly Koptev
197
+ [FSL-1.1-Apache-2.0](LICENSE) © Anatoly Koptev
198
+
199
+ Free for internal use, education, and research. Converts to Apache 2.0 on December 26, 2027.