@appweaver/cli 1.0.2 → 1.0.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.
- package/LICENSE +21 -1
- package/README.md +26 -2
- package/package.json +3 -3
- package/skill/GUIDELINES.md +2 -2
- package/skill/SKILL.md +2 -2
- package/skill/references/resources.md +9 -9
package/LICENSE
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Luka Matosevic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
# Appweaver - CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
> The backend framework for AI-assisted development. Scaffold, extend, and ship APIs with any agent.
|
|
9
|
+
|
|
10
|
+
Appweaver is a batteries-included framework built on top of **Fastify** and **Prisma**, designed from the ground up to
|
|
11
|
+
be developed with AI agents. Instead of writing backend boilerplate from scratch, you describe resources using concise
|
|
12
|
+
factory functions and let the framework handle routing, validation, database, auth, migrations, so you can focus
|
|
13
|
+
on business logic instead of boilerplate.
|
|
14
|
+
|
|
15
|
+
### Why Appweaver for agentic development?
|
|
16
|
+
|
|
17
|
+
- **80% fewer tokens** → Appweaver's conventions and factory API eliminate the boilerplate that dominates most backend
|
|
18
|
+
codebases. Your agent reads and writes only the code that matters, not hundreds of lines of scaffolding.
|
|
19
|
+
- **Zero-code configuration** → every framework behavior like server, database, auth, queues, mailer, storage is
|
|
20
|
+
controlled through `appweaver.json` config files or environment variables. No code changes are needed to reconfigure
|
|
21
|
+
the app for a different environment.
|
|
22
|
+
- **Agent-first conventions** → a consistent, predictable project structure means agents always know where to find and
|
|
23
|
+
place code: models, services, routes, and policies each live in their own file under `src/resources/<name>/`.
|
|
24
|
+
- **Built-in skill files** → every scaffolded project ships with agent-readable skill files that give your agent harness
|
|
25
|
+
a complete map of the framework's API, conventions, and CLI, which means no hallucination, and no trial-and-error.
|
|
26
|
+
- **Works with any agent harness** → Claude Code, Cursor, Codex, Copilot Workspace, or any coding assistant that can
|
|
27
|
+
read project files. Point your agent at the skill files, and it has everything it needs.
|
|
4
28
|
|
|
5
29
|
## License
|
|
6
30
|
|
|
7
|
-
|
|
31
|
+
Appweaver is [MIT licensed](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appweaver/cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Appweaver -
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Appweaver - the backend framework for AI-assisted development (@cli)",
|
|
5
5
|
"author": "Luka Matosevic",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"main": "./weaver.js",
|
|
8
8
|
"types": "./weaver.d.ts",
|
|
9
9
|
"bin": {
|
package/skill/GUIDELINES.md
CHANGED
|
@@ -124,8 +124,8 @@ import { createPolicy } from '@appweaver/core';
|
|
|
124
124
|
|
|
125
125
|
export default createPolicy({
|
|
126
126
|
modelName: 'Product',
|
|
127
|
-
checkAccess: (
|
|
128
|
-
readRestrictions: (
|
|
127
|
+
checkAccess: (user, resource, action) => resource.status === 'Draft',
|
|
128
|
+
readRestrictions: (user, resource, action) => {
|
|
129
129
|
enabled: true;
|
|
130
130
|
},
|
|
131
131
|
files: {
|
package/skill/SKILL.md
CHANGED
|
@@ -294,8 +294,8 @@ import { createPolicy } from '@appweaver/core';
|
|
|
294
294
|
|
|
295
295
|
export default createPolicy({
|
|
296
296
|
modelName: 'Product',
|
|
297
|
-
checkAccess: (
|
|
298
|
-
readRestrictions: (
|
|
297
|
+
checkAccess: (user, resource, action) => resource.status === 'Draft',
|
|
298
|
+
readRestrictions: (user, resource, action) => {
|
|
299
299
|
enabled: true;
|
|
300
300
|
},
|
|
301
301
|
files: {
|
|
@@ -820,8 +820,8 @@ import { createPolicy } from '@appweaver/core';
|
|
|
820
820
|
|
|
821
821
|
export default createPolicy({
|
|
822
822
|
modelName: 'Product',
|
|
823
|
-
checkAccess: (
|
|
824
|
-
readRestrictions: (
|
|
823
|
+
checkAccess: (user, resource, action) => resource.status === 'Draft',
|
|
824
|
+
readRestrictions: (user, resource, action) => ({
|
|
825
825
|
enabled: true
|
|
826
826
|
}),
|
|
827
827
|
files: {
|
|
@@ -837,13 +837,13 @@ function createPolicy(config: ResourcePolicyConfig, override ?: Partial<Resource
|
|
|
837
837
|
}
|
|
838
838
|
```
|
|
839
839
|
|
|
840
|
-
| Property | Type
|
|
841
|
-
|
|
842
|
-
| `modelName` | string
|
|
843
|
-
| `checkAccess` | `(
|
|
844
|
-
| `readRestrictions` | `(
|
|
845
|
-
| `writeRestrictions` | `(
|
|
846
|
-
| `files` | Record\<string, FilePolicy>
|
|
840
|
+
| Property | Type | Description |
|
|
841
|
+
|---------------------|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
|
842
|
+
| `modelName` | string | Model name to bind this policy to (required). |
|
|
843
|
+
| `checkAccess` | `(user, resource, action) => boolean` | Dynamic access check against a resource instance. Return `true` to allow, `false` to deny. |
|
|
844
|
+
| `readRestrictions` | `(user, resource, action) => filter` | Returns a Prisma filter object applied to all read queries (find, query, aggregate). Restricts which records are visible. |
|
|
845
|
+
| `writeRestrictions` | `(user, resource, action) => data` | Returns data to merge or validate on create/update operations. |
|
|
846
|
+
| `files` | Record\<string, FilePolicy> | Per-file field access policy. |
|
|
847
847
|
|
|
848
848
|
**Action types**: `'find'`, `'query'`, `'aggregate'`, `'create'`, `'update'`, `'delete'`
|
|
849
849
|
|