@syrin/cli 1.3.2 → 1.4.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.
- package/README.md +184 -152
- package/dist/cli/commands/config.d.ts +47 -0
- package/dist/cli/commands/config.js +360 -0
- package/dist/cli/commands/dev.d.ts +6 -0
- package/dist/cli/commands/dev.js +67 -15
- package/dist/cli/commands/doctor.js +49 -13
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +89 -18
- package/dist/cli/commands/status.d.ts +10 -0
- package/dist/cli/commands/status.js +162 -0
- package/dist/cli/index.js +211 -12
- package/dist/cli/prompts/init-prompt.d.ts +18 -0
- package/dist/cli/prompts/init-prompt.js +159 -99
- package/dist/cli/utils/command-error-handler.js +2 -5
- package/dist/config/env-checker.d.ts +12 -2
- package/dist/config/env-checker.js +88 -38
- package/dist/config/env-templates.d.ts +15 -0
- package/dist/config/env-templates.js +49 -0
- package/dist/config/generator.js +17 -0
- package/dist/config/global-loader.d.ts +50 -0
- package/dist/config/global-loader.js +244 -0
- package/dist/config/loader.d.ts +28 -0
- package/dist/config/loader.js +95 -9
- package/dist/config/merger.d.ts +37 -0
- package/dist/config/merger.js +68 -0
- package/dist/config/schema.d.ts +26 -1
- package/dist/config/schema.js +73 -8
- package/dist/config/types.d.ts +19 -0
- package/dist/config/types.js +26 -1
- package/dist/constants/messages.d.ts +7 -0
- package/dist/constants/messages.js +8 -0
- package/dist/constants/paths.d.ts +6 -0
- package/dist/constants/paths.js +10 -0
- package/dist/events/emitter.js +7 -7
- package/dist/index.js +0 -0
- package/dist/presentation/config-ui.d.ts +34 -0
- package/dist/presentation/config-ui.js +139 -0
- package/dist/presentation/doctor-ui.d.ts +11 -0
- package/dist/presentation/doctor-ui.js +52 -1
- package/dist/presentation/init-ui.d.ts +9 -0
- package/dist/presentation/init-ui.js +33 -0
- package/dist/runtime/analysis/analyser.js +2 -2
- package/dist/runtime/analysis/rules/warnings/w104-generic-description.d.ts +1 -1
- package/dist/runtime/analysis/rules/warnings/w104-generic-description.js +1 -1
- package/dist/runtime/dev/event-mapper.js +19 -3
- package/dist/runtime/dev/session.d.ts +4 -0
- package/dist/runtime/dev/session.js +52 -3
- package/dist/runtime/llm/ollama.js +4 -4
- package/dist/runtime/mcp/client/manager.js +3 -3
- package/dist/runtime/sandbox/executor.js +5 -5
- package/dist/runtime/test/orchestrator.js +4 -4
- package/dist/utils/editor.d.ts +37 -0
- package/dist/utils/editor.js +137 -0
- package/dist/utils/logger.d.ts +24 -6
- package/dist/utils/logger.js +51 -8
- package/package.json +23 -23
- package/dist/runtime/analysis/rules/errors/e001-missing-output-schema.d.ts +0 -22
- package/dist/runtime/analysis/rules/errors/e001-missing-output-schema.js +0 -30
- package/dist/runtime/analysis/rules/errors/e002-underspecified-input.d.ts +0 -24
- package/dist/runtime/analysis/rules/errors/e002-underspecified-input.js +0 -52
- package/dist/runtime/analysis/rules/errors/e003-type-mismatch.d.ts +0 -23
- package/dist/runtime/analysis/rules/errors/e003-type-mismatch.js +0 -73
- package/dist/runtime/analysis/rules/errors/e004-free-text-propagation.d.ts +0 -23
- package/dist/runtime/analysis/rules/errors/e004-free-text-propagation.js +0 -47
- package/dist/runtime/analysis/rules/errors/e005-tool-ambiguity.d.ts +0 -25
- package/dist/runtime/analysis/rules/errors/e005-tool-ambiguity.js +0 -73
- package/dist/runtime/analysis/rules/errors/e006-param-not-in-description.d.ts +0 -22
- package/dist/runtime/analysis/rules/errors/e006-param-not-in-description.js +0 -57
- package/dist/runtime/analysis/rules/errors/e007-output-not-guaranteed.d.ts +0 -23
- package/dist/runtime/analysis/rules/errors/e007-output-not-guaranteed.js +0 -56
- package/dist/runtime/analysis/rules/errors/e008-circular-dependency.d.ts +0 -22
- package/dist/runtime/analysis/rules/errors/e008-circular-dependency.js +0 -84
- package/dist/runtime/analysis/rules/errors/e009-implicit-user-input.d.ts +0 -23
- package/dist/runtime/analysis/rules/errors/e009-implicit-user-input.js +0 -89
- package/dist/runtime/analysis/rules/errors/e010-non-serializable.d.ts +0 -25
- package/dist/runtime/analysis/rules/errors/e010-non-serializable.js +0 -46
- package/dist/runtime/analysis/rules/errors/e011-missing-tool-description.d.ts +0 -24
- package/dist/runtime/analysis/rules/errors/e011-missing-tool-description.js +0 -33
- package/dist/runtime/analysis/rules/errors/e012-side-effect-detected.d.ts +0 -39
- package/dist/runtime/analysis/rules/errors/e012-side-effect-detected.js +0 -40
- package/dist/runtime/analysis/rules/errors/e013-non-deterministic-output.d.ts +0 -37
- package/dist/runtime/analysis/rules/errors/e013-non-deterministic-output.js +0 -34
- package/dist/runtime/analysis/rules/errors/e013-output-explosion.d.ts +0 -39
- package/dist/runtime/analysis/rules/errors/e013-output-explosion.js +0 -36
- package/dist/runtime/analysis/rules/errors/e014-hidden-dependency.d.ts +0 -42
- package/dist/runtime/analysis/rules/errors/e014-hidden-dependency.js +0 -46
- package/dist/runtime/analysis/rules/errors/e014-output-explosion.d.ts +0 -39
- package/dist/runtime/analysis/rules/errors/e014-output-explosion.js +0 -36
- package/dist/runtime/analysis/rules/errors/e015-hidden-dependency.d.ts +0 -42
- package/dist/runtime/analysis/rules/errors/e015-hidden-dependency.js +0 -46
- package/dist/runtime/analysis/rules/errors/e015-unbounded-execution.d.ts +0 -44
- package/dist/runtime/analysis/rules/errors/e015-unbounded-execution.js +0 -66
- package/dist/runtime/analysis/rules/errors/e016-output-validation-failed.d.ts +0 -43
- package/dist/runtime/analysis/rules/errors/e016-output-validation-failed.js +0 -42
- package/dist/runtime/analysis/rules/errors/e016-unbounded-execution.d.ts +0 -44
- package/dist/runtime/analysis/rules/errors/e016-unbounded-execution.js +0 -66
- package/dist/runtime/analysis/rules/errors/e017-input-validation-failed.d.ts +0 -57
- package/dist/runtime/analysis/rules/errors/e017-input-validation-failed.js +0 -80
- package/dist/runtime/analysis/rules/errors/e017-output-validation-failed.d.ts +0 -43
- package/dist/runtime/analysis/rules/errors/e017-output-validation-failed.js +0 -42
- package/dist/runtime/analysis/rules/errors/e018-input-validation-failed.d.ts +0 -57
- package/dist/runtime/analysis/rules/errors/e018-input-validation-failed.js +0 -80
- package/dist/runtime/analysis/rules/errors/e018-tool-execution-failed.d.ts +0 -38
- package/dist/runtime/analysis/rules/errors/e018-tool-execution-failed.js +0 -37
- package/dist/runtime/analysis/rules/errors/e019-tool-execution-failed.d.ts +0 -38
- package/dist/runtime/analysis/rules/errors/e019-tool-execution-failed.js +0 -37
- package/dist/runtime/analysis/rules/errors/e019-unexpected-test-result.d.ts +0 -65
- package/dist/runtime/analysis/rules/errors/e019-unexpected-test-result.js +0 -109
- package/dist/runtime/analysis/rules/errors/e020-unexpected-test-result.d.ts +0 -65
- package/dist/runtime/analysis/rules/errors/e020-unexpected-test-result.js +0 -109
- package/dist/runtime/analysis/rules/warnings/w001-implicit-dependency.d.ts +0 -22
- package/dist/runtime/analysis/rules/warnings/w001-implicit-dependency.js +0 -39
- package/dist/runtime/analysis/rules/warnings/w002-free-text-without-normalization.d.ts +0 -24
- package/dist/runtime/analysis/rules/warnings/w002-free-text-without-normalization.js +0 -40
- package/dist/runtime/analysis/rules/warnings/w003-missing-examples.d.ts +0 -22
- package/dist/runtime/analysis/rules/warnings/w003-missing-examples.js +0 -84
- package/dist/runtime/analysis/rules/warnings/w004-overloaded-responsibility.d.ts +0 -23
- package/dist/runtime/analysis/rules/warnings/w004-overloaded-responsibility.js +0 -96
- package/dist/runtime/analysis/rules/warnings/w005-generic-description.d.ts +0 -53
- package/dist/runtime/analysis/rules/warnings/w005-generic-description.js +0 -108
- package/dist/runtime/analysis/rules/warnings/w006-optional-as-required.d.ts +0 -22
- package/dist/runtime/analysis/rules/warnings/w006-optional-as-required.js +0 -44
- package/dist/runtime/analysis/rules/warnings/w007-broad-output-schema.d.ts +0 -23
- package/dist/runtime/analysis/rules/warnings/w007-broad-output-schema.js +0 -37
- package/dist/runtime/analysis/rules/warnings/w008-multiple-entry-points.d.ts +0 -22
- package/dist/runtime/analysis/rules/warnings/w008-multiple-entry-points.js +0 -97
- package/dist/runtime/analysis/rules/warnings/w009-hidden-side-effects.d.ts +0 -23
- package/dist/runtime/analysis/rules/warnings/w009-hidden-side-effects.js +0 -88
- package/dist/runtime/analysis/rules/warnings/w010-output-not-reusable.d.ts +0 -22
- package/dist/runtime/analysis/rules/warnings/w010-output-not-reusable.js +0 -81
- package/dist/runtime/analysis/rules/warnings/w021-weak-schema.d.ts +0 -40
- package/dist/runtime/analysis/rules/warnings/w021-weak-schema.js +0 -32
- package/dist/runtime/analysis/rules/warnings/w022-high-entropy-output.d.ts +0 -39
- package/dist/runtime/analysis/rules/warnings/w022-high-entropy-output.js +0 -36
- package/dist/runtime/analysis/rules/warnings/w023-unstable-defaults.d.ts +0 -38
- package/dist/runtime/analysis/rules/warnings/w023-unstable-defaults.js +0 -36
- package/dist/runtime/test/dependency-tracker.d.ts +0 -66
- package/dist/runtime/test/dependency-tracker.js +0 -80
- package/dist/runtime/test/formatters.d.ts +0 -18
- package/dist/runtime/test/formatters.js +0 -172
- package/dist/runtime/test/input-generator.d.ts +0 -33
- package/dist/runtime/test/input-generator.js +0 -498
- package/dist/runtime/test/mcp-root-detector.d.ts +0 -31
- package/dist/runtime/test/mcp-root-detector.js +0 -105
- package/dist/runtime/test/retry-tester.d.ts +0 -44
- package/dist/runtime/test/retry-tester.js +0 -103
- package/dist/runtime/test/synthetic-input-generator.d.ts +0 -11
- package/dist/runtime/test/synthetic-input-generator.js +0 -154
- package/dist/runtime/test/test-runner.d.ts +0 -28
- package/dist/runtime/test/test-runner.js +0 -55
package/README.md
CHANGED
|
@@ -1,231 +1,248 @@
|
|
|
1
1
|
# Syrin
|
|
2
2
|
|
|
3
|
-

|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@syrin/cli) [](https://opensource.org/licenses/ISC) [](https://nodejs.org/)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Stop Silent Failures in AI Tool Calls
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Your AI agent just called the same tool 47 times with identical parameters.
|
|
10
|
+
Your logs look fine. You're silently burning $200 in tokens.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
**Syrin catches these failures before production.**
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
15
|
-
##
|
|
16
|
+
## What Is This?
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Syrin is a development toolkit for [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) servers — the standard way AI agents call external tools.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
2. Connect an LLM
|
|
21
|
-
3. Run the server
|
|
22
|
-
4. Hope execution behaves as expected
|
|
20
|
+
**Without Syrin:**
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
```txt
|
|
23
|
+
Tool called 47x → No visibility
|
|
24
|
+
$200 burned → Silent failure
|
|
25
|
+
Logs look "fine" → Debug for hours
|
|
26
|
+
```
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
- Behaviour changes between runs
|
|
28
|
-
- Debugging relies on logs and guesswork
|
|
29
|
-
- Contract issues surface only after failures
|
|
28
|
+
**With Syrin:**
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
```txt
|
|
31
|
+
Loop detected at call #3 → Execution halted
|
|
32
|
+
Full event trace → See exactly what happened
|
|
33
|
+
Contract validated → Catch issues before runtime
|
|
34
|
+
```
|
|
32
35
|
|
|
33
36
|
---
|
|
34
37
|
|
|
35
|
-
##
|
|
38
|
+
## What Syrin Catches
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
**Tool Loops** — Model proposes the same tool repeatedly with no progress
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
npx @syrin/cli init
|
|
41
|
-
```
|
|
42
|
+
**Wrong Tool Selection** — Similar names, overlapping schemas, ambiguous descriptions cause silent misbehavior
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
**Silent Failures** — Tool throws an error but execution continues with broken state
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
npm install -g @syrin/cli
|
|
47
|
-
```
|
|
46
|
+
**Contract Mismatches** — Input/output schemas don't align between chained tools
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
**Hidden Dependencies** — Tools assume state that doesn't exist
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
npm install @syrin/cli
|
|
53
|
-
```
|
|
50
|
+
Documentation: [https://docs.syrin.dev](https://docs.syrin.dev)
|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
---
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
## See It In Action
|
|
55
|
+
|
|
56
|
+
<table>
|
|
57
|
+
<tr>
|
|
58
|
+
<td width="33%"><strong>syrin analyse</strong><br/>Catch contract issues</td>
|
|
59
|
+
<td width="33%"><strong>syrin dev</strong><br/>Interactive development</td>
|
|
60
|
+
<td width="33%"><strong>syrin test</strong><br/>Sandboxed tool testing</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td><img src="https://github.com/Syrin-Labs/cli/raw/main/assets/demo/syrin-analyse/analyse.gif" width="280" alt="syrin analyse demo"/></td>
|
|
64
|
+
<td><img src="https://github.com/Syrin-Labs/cli/raw/main/assets/demo/syrin-dev/dev.gif" width="280" alt="syrin dev demo"/></td>
|
|
65
|
+
<td><img src="https://github.com/Syrin-Labs/cli/raw/main/assets/demo/syrin-test/test_tool.gif" width="280" alt="syrin test demo"/></td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td width="33%"><strong>syrin init</strong><br/>Project setup</td>
|
|
69
|
+
<td width="33%"><strong>syrin list</strong><br/>Inspect tools</td>
|
|
70
|
+
<td width="33%"><strong>syrin test --connection</strong><br/>Connection test</td>
|
|
71
|
+
</tr>
|
|
72
|
+
<tr>
|
|
73
|
+
<td><img src="https://github.com/Syrin-Labs/cli/raw/main/assets/demo/syrin-init/init.gif" width="280" alt="syrin init demo"/></td>
|
|
74
|
+
<td><img src="https://github.com/Syrin-Labs/cli/raw/main/assets/demo/syrin-list/list.gif" width="280" alt="syrin list demo"/></td>
|
|
75
|
+
<td><img src="https://github.com/Syrin-Labs/cli/raw/main/assets/demo/syrin-test/test_connection.gif" width="280" alt="syrin test --connection demo"/></td>
|
|
76
|
+
</tr>
|
|
77
|
+
</table>
|
|
59
78
|
|
|
60
79
|
---
|
|
61
80
|
|
|
62
|
-
##
|
|
81
|
+
## Try It Now
|
|
63
82
|
|
|
64
|
-
|
|
83
|
+
```bash
|
|
84
|
+
# No install needed — run directly
|
|
85
|
+
npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp
|
|
86
|
+
```
|
|
65
87
|
|
|
66
|
-
|
|
88
|
+
Or install globally:
|
|
67
89
|
|
|
68
|
-
|
|
90
|
+
```bash
|
|
91
|
+
npm install -g @syrin/cli
|
|
69
92
|
|
|
70
|
-
|
|
71
|
-
|
|
93
|
+
syrin init --global
|
|
94
|
+
syrin doctor # Check your environment
|
|
95
|
+
syrin analyse --transport http --url http://localhost:8000/mcp # Analyze an MCP server
|
|
96
|
+
syrin dev --exec --transport http --url http://localhost:8000/mcp # Interactive dev mode
|
|
72
97
|
```
|
|
73
98
|
|
|
74
|
-
|
|
99
|
+
Or initialize a project with local config:
|
|
75
100
|
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
→ Inspect behaviour interactively
|
|
81
|
-
→ Enable execution with confidence
|
|
101
|
+
```bash
|
|
102
|
+
npx @syrin/cli init
|
|
103
|
+
syrin doctor
|
|
104
|
+
syrin analyse
|
|
82
105
|
```
|
|
83
106
|
|
|
84
|
-
|
|
85
|
-
It makes MCP systems understandable and testable.
|
|
107
|
+
**Want to try with a sample server?** Clone the repo and use the included [example MCP server](./examples/demo-mcp-py/):
|
|
86
108
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
109
|
+
```bash
|
|
110
|
+
git clone https://github.com/Syrin-Labs/cli.git && cd cli/examples/demo-mcp-py
|
|
111
|
+
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt
|
|
112
|
+
python server.py --mode http --port 8000 &
|
|
113
|
+
npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp
|
|
114
|
+
```
|
|
90
115
|
|
|
91
|
-
|
|
92
|
-
- Analyses tool contracts statically
|
|
93
|
-
- Lets you interact with MCP servers using real LLMs
|
|
94
|
-
- Shows which tools are proposed and why
|
|
95
|
-
- Prevents accidental execution by default
|
|
96
|
-
- Surfaces configuration and contract errors early
|
|
116
|
+
Requirements: Node.js >= 20.12, npm >= 9
|
|
97
117
|
|
|
98
118
|
---
|
|
99
119
|
|
|
100
|
-
##
|
|
101
|
-
|
|
102
|
-
### Static Tool Contract Analysis (`syrin analyse`)
|
|
120
|
+
## Core Commands
|
|
103
121
|
|
|
104
|
-
|
|
105
|
-
|
|
122
|
+
| Command | What It Does |
|
|
123
|
+
|---------|--------------|
|
|
124
|
+
| `syrin analyse` | Static analysis — catches contract issues before runtime |
|
|
125
|
+
| `syrin dev` | Interactive mode — see exactly what your LLM proposes |
|
|
126
|
+
| `syrin test` | Contract testing — validate tools in sandboxed execution |
|
|
127
|
+
| `syrin doctor` | Environment check — validate config and connections |
|
|
128
|
+
| `syrin list` | Inspect tools, resources, and prompts from your server |
|
|
106
129
|
|
|
107
|
-
|
|
130
|
+
---
|
|
108
131
|
|
|
109
|
-
|
|
110
|
-
- Parameter schemas
|
|
111
|
-
- Description clarity
|
|
112
|
-
- Implicit dependencies between tools
|
|
132
|
+
## Global Configuration
|
|
113
133
|
|
|
114
|
-
|
|
134
|
+
Syrin supports both **local** (project-specific) and **global** (user-wide) configurations. This allows you to:
|
|
115
135
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
136
|
+
- Use Syrin from any directory without initializing a project
|
|
137
|
+
- Share LLM API keys across multiple projects
|
|
138
|
+
- Set default agent names and LLM providers globally
|
|
119
139
|
|
|
120
|
-
|
|
140
|
+
### Quick Setup
|
|
121
141
|
|
|
122
142
|
```bash
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
# Set up global configuration
|
|
144
|
+
syrin config setup --global
|
|
125
145
|
|
|
126
|
-
|
|
146
|
+
# Set API keys in global .env
|
|
147
|
+
syrin config edit-env --global
|
|
127
148
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
149
|
+
# Use Syrin from any directory
|
|
150
|
+
syrin dev --exec --transport http --url http://localhost:8000/mcp
|
|
151
|
+
```
|
|
131
152
|
|
|
132
|
-
|
|
133
|
-
- Execute tools only when explicitly enabled
|
|
134
|
-
- Switch between LLM providers
|
|
135
|
-
- Inspect large tool outputs safely
|
|
153
|
+
### Configuration Management
|
|
136
154
|
|
|
137
155
|
```bash
|
|
138
|
-
|
|
139
|
-
|
|
156
|
+
# View global config
|
|
157
|
+
syrin config list --global
|
|
140
158
|
|
|
141
|
-
|
|
159
|
+
# Set global LLM provider
|
|
160
|
+
syrin config set openai.model "gpt-4-turbo" --global
|
|
142
161
|
|
|
143
|
-
|
|
144
|
-
syrin
|
|
162
|
+
# Set default provider
|
|
163
|
+
syrin config set-default claude --global
|
|
145
164
|
```
|
|
146
165
|
|
|
147
|
-
|
|
166
|
+
See the [Configuration Guide](docs/Commands/syrin-config.md) for more details.
|
|
148
167
|
|
|
149
|
-
|
|
168
|
+
## Key Capabilities
|
|
150
169
|
|
|
151
|
-
|
|
170
|
+
### `syrin analyse` — Find Problems Before They Hit Production
|
|
152
171
|
|
|
153
|
-
|
|
172
|
+
**The Problem:** Your LLM picks the wrong tool, or calls tools with missing parameters. You only find out after deployment when users report broken behavior.
|
|
154
173
|
|
|
155
|
-
|
|
156
|
-
- **Sandboxed Execution**: Tools tested in isolated environments with resource limits
|
|
157
|
-
- **Behavioral Observation**: Detects side effects, non-determinism, output explosions, hidden dependencies
|
|
158
|
-
- **Process Reuse**: Optimized for performance (100+ tools in 1-3 minutes)
|
|
174
|
+
**The Solution:** Static analysis of your tool contracts catches issues before any code runs.
|
|
159
175
|
|
|
160
176
|
```bash
|
|
161
|
-
#
|
|
162
|
-
syrin
|
|
163
|
-
|
|
164
|
-
# Test specific tool
|
|
165
|
-
syrin test --tool fetch_user
|
|
166
|
-
|
|
167
|
-
# Strict mode (warnings become errors)
|
|
168
|
-
syrin test --strict
|
|
169
|
-
|
|
170
|
-
# JSON output for CI
|
|
171
|
-
syrin test --json
|
|
177
|
+
syrin analyse # Check all tool contracts
|
|
178
|
+
syrin analyse --ci # Exit code 1 on errors (for CI pipelines)
|
|
179
|
+
syrin analyse --strict # Treat warnings as errors
|
|
172
180
|
```
|
|
173
181
|
|
|
174
|
-
**
|
|
182
|
+
**What it catches:**
|
|
183
|
+
- Vague or missing tool descriptions
|
|
184
|
+
- Parameters without descriptions (LLMs guess wrong)
|
|
185
|
+
- Overlapping tools that confuse model selection
|
|
186
|
+
- Schema mismatches between chained tools
|
|
187
|
+
- Circular dependencies
|
|
175
188
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### `syrin dev` — See What Your LLM Actually Does
|
|
179
192
|
|
|
180
|
-
|
|
193
|
+
**The Problem:** Your LLM calls tools, but you can't see *why* it chose that tool, what parameters it's sending, or what happens between steps. You're debugging blind.
|
|
181
194
|
|
|
182
|
-
|
|
195
|
+
**The Solution:** An interactive environment where you see every tool proposal before it executes.
|
|
183
196
|
|
|
184
197
|
```bash
|
|
185
|
-
syrin
|
|
186
|
-
syrin
|
|
198
|
+
syrin dev # Preview mode (no execution)
|
|
199
|
+
syrin dev --exec # Enable execution when ready
|
|
187
200
|
```
|
|
188
201
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
202
|
+
**What you get:**
|
|
203
|
+
- See exactly which tool the LLM wants to call and why
|
|
204
|
+
- Inspect parameters before they're sent
|
|
205
|
+
- Step through tool chains one call at a time
|
|
206
|
+
- Full event trace of every decision
|
|
194
207
|
|
|
195
208
|
---
|
|
196
209
|
|
|
197
|
-
|
|
210
|
+
### `syrin test` — Validate Tools in Isolation
|
|
211
|
+
|
|
212
|
+
**The Problem:** A tool works fine in manual testing, but in production it has side effects you didn't expect, returns massive outputs that blow your context window, or behaves differently on repeated calls.
|
|
213
|
+
|
|
214
|
+
**The Solution:** Sandboxed execution that validates each tool against its behavioral contract.
|
|
198
215
|
|
|
199
216
|
```bash
|
|
200
|
-
syrin
|
|
201
|
-
syrin
|
|
202
|
-
syrin
|
|
203
|
-
syrin test
|
|
204
|
-
syrin test --connection # Test MCP protocol connection
|
|
205
|
-
syrin dev # Inspect behaviour interactively
|
|
217
|
+
syrin test # Test all tools
|
|
218
|
+
syrin test --tool fetch_user # Test specific tool
|
|
219
|
+
syrin test --strict # Warnings become errors
|
|
220
|
+
syrin test --json # JSON output for CI
|
|
206
221
|
```
|
|
207
222
|
|
|
208
|
-
|
|
223
|
+
**What it catches:**
|
|
224
|
+
- Unexpected side effects (file writes, network calls)
|
|
225
|
+
- Non-deterministic outputs
|
|
226
|
+
- Output size explosions
|
|
227
|
+
- Hidden dependencies on external state
|
|
228
|
+
- Contract violations
|
|
209
229
|
|
|
210
230
|
---
|
|
211
231
|
|
|
212
|
-
|
|
232
|
+
### `syrin doctor` — Validate Your Setup
|
|
213
233
|
|
|
214
|
-
|
|
215
|
-
| ------------------------- | --------------------------------------------- |
|
|
216
|
-
| `syrin init` | Initialise a Syrin project |
|
|
217
|
-
| `syrin doctor` | Validate configuration and environment |
|
|
218
|
-
| `syrin analyse` | Static analysis of MCP tool contracts |
|
|
219
|
-
| `syrin test` | Validate tool contracts (sandboxed execution) |
|
|
220
|
-
| `syrin test --connection` | Test MCP protocol connection (legacy) |
|
|
221
|
-
| `syrin list` | Inspect tools, resources, and prompts |
|
|
222
|
-
| `syrin dev` | Interactive execution inspection |
|
|
234
|
+
**The Problem:** Something's misconfigured, but you're not sure what. API keys? Transport settings? MCP connection?
|
|
223
235
|
|
|
224
|
-
|
|
236
|
+
**The Solution:** A single command that checks everything.
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
syrin doctor # Check config, env, connections
|
|
240
|
+
syrin test --connection # Test MCP connection only
|
|
241
|
+
```
|
|
225
242
|
|
|
226
243
|
---
|
|
227
244
|
|
|
228
|
-
## Tool Contracts
|
|
245
|
+
## Tool Contracts
|
|
229
246
|
|
|
230
247
|
Define behavioral guarantees for your tools in `tools/<tool-name>.yaml` files:
|
|
231
248
|
|
|
@@ -246,17 +263,12 @@ See [Tool Contracts Documentation](./docs/tool-contracts.md) for details.
|
|
|
246
263
|
|
|
247
264
|
## Configuration
|
|
248
265
|
|
|
249
|
-
Syrin
|
|
266
|
+
Syrin supports **two configuration layers**:
|
|
250
267
|
|
|
251
|
-
|
|
252
|
-
syrin.yaml
|
|
253
|
-
```
|
|
268
|
+
- **Local** (`syrin.yaml` in project root) — transport, MCP connection, LLM providers
|
|
269
|
+
- **Global** (`~/.syrin/syrin.yaml`) — shared LLM API keys and defaults across projects
|
|
254
270
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
- Transport type (`stdio` or `http`)
|
|
258
|
-
- MCP server connection
|
|
259
|
-
- Allowed LLM providers
|
|
271
|
+
Local config overrides global config. CLI flags override both.
|
|
260
272
|
|
|
261
273
|
Configuration reference: [https://docs.syrin.dev/configuration](https://docs.syrin.dev/configuration)
|
|
262
274
|
|
|
@@ -286,17 +298,37 @@ Provider configuration: [https://docs.syrin.dev/configuration/llm](https://docs.
|
|
|
286
298
|
|
|
287
299
|
---
|
|
288
300
|
|
|
301
|
+
## Community
|
|
302
|
+
|
|
303
|
+
- [Discord](https://discord.gg/j8GUvHybSa) — Ask questions, share feedback
|
|
304
|
+
- [GitHub Discussions](https://github.com/Syrin-Labs/cli/discussions) — Feature ideas, show & tell
|
|
305
|
+
- [Documentation](https://docs.syrin.dev) — Full guides and API reference
|
|
306
|
+
|
|
307
|
+
Found a bug or have a feature request? [Open an issue](https://github.com/Syrin-Labs/cli/issues) — we read every one.
|
|
308
|
+
|
|
309
|
+
If Syrin helped you catch something your logs missed, a [star on GitHub](https://github.com/Syrin-Labs/cli) helps others find it too.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
289
313
|
## Links
|
|
290
314
|
|
|
291
315
|
- Documentation: [https://docs.syrin.dev](https://docs.syrin.dev)
|
|
292
|
-
- GitHub: [https://github.com/
|
|
293
|
-
- Issues: [https://github.com/
|
|
316
|
+
- GitHub: [https://github.com/Syrin-Labs/cli](https://github.com/Syrin-Labs/cli)
|
|
317
|
+
- Issues: [https://github.com/Syrin-Labs/cli/issues](https://github.com/Syrin-Labs/cli/issues)
|
|
294
318
|
- npm: [https://www.npmjs.com/package/@syrin/cli](https://www.npmjs.com/package/@syrin/cli)
|
|
295
319
|
|
|
296
320
|
---
|
|
297
321
|
|
|
322
|
+
## Contributing
|
|
323
|
+
|
|
324
|
+
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) before submitting PRs.
|
|
325
|
+
|
|
326
|
+
For security issues, please see our [Security Policy](SECURITY.md).
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
298
330
|
## License
|
|
299
331
|
|
|
300
|
-
ISC License. See LICENSE for details.
|
|
332
|
+
ISC License. See [LICENSE](LICENSE) for details.
|
|
301
333
|
|
|
302
|
-
Made with
|
|
334
|
+
Made with care by **Syrin Labs**.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `syrin config` command implementation.
|
|
3
|
+
* Manages both local and global Syrin configurations.
|
|
4
|
+
*/
|
|
5
|
+
export interface ConfigCommandOptions {
|
|
6
|
+
/** Operate on global config */
|
|
7
|
+
global?: boolean;
|
|
8
|
+
/** Operate on local config */
|
|
9
|
+
local?: boolean;
|
|
10
|
+
/** Key to get/set (e.g., "openai.model", "agent_name") */
|
|
11
|
+
key?: string;
|
|
12
|
+
/** Value to set */
|
|
13
|
+
value?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Execute config set command.
|
|
17
|
+
*/
|
|
18
|
+
export declare function executeConfigSet(key: string, value: string, options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Execute config get command.
|
|
21
|
+
*/
|
|
22
|
+
export declare function executeConfigGet(key: string, options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Execute config list command.
|
|
25
|
+
*/
|
|
26
|
+
export declare function executeConfigList(options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Execute config show command (same as list for now).
|
|
29
|
+
*/
|
|
30
|
+
export declare function executeConfigShow(options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Execute config edit command.
|
|
33
|
+
*/
|
|
34
|
+
export declare function executeConfigEdit(options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Execute config edit-env command.
|
|
37
|
+
*/
|
|
38
|
+
export declare function executeConfigEditEnv(options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Execute config set-default command.
|
|
41
|
+
*/
|
|
42
|
+
export declare function executeConfigSetDefault(provider: string, options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Execute config remove command.
|
|
45
|
+
*/
|
|
46
|
+
export declare function executeConfigRemove(provider: string, options?: ConfigCommandOptions, projectRoot?: string): Promise<void>;
|
|
47
|
+
//# sourceMappingURL=config.d.ts.map
|