paperlesson-cli 0.0.0-stage → 1.0.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,3 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PaperLesson (https://paperlesson.com)
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # paperlesson-cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Official zero-dependency terminal CLI and Model Context Protocol (MCP) client for **[PaperLesson (paperlesson.com)](https://paperlesson.com)**.
4
+
5
+ ## Quick Usage
6
+
7
+ ```bash
8
+ # List all available MCP tools
9
+ npx paperlesson-cli tools
10
+
11
+ # Run a live sample query
12
+ npx paperlesson-cli demo
13
+
14
+ # Call a specific tool with JSON arguments
15
+ npx paperlesson-cli call generate_seeded_math_drill_set '{"topic":"multiplication","count":10,"seed":42}'
16
+ ```
17
+
18
+ ## Connect in Claude Desktop / Cursor / Windsurf
19
+
20
+ ```json
21
+ {
22
+ "mcpServers": {
23
+ "paperlesson": {
24
+ "type": "streamable-http",
25
+ "url": "https://paperlesson.com/api/mcp"
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Official Web Tools & Documentation
32
+
33
+ - **[PaperLesson Official Studio](https://paperlesson.com)** (https://paperlesson.com)
34
+
35
+ ## License
36
+
37
+ MIT © [PaperLesson](https://paperlesson.com)
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ const ENDPOINT = 'https://paperlesson.com/api/mcp';
3
+
4
+ async function rpc(method, params = {}) {
5
+ const res = await fetch(ENDPOINT, {
6
+ method: 'POST',
7
+ headers: { 'Content-Type': 'application/json', 'Accept': 'application/json, text/event-stream' },
8
+ body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params })
9
+ });
10
+ if (!res.ok) throw new Error('HTTP ' + res.status + ' from ' + ENDPOINT);
11
+ const txt = await res.text();
12
+ if (txt.startsWith('event:') || txt.includes('\ndata:')) {
13
+ const m = txt.match(/data:\s*(\{.*\})/);
14
+ if (m) return JSON.parse(m[1]);
15
+ }
16
+ return JSON.parse(txt);
17
+ }
18
+
19
+ async function main() {
20
+ const [cmd, arg1, arg2] = process.argv.slice(2);
21
+ if (!cmd || cmd === '--help' || cmd === '-h' || cmd === 'help') {
22
+ console.log('PaperLesson CLI v1.0.0 — Official Terminal & MCP Client');
23
+ console.log('Website: https://paperlesson.com');
24
+ console.log('MCP URL: ' + ENDPOINT);
25
+ console.log('\nUsage:');
26
+ console.log(' npx paperlesson-cli tools List available MCP tools');
27
+ console.log(' npx paperlesson-cli demo Run live sample calculation');
28
+ console.log(' npx paperlesson-cli call <tool> <jsonArgs> Invoke any MCP tool with JSON arguments');
29
+ return;
30
+ }
31
+ if (cmd === 'tools') {
32
+ const out = await rpc('tools/list');
33
+ for (const t of out?.result?.tools || []) {
34
+ console.log('- ' + t.name + ': ' + t.description);
35
+ }
36
+ return;
37
+ }
38
+ if (cmd === 'demo') {
39
+ const out = await rpc('tools/call', { name: "generate_seeded_math_drill_set", arguments: {"topic":"multiplication","count":10,"seed":42} });
40
+ console.log(out?.result?.content?.[0]?.text || JSON.stringify(out, null, 2));
41
+ return;
42
+ }
43
+ if (cmd === 'call' && arg1) {
44
+ const parsed = arg2 ? JSON.parse(arg2) : {};
45
+ const out = await rpc('tools/call', { name: arg1, arguments: parsed });
46
+ console.log(out?.result?.content?.[0]?.text || JSON.stringify(out, null, 2));
47
+ return;
48
+ }
49
+ console.error('Unknown command. Run with --help for usage.');
50
+ process.exit(1);
51
+ }
52
+
53
+ main().catch(err => {
54
+ console.error('Error:', err.message);
55
+ process.exit(1);
56
+ });
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "paperlesson-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Official CLI & MCP client for PaperLesson (paperlesson.com): generate deterministic seeded K-12 math drills, Zaner-Bloser/DNealian handwriting ruling specs & cursive guides.",
5
+ "homepage": "https://paperlesson.com",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/AbigailDavised/paperlesson-mcp.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/AbigailDavised/paperlesson-mcp/issues",
12
+ "email": "admin@paperlesson.com"
13
+ },
14
+ "funding": {
15
+ "type": "individual",
16
+ "url": "https://paperlesson.com"
17
+ },
18
+ "license": "MIT",
19
+ "author": "PaperLesson <admin@paperlesson.com> (https://paperlesson.com)",
20
+ "type": "module",
21
+ "bin": {
22
+ "paperlesson": "./bin/paperlesson.mjs",
23
+ "paperlesson-cli": "./bin/paperlesson.mjs"
24
+ },
25
+ "files": [
26
+ "bin/",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "engines": {
31
+ "node": ">=18.0.0"
32
+ },
33
+ "keywords": [
34
+ "k12-education",
35
+ "math-worksheets",
36
+ "handwriting-paper",
37
+ "zaner-bloser",
38
+ "printable-pdf",
39
+ "mcp",
40
+ "cli"
41
+ ]
42
+ }