@neural-tools/cli 0.1.4 → 0.1.5
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/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +360 -80
- package/dist/cli.mjs +364 -0
- package/dist/index.d.mts +45 -0
- package/dist/index.d.ts +45 -6
- package/dist/index.js +363 -15
- package/dist/index.mjs +363 -0
- package/package.json +5 -5
- package/dist/commands/deploy.d.ts +0 -7
- package/dist/commands/deploy.js +0 -96
- package/dist/commands/generate-agent.d.ts +0 -10
- package/dist/commands/generate-agent.js +0 -126
- package/dist/commands/generate-command.d.ts +0 -10
- package/dist/commands/generate-command.js +0 -112
- package/dist/commands/generate-mcp.d.ts +0 -10
- package/dist/commands/generate-mcp.js +0 -429
- package/dist/commands/login.d.ts +0 -5
- package/dist/commands/login.js +0 -112
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/status.js +0 -64
package/dist/commands/status.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.statusCommand = statusCommand;
|
|
4
|
-
const core_1 = require("@neural-tools/core");
|
|
5
|
-
async function statusCommand() {
|
|
6
|
-
core_1.logger.header('AI Toolkit Status');
|
|
7
|
-
try {
|
|
8
|
-
const license = await core_1.licenseManager.loadLicense();
|
|
9
|
-
core_1.logger.section('License Information', [
|
|
10
|
-
`Tier: ${license.tier.toUpperCase()}`,
|
|
11
|
-
`Email: ${license.email || 'N/A'}`,
|
|
12
|
-
`Status: ${license.expiresAt ? checkExpiration(license.expiresAt) : 'Active'}`
|
|
13
|
-
]);
|
|
14
|
-
// Check available features
|
|
15
|
-
const features = [
|
|
16
|
-
{ name: 'MCP Generation', key: 'mcp-generation' },
|
|
17
|
-
{ name: 'Claude Commands', key: 'claude-commands' },
|
|
18
|
-
{ name: 'Vector Database', key: 'vector-db' },
|
|
19
|
-
{ name: 'Semantic Cache', key: 'semantic-cache' },
|
|
20
|
-
{ name: 'Fine-tuning', key: 'fine-tuning' },
|
|
21
|
-
{ name: 'Cloud Deployment', key: 'cloud-deployment' },
|
|
22
|
-
{ name: 'GitHub Automation', key: 'github-automation' }
|
|
23
|
-
];
|
|
24
|
-
const featureStatus = await Promise.all(features.map(async (feature) => {
|
|
25
|
-
const available = await core_1.licenseManager.checkFeature(feature.key);
|
|
26
|
-
return `${available ? '✓' : '✗'} ${feature.name}`;
|
|
27
|
-
}));
|
|
28
|
-
core_1.logger.section('Feature Availability', featureStatus);
|
|
29
|
-
if (license.tier === core_1.LicenseTier.FREE) {
|
|
30
|
-
core_1.logger.newline();
|
|
31
|
-
core_1.logger.info('Unlock more features with Pro or Enterprise:');
|
|
32
|
-
core_1.logger.info('https://ai-toolkit.dev/pricing');
|
|
33
|
-
}
|
|
34
|
-
core_1.logger.newline();
|
|
35
|
-
core_1.logger.section('Quick Start', [
|
|
36
|
-
'Generate an MCP server:',
|
|
37
|
-
' ai-toolkit generate mcp github',
|
|
38
|
-
'',
|
|
39
|
-
'Generate a Claude command:',
|
|
40
|
-
' ai-toolkit generate command search-kb',
|
|
41
|
-
'',
|
|
42
|
-
'View all commands:',
|
|
43
|
-
' ai-toolkit --help'
|
|
44
|
-
]);
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
core_1.logger.error('Failed to load license information');
|
|
48
|
-
core_1.logger.newline();
|
|
49
|
-
core_1.logger.info('Run "ai-toolkit login" to activate your license');
|
|
50
|
-
core_1.logger.info('Or continue with free tier features');
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function checkExpiration(expiresAt) {
|
|
54
|
-
const expirationDate = new Date(expiresAt);
|
|
55
|
-
const now = new Date();
|
|
56
|
-
if (expirationDate < now) {
|
|
57
|
-
return 'Expired';
|
|
58
|
-
}
|
|
59
|
-
const daysUntilExpiration = Math.ceil((expirationDate.getTime() - now.getTime()) / (1000 * 60 * 60 * 24));
|
|
60
|
-
if (daysUntilExpiration <= 30) {
|
|
61
|
-
return `Active (expires in ${daysUntilExpiration} days)`;
|
|
62
|
-
}
|
|
63
|
-
return 'Active';
|
|
64
|
-
}
|