claude-scionos 1.0.1 → 1.1.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/README.fr.md +6 -6
- package/README.md +6 -6
- package/eslint.config.js +20 -0
- package/index.js +10 -5
- package/package.json +11 -3
package/README.fr.md
CHANGED
|
@@ -60,7 +60,7 @@ Avant d'utiliser `claude-scionos`, assurez-vous d'avoir :
|
|
|
60
60
|
npm install -g @anthropic-ai/claude-code
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
- Un **ANTHROPIC_AUTH_TOKEN** valide depuis [https://
|
|
63
|
+
- Un **ANTHROPIC_AUTH_TOKEN** valide depuis [https://routerlab.ch/keys](https://routerlab.ch/keys)
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
@@ -113,7 +113,7 @@ npx claude-scionos
|
|
|
113
113
|
$ npx claude-scionos
|
|
114
114
|
|
|
115
115
|
Claude Code (via ScioNos)
|
|
116
|
-
To retrieve your token, visit: https://
|
|
116
|
+
To retrieve your token, visit: https://routerlab.ch/keys
|
|
117
117
|
? Please enter your ANTHROPIC_AUTH_TOKEN: ********
|
|
118
118
|
|
|
119
119
|
# Claude Code démarre...
|
|
@@ -134,7 +134,7 @@ npx claude-scionos -v
|
|
|
134
134
|
1. **Vérification** : Vérifie que la commande `claude` est disponible dans votre PATH
|
|
135
135
|
2. **Saisie du jeton** : Demande de manière sécurisée votre jeton d'authentification (entrée masquée)
|
|
136
136
|
3. **Configuration de l'environnement** : Crée des variables d'environnement isolées :
|
|
137
|
-
- `ANTHROPIC_BASE_URL` → `https://
|
|
137
|
+
- `ANTHROPIC_BASE_URL` → `https://routerlab.ch`
|
|
138
138
|
- `ANTHROPIC_AUTH_TOKEN` → Votre jeton (mémoire uniquement)
|
|
139
139
|
4. **Exécution** : Lance le processus Claude Code avec l'environnement personnalisé
|
|
140
140
|
5. **Nettoyage** : Détruit automatiquement les informations d'identification à la sortie
|
|
@@ -157,7 +157,7 @@ Bien que `claude-scionos` assure une sécurité maximale en conservant les jeton
|
|
|
157
157
|
✅ **Bonnes pratiques :**
|
|
158
158
|
|
|
159
159
|
- Ne partagez jamais votre `ANTHROPIC_AUTH_TOKEN` avec d'autres personnes
|
|
160
|
-
- Récupérez un nouveau jeton pour chaque session depuis [https://
|
|
160
|
+
- Récupérez un nouveau jeton pour chaque session depuis [https://routerlab.ch/keys](https://routerlab.ch/keys)
|
|
161
161
|
- Évitez d'exécuter sur des systèmes partagés/non fiables
|
|
162
162
|
- Utilisez pour le développement local ou des pipelines CI/CD sécurisés
|
|
163
163
|
|
|
@@ -216,9 +216,9 @@ claude --version
|
|
|
216
216
|
**Problème :** Jeton invalide ou expiré.
|
|
217
217
|
|
|
218
218
|
**Solution :**
|
|
219
|
-
1. Obtenez un nouveau jeton depuis [https://
|
|
219
|
+
1. Obtenez un nouveau jeton depuis [https://routerlab.ch/keys](https://routerlab.ch/keys)
|
|
220
220
|
2. Assurez-vous de copier le jeton complet (sans espaces supplémentaires)
|
|
221
|
-
3. Vérifiez votre connexion réseau à `
|
|
221
|
+
3. Vérifiez votre connexion réseau à `routerlab.ch`
|
|
222
222
|
|
|
223
223
|
---
|
|
224
224
|
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ Before using `claude-scionos`, ensure you have:
|
|
|
60
60
|
npm install -g @anthropic-ai/claude-code
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
- A valid **ANTHROPIC_AUTH_TOKEN** from [https://
|
|
63
|
+
- A valid **ANTHROPIC_AUTH_TOKEN** from [https://routerlab.ch/keys](https://routerlab.ch/keys)
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
@@ -113,7 +113,7 @@ npx claude-scionos
|
|
|
113
113
|
$ npx claude-scionos
|
|
114
114
|
|
|
115
115
|
Claude Code (via ScioNos)
|
|
116
|
-
To retrieve your token, visit: https://
|
|
116
|
+
To retrieve your token, visit: https://routerlab.ch/keys
|
|
117
117
|
? Please enter your ANTHROPIC_AUTH_TOKEN: ********
|
|
118
118
|
|
|
119
119
|
# Claude Code starts...
|
|
@@ -134,7 +134,7 @@ npx claude-scionos -v
|
|
|
134
134
|
1. **Verification**: Checks if `claude` command is available in your PATH
|
|
135
135
|
2. **Token Input**: Securely prompts for your authentication token (masked input)
|
|
136
136
|
3. **Environment Setup**: Creates isolated environment variables:
|
|
137
|
-
- `ANTHROPIC_BASE_URL` → `https://
|
|
137
|
+
- `ANTHROPIC_BASE_URL` → `https://routerlab.ch`
|
|
138
138
|
- `ANTHROPIC_AUTH_TOKEN` → Your token (memory only)
|
|
139
139
|
4. **Execution**: Spawns Claude Code process with custom environment
|
|
140
140
|
5. **Cleanup**: Automatically destroys credentials on exit
|
|
@@ -157,7 +157,7 @@ While `claude-scionos` ensures maximum security by keeping tokens in memory only
|
|
|
157
157
|
✅ **Best Practices:**
|
|
158
158
|
|
|
159
159
|
- Never share your `ANTHROPIC_AUTH_TOKEN` with others
|
|
160
|
-
- Retrieve a fresh token for each session from [https://
|
|
160
|
+
- Retrieve a fresh token for each session from [https://routerlab.ch/keys](https://routerlab.ch/keys)
|
|
161
161
|
- Avoid running on shared/untrusted systems
|
|
162
162
|
- Use for local development or secure CI/CD pipelines
|
|
163
163
|
|
|
@@ -216,9 +216,9 @@ claude --version
|
|
|
216
216
|
**Problem:** Invalid or expired token.
|
|
217
217
|
|
|
218
218
|
**Solution:**
|
|
219
|
-
1. Get a fresh token from [https://
|
|
219
|
+
1. Get a fresh token from [https://routerlab.ch/keys](https://routerlab.ch/keys)
|
|
220
220
|
2. Ensure you're copying the complete token (no extra spaces)
|
|
221
|
-
3. Check your network connection to `
|
|
221
|
+
3. Check your network connection to `routerlab.ch`
|
|
222
222
|
|
|
223
223
|
---
|
|
224
224
|
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import globals from 'globals';
|
|
2
|
+
import pluginJs from '@eslint/js';
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
{
|
|
6
|
+
languageOptions: {
|
|
7
|
+
globals: {
|
|
8
|
+
...globals.node,
|
|
9
|
+
...globals.builtin,
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
pluginJs.configs.recommended,
|
|
14
|
+
{
|
|
15
|
+
rules: {
|
|
16
|
+
'no-console': 'off',
|
|
17
|
+
'no-process-exit': 'off',
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
];
|
package/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { password } from '@inquirer/prompts';
|
|
5
5
|
import spawn from 'cross-spawn';
|
|
6
|
+
import updateNotifier from 'update-notifier';
|
|
6
7
|
import which from 'which';
|
|
7
8
|
import process from 'node:process';
|
|
8
9
|
import { createRequire } from 'node:module';
|
|
@@ -11,6 +12,9 @@ import fs from 'node:fs';
|
|
|
11
12
|
const require = createRequire(import.meta.url);
|
|
12
13
|
const pkg = require('./package.json');
|
|
13
14
|
|
|
15
|
+
// Initialize update notifier
|
|
16
|
+
updateNotifier({ pkg }).notify();
|
|
17
|
+
|
|
14
18
|
// 0. Handle --version / -v flag
|
|
15
19
|
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
16
20
|
console.log(pkg.version);
|
|
@@ -20,7 +24,7 @@ if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
|
20
24
|
// 1. Check if "claude" command is available
|
|
21
25
|
try {
|
|
22
26
|
await which('claude');
|
|
23
|
-
} catch
|
|
27
|
+
} catch {
|
|
24
28
|
console.error(chalk.redBright("Error: 'claude' command not found. Please install Claude Code first: npm install -g @anthropic-ai/claude-code"));
|
|
25
29
|
process.exit(1);
|
|
26
30
|
}
|
|
@@ -51,7 +55,7 @@ console.clear();
|
|
|
51
55
|
console.log(chalk.cyan.bold("Claude Code (via ScioNos)"));
|
|
52
56
|
|
|
53
57
|
// 4. Token info
|
|
54
|
-
console.log(chalk.blueBright("To retrieve your token, visit: https://
|
|
58
|
+
console.log(chalk.blueBright("To retrieve your token, visit: https://routerlab.ch/keys"));
|
|
55
59
|
|
|
56
60
|
// 5. Token input
|
|
57
61
|
const token = await password({
|
|
@@ -68,13 +72,14 @@ const token = await password({
|
|
|
68
72
|
// 6. Environment configuration
|
|
69
73
|
const env = {
|
|
70
74
|
...process.env,
|
|
71
|
-
ANTHROPIC_BASE_URL: "https://
|
|
75
|
+
ANTHROPIC_BASE_URL: "https://routerlab.ch",
|
|
72
76
|
ANTHROPIC_AUTH_TOKEN: token,
|
|
73
77
|
ANTHROPIC_API_KEY: "" // Force empty string
|
|
74
78
|
};
|
|
75
79
|
|
|
76
80
|
// 7. Launch Claude Code
|
|
77
|
-
const
|
|
81
|
+
const args = process.argv.slice(2);
|
|
82
|
+
const child = spawn('claude', args, {
|
|
78
83
|
stdio: 'inherit',
|
|
79
84
|
env: env
|
|
80
85
|
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-scionos",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Ephemeral and secure runner for Claude Code CLI in SNIA environment",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "index.js",
|
|
6
7
|
"bin": {
|
|
7
8
|
"claude-scionos": "index.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"lint": "eslint .",
|
|
11
13
|
"release:patch": "npm version patch -m \"Chore: Bump version to %s\"",
|
|
12
14
|
"release:minor": "npm version minor -m \"Chore: Bump version to %s\"",
|
|
13
15
|
"release:major": "npm version major -m \"Chore: Bump version to %s\""
|
|
@@ -33,9 +35,15 @@
|
|
|
33
35
|
},
|
|
34
36
|
"private": false,
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"@inquirer/prompts": "^8.0.
|
|
38
|
+
"@inquirer/prompts": "^8.0.2",
|
|
37
39
|
"chalk": "^5.6.2",
|
|
38
40
|
"cross-spawn": "^7.0.6",
|
|
41
|
+
"update-notifier": "^7.3.1",
|
|
39
42
|
"which": "^6.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@eslint/js": "^9.39.1",
|
|
46
|
+
"eslint": "^9.39.1",
|
|
47
|
+
"globals": "^16.5.0"
|
|
40
48
|
}
|
|
41
|
-
}
|
|
49
|
+
}
|