quillshield 1.0.0 → 1.0.1

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 +65 -254
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,21 +1,20 @@
1
- # QuillShield
1
+ # QuillShield CLI
2
2
 
3
- > Smart Contract Security Auditing from the Command Line
3
+ > Smart contract security auditing from the command line.
4
4
 
5
- A powerful CLI tool that automatically detects your project type (Foundry/Hardhat/Truffle), collects all Solidity files, and sends them to QuillShield for comprehensive security auditing.
5
+ The QuillShield CLI detects your project type (Foundry, Hardhat, or Truffle), collects Solidity sources and dependencies, and submits them for security analysis.
6
6
 
7
7
  ---
8
8
 
9
9
  ## Quick Start
10
10
 
11
11
  ```bash
12
- # Install globally
13
12
  npm install -g quillshield
14
13
 
15
- # Audit a single Solidity file
14
+ # Audit a single file
16
15
  quillshield audit ./contracts/MyToken.sol
17
16
 
18
- # Audit an entire project folder
17
+ # Audit a project
19
18
  quillshield audit ./my-foundry-project
20
19
  ```
21
20
 
@@ -23,198 +22,108 @@ quillshield audit ./my-foundry-project
23
22
 
24
23
  ## Features
25
24
 
26
- - **Audit files or folders** - Pass a single `.sol` file or an entire project directory
27
- - **Auto-detect project type** - Foundry, Hardhat, Truffle, or raw Solidity
28
- - **Smart file collection** - Only collects `.sol` files needed for analysis
29
- - **Remapping support** - Automatically extracts and applies remappings
30
- - **Dependency resolution** - Includes all imported libraries
31
- - **Real-time progress** - Beautiful terminal UI with spinners and colors
32
- - **Wait for results** - Optionally wait for audit completion
33
- - **Multiple output formats** - Table or JSON format
34
- - **Save reports** - Export reports to files
25
+ | Feature | Description |
26
+ |--------|-------------|
27
+ | **Files or folders** | Pass a single `.sol` file or a project directory |
28
+ | **Auto-detect** | Recognizes Foundry, Hardhat, Truffle, or raw Solidity |
29
+ | **Smart collection** | Collects only `.sol` files needed for analysis |
30
+ | **Remappings** | Reads and applies remappings from project config |
31
+ | **Dependencies** | Includes imported libraries (e.g. OpenZeppelin) |
32
+ | **Progress UI** | Terminal spinners and status output |
33
+ | **Wait or async** | Optionally wait for completion or run with `--no-wait` |
34
+ | **Reports** | Table or JSON output; save to file with `--output` |
35
35
 
36
36
  ---
37
37
 
38
38
  ## Installation
39
39
 
40
- ### From npm (recommended)
40
+ Install globally from npm:
41
41
 
42
42
  ```bash
43
43
  npm install -g quillshield
44
44
  ```
45
45
 
46
- After installation, the `quillshield` command is available globally.
47
-
48
- ### From source
49
-
50
- ```bash
51
- git clone https://github.com/quillshield/quillshield-cli.git
52
- cd quillshield-cli
53
- npm install
54
- npm run build
55
- npm link
56
- ```
46
+ The `quillshield` command is then available in your PATH.
57
47
 
58
48
  ---
59
49
 
60
50
  ## Usage
61
51
 
62
- ### Audit a Single File
52
+ ### Audit
53
+
54
+ **Single file:**
63
55
 
64
56
  ```bash
65
- # Audit a single Solidity file
66
57
  quillshield audit ./MyToken.sol
67
-
68
- # With a custom project name
69
58
  quillshield audit ./MyToken.sol --name "My Token Audit"
70
59
  ```
71
60
 
72
- ### Audit a Project Folder
61
+ **Project folder:**
73
62
 
74
63
  ```bash
75
- # Basic audit (auto-detects project type)
76
64
  quillshield audit ./my-foundry-project
77
-
78
- # Specify analysis type
79
65
  quillshield audit ./my-project --type full
80
-
81
- # Custom project name
82
66
  quillshield audit ./my-project --name "My DeFi Protocol"
83
-
84
- # Don't wait for completion
85
67
  quillshield audit ./my-project --no-wait
86
68
  ```
87
69
 
88
- **Analysis Types:**
89
- - `full` - Complete AI-enhanced audit (default)
90
- - `raw` - Raw Slither analysis only
91
- - `semantic` - Multi-agent semantic analysis
70
+ **Analysis types:** `full` (default), `raw`, `semantic`.
92
71
 
93
- ### Check Status
72
+ ### Status & report
94
73
 
95
74
  ```bash
96
75
  quillshield status <project-id>
97
- ```
98
-
99
- ### Get Report
100
-
101
- ```bash
102
- # Display report in terminal (table format)
103
76
  quillshield report <project-id>
104
-
105
- # Get report as JSON
106
77
  quillshield report <project-id> --format json
107
-
108
- # Save report to file
109
78
  quillshield report <project-id> --output report.json
110
79
  ```
111
80
 
112
- ### Configuration
81
+ ### Config
113
82
 
114
83
  ```bash
115
- # Show current configuration
116
84
  quillshield config --show
117
-
118
- # Set API URL (for self-hosted backend)
119
85
  quillshield config --url https://your-backend.com
120
-
121
- # Interactive configuration
122
- quillshield config
86
+ quillshield config # interactive
123
87
  ```
124
88
 
125
89
  ---
126
90
 
127
- ## Supported Project Types
128
-
129
- ### Foundry Projects
130
-
131
- ```
132
- my-foundry-project/
133
- ├── foundry.toml ← Detected automatically
134
- ├── src/
135
- │ ├── Token.sol
136
- │ └── Vault.sol
137
- └── lib/
138
- └── openzeppelin-contracts/
139
- ```
140
-
141
- **What gets collected:**
142
- - All `.sol` files in `src/`
143
- - All `.sol` files in `lib/` (marked as dependencies)
144
- - Remappings from `foundry.toml`
145
- - Compiler version from `foundry.toml`
146
-
147
- ### Hardhat Projects
148
-
149
- ```
150
- my-hardhat-project/
151
- ├── hardhat.config.js ← Detected automatically
152
- ├── contracts/
153
- │ ├── Token.sol
154
- │ └── NFT.sol
155
- └── node_modules/
156
- └── @openzeppelin/
157
- ```
91
+ ## Project types
158
92
 
159
- **What gets collected:**
160
- - All `.sol` files in `contracts/`
161
- - Common libraries from `node_modules/` (@openzeppelin, @chainlink, @uniswap)
162
- - Standard Hardhat remappings
163
- - Compiler version from `hardhat.config.js`
93
+ ### Foundry
164
94
 
165
- ### Truffle Projects
95
+ - **Detected by:** `foundry.toml`
96
+ - **Collected:** `.sol` in `src/` and `lib/`, remappings and compiler version from `foundry.toml`
166
97
 
167
- ```
168
- my-truffle-project/
169
- ├── truffle-config.js ← Detected automatically
170
- └── contracts/
171
- ├── Token.sol
172
- └── Migrations.sol
173
- ```
98
+ ### Hardhat
174
99
 
175
- ### Single Solidity File
100
+ - **Detected by:** `hardhat.config.js`
101
+ - **Collected:** `.sol` in `contracts/`, common libs from `node_modules` (@openzeppelin, @chainlink, @uniswap), compiler from config
176
102
 
177
- ```bash
178
- quillshield audit ./MyContract.sol
179
- ```
103
+ ### Truffle
180
104
 
181
- The compiler version is automatically extracted from the `pragma solidity` directive.
105
+ - **Detected by:** `truffle-config.js`
106
+ - **Collected:** `.sol` in `contracts/`
182
107
 
183
- ### Raw Solidity (folder with .sol files)
108
+ ### Single file / raw folder
184
109
 
185
- ```
186
- my-project/
187
- ├── Token.sol
188
- ├── Vault.sol
189
- └── lib/
190
- └── SafeMath.sol
191
- ```
110
+ - Single `.sol`: compiler from `pragma solidity`
111
+ - Folder of `.sol` files: all `.sol` in the tree (e.g. including `lib/`)
192
112
 
193
113
  ---
194
114
 
195
115
  ## Configuration
196
116
 
197
- ### Environment Variables
198
-
199
- Create a `.env` file in the directory you run the command from:
117
+ ### Environment (`.env` in cwd)
200
118
 
201
119
  ```env
202
- # Backend API URL (defaults to production)
203
120
  QUILLSHIELD_API_URL=https://quillshieldtest-production.up.railway.app
204
-
205
- # Default analysis type
206
121
  QUILLSHIELD_ANALYSIS_TYPE=full
207
-
208
- # Polling interval (seconds)
209
122
  QUILLSHIELD_POLL_INTERVAL=5
210
-
211
- # Max wait time (seconds)
212
123
  QUILLSHIELD_MAX_WAIT_TIME=600
213
124
  ```
214
125
 
215
- ### Config File
216
-
217
- Configuration is stored in `~/.quillshield/config.json`:
126
+ ### Config file (`~/.quillshield/config.json`)
218
127
 
219
128
  ```json
220
129
  {
@@ -227,11 +136,24 @@ Configuration is stored in `~/.quillshield/config.json`:
227
136
 
228
137
  ---
229
138
 
230
- ## Example Output
139
+ ## Commands reference
231
140
 
232
- ```bash
233
- $ quillshield audit ./my-foundry-project
141
+ | Command | Description |
142
+ |--------|-------------|
143
+ | `quillshield audit <path>` | Run audit on file or directory |
144
+ | `quillshield status <project-id>` | Check audit status |
145
+ | `quillshield report <project-id>` | Show or save report |
146
+ | `quillshield config` | View or set config |
147
+
148
+ **Audit options:** `-t, --type` (full \| raw \| semantic), `-n, --name`, `-w, --wait`, `--no-wait`
149
+ **Report options:** `-o, --output <file>`, `-f, --format` (json \| table)
150
+ **Config options:** `-s, --show`, `-u, --url <url>`
234
151
 
152
+ ---
153
+
154
+ ## Example output
155
+
156
+ ```
235
157
  ___ _ _ _ ____ _ _ _ _
236
158
  / _ \ _ _ (_) | || | / ___| | |__ (_) ___ | | __| |
237
159
  | | | || | | || | | || | \___ \ | '_ \ | | / _ \| | / _` |
@@ -247,152 +169,41 @@ Smart Contract Security Auditing CLI
247
169
  Found 4 remapping(s)
248
170
  ✓ Collected 25 files (8 source, 17 dependencies)
249
171
  Total lines: 3,450
250
- ✓ Project data prepared
251
172
  ✓ Project created: 65abc123def456...
252
173
  ✓ Audit started
253
174
 
254
175
  ⏳ Waiting for audit to complete...
255
-
256
176
  .....✓ Audit completed!
257
177
 
258
178
  ═══════════════════════════════════════════════════════════════════
259
-
260
179
  Security Score: 82/100
261
180
  Audited Files: 8 | Total Lines: 3,450
262
-
263
181
  ───────────────────────────────────────────────────────────────────
264
-
265
182
  Vulnerability Summary:
266
-
267
183
  ┌──────────────────┬────────┐
268
184
  │ Severity │ Count │
269
185
  ├──────────────────┼────────┤
270
186
  │ High │ 2 │
271
187
  │ Medium │ 3 │
272
- │ Low │ 1 │
273
- │ Informational │ 5 │
274
- │ Optimization │ 2 │
275
- └──────────────────┴────────┘
276
-
188
+ ...
277
189
  📊 View full report: https://frontend-production-2f25.up.railway.app/project/65abc123def456...
278
190
  ```
279
191
 
280
192
  ---
281
193
 
282
- ## Commands Reference
283
-
284
- ### `quillshield audit <path>`
285
-
286
- Audit a smart contract file or project folder.
287
-
288
- **Arguments:**
289
- - `<path>` - Path to a `.sol` file or project directory
290
-
291
- **Options:**
292
- - `-t, --type <type>` - Analysis type: `full`, `raw`, `semantic` (default: `full`)
293
- - `-n, --name <name>` - Custom project name
294
- - `-w, --wait` - Wait for audit completion (default: `true`)
295
- - `--no-wait` - Don't wait for completion
296
-
297
- **Examples:**
298
- ```bash
299
- quillshield audit ./MyToken.sol
300
- quillshield audit ./my-project
301
- quillshield audit ./my-project --type semantic
302
- quillshield audit ./my-project --name "My Token" --no-wait
303
- ```
304
-
305
- ### `quillshield status <project-id>`
306
-
307
- Check audit status for a project.
308
-
309
- **Examples:**
310
- ```bash
311
- quillshield status 65abc123def456...
312
- ```
313
-
314
- ### `quillshield report <project-id>`
315
-
316
- Get audit report for a project.
317
-
318
- **Options:**
319
- - `-o, --output <file>` - Save report to file
320
- - `-f, --format <format>` - Output format: `json`, `table` (default: `table`)
321
-
322
- **Examples:**
323
- ```bash
324
- quillshield report 65abc123def456...
325
- quillshield report 65abc123def456... --format json
326
- quillshield report 65abc123def456... --output report.json
327
- ```
328
-
329
- ### `quillshield config`
330
-
331
- Configure QuillShield CLI.
332
-
333
- **Options:**
334
- - `-s, --show` - Show current configuration
335
- - `-u, --url <url>` - Set API URL
336
-
337
- **Examples:**
338
- ```bash
339
- quillshield config --show
340
- quillshield config --url https://your-backend.com
341
- quillshield config # Interactive mode
342
- ```
343
-
344
- ---
345
-
346
194
  ## Troubleshooting
347
195
 
348
- ### "Path not found"
349
-
350
- Make sure the file or directory path is correct:
351
- ```bash
352
- quillshield audit ./contracts/MyToken.sol
353
- ```
354
-
355
- ### "Only Solidity (.sol) files are supported"
356
-
357
- When auditing a single file, it must be a `.sol` file. For non-Solidity projects, point to the project folder instead.
358
-
359
- ### "No Solidity files found"
360
-
361
- Check that your project has `.sol` files in the expected locations:
362
- - Foundry: `src/`
363
- - Hardhat: `contracts/`
364
- - Truffle: `contracts/`
365
-
366
- ### "Failed to connect to backend"
367
-
368
- Check that the backend is reachable:
369
- ```bash
370
- curl https://quillshieldtest-production.up.railway.app/health
371
- ```
372
-
373
- Update API URL if using a self-hosted backend:
374
- ```bash
375
- quillshield config --url http://your-backend-url
376
- ```
377
-
378
- ### "Audit taking too long"
379
-
380
- Large projects may take several minutes. Use `--no-wait` and check status later:
381
- ```bash
382
- quillshield audit my-project --no-wait
383
- # Wait a few minutes
384
- quillshield status <project-id>
385
- ```
386
-
387
- ---
388
-
389
- ## License
390
-
391
- MIT License
196
+ | Issue | What to do |
197
+ |-------|------------|
198
+ | **Path not found** | Use a correct path: `quillshield audit ./contracts/MyToken.sol` |
199
+ | **Only Solidity (.sol) supported** | For a single file, use a `.sol` path; for a project, use the project directory |
200
+ | **No Solidity files found** | Ensure `.sol` files exist in `src/` (Foundry), `contracts/` (Hardhat/Truffle) |
201
+ | **Failed to connect to backend** | Check connectivity: `curl https://quillshieldtest-production.up.railway.app/health`. For self-hosted: `quillshield config --url http://your-backend-url` |
202
+ | **Audit taking too long** | Use `quillshield audit <path> --no-wait`, then `quillshield status <project-id>` later |
392
203
 
393
204
  ---
394
205
 
395
- **Start auditing with a single command!**
206
+ **Run an audit:**
396
207
 
397
208
  ```bash
398
209
  quillshield audit ./my-contract.sol
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quillshield",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "QuillShield - Smart contract security auditing tool. Audit Solidity files and projects from the command line.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {