skrypt-ai 0.3.0 → 0.3.2

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.js CHANGED
@@ -18,7 +18,7 @@ import { loginCommand, logoutCommand, whoamiCommand } from './commands/login.js'
18
18
  import { cronCommand } from './commands/cron.js';
19
19
  import { deployCommand } from './commands/deploy.js';
20
20
  import { testCommand } from './commands/test.js';
21
- const VERSION = '0.3.0';
21
+ const VERSION = '0.3.2';
22
22
  async function checkForUpdates() {
23
23
  try {
24
24
  const res = await fetch('https://registry.npmjs.org/skrypt-ai/latest', {
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
  import { existsSync, mkdirSync, cpSync, readFileSync, writeFileSync, readdirSync } from 'fs';
3
- import { join, dirname } from 'path';
3
+ import { join, dirname, resolve } from 'path';
4
4
  import { fileURLToPath } from 'url';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = dirname(__filename);
@@ -9,7 +9,7 @@ export const initCommand = new Command('init')
9
9
  .argument('[directory]', 'Target directory', '.')
10
10
  .option('--name <name>', 'Project name', 'my-docs')
11
11
  .action(async (directory, options) => {
12
- const targetDir = join(process.cwd(), directory);
12
+ const targetDir = resolve(directory);
13
13
  console.log('skrypt init');
14
14
  console.log(` directory: ${targetDir}`);
15
15
  console.log(` name: ${options.name}`);
@@ -41,6 +41,7 @@ export const initCommand = new Command('init')
41
41
  const docsJsonPath = join(targetDir, 'docs.json');
42
42
  const docsJson = JSON.parse(readFileSync(docsJsonPath, 'utf-8'));
43
43
  docsJson.name = options.name;
44
+ docsJson.description = `${options.name} documentation`;
44
45
  writeFileSync(docsJsonPath, JSON.stringify(docsJson, null, 2));
45
46
  console.log('');
46
47
  console.log('Done! Next steps:');
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "API Documentation",
3
- "description": "Generated by skrypt",
3
+ "description": "Documentation generated with Skrypt",
4
4
  "theme": {
5
5
  "primaryColor": "#3b82f6",
6
6
  "accentColor": "#8b5cf6"
@@ -1,31 +1,27 @@
1
1
  # Introduction
2
2
 
3
- Welcome to the API documentation. This guide will help you get started with integrating our API into your applications.
3
+ Welcome to the documentation. This guide will help you get started.
4
4
 
5
5
  <CardGroup cols={2}>
6
6
  <Card title="Quick Start" icon="Zap" href="/docs/quickstart">
7
7
  Get up and running in under 5 minutes
8
8
  </Card>
9
- <Card title="API Reference" icon="Code" href="/docs/api">
10
- Explore all available endpoints
9
+ <Card title="Reference" icon="Code" href="/docs/api">
10
+ Explore all available APIs
11
11
  </Card>
12
12
  </CardGroup>
13
13
 
14
- ## Features
15
-
16
- <Info title="Full API Access">
17
- Our API provides complete access to all platform features with comprehensive documentation.
18
- </Info>
14
+ ## Getting Started
19
15
 
20
16
  <Steps>
21
- <Step title="Install the SDK">
22
- Install our SDK using your preferred package manager.
17
+ <Step title="Installation">
18
+ Install the package using your preferred package manager.
23
19
  </Step>
24
- <Step title="Configure authentication">
25
- Set up your API keys and configure authentication.
20
+ <Step title="Configuration">
21
+ Set up your configuration and credentials.
26
22
  </Step>
27
- <Step title="Make your first request">
28
- Start making API calls to our endpoints.
23
+ <Step title="First Steps">
24
+ Start using the library in your project.
29
25
  </Step>
30
26
  </Steps>
31
27
 
@@ -34,8 +30,8 @@ Welcome to the API documentation. This guide will help you get started with inte
34
30
  <CodeGroup>
35
31
 
36
32
  ```typescript
37
- // TypeScript
38
- import { Client } from 'your-sdk'
33
+ // TypeScript example
34
+ import { Client } from 'your-package'
39
35
 
40
36
  const client = new Client({
41
37
  apiKey: process.env.API_KEY
@@ -45,8 +41,8 @@ const result = await client.getData()
45
41
  ```
46
42
 
47
43
  ```python
48
- # Python
49
- from your_sdk import Client
44
+ # Python example
45
+ from your_package import Client
50
46
 
51
47
  client = Client(api_key=os.environ["API_KEY"])
52
48
 
@@ -55,13 +51,13 @@ result = client.get_data()
55
51
 
56
52
  </CodeGroup>
57
53
 
58
- ## FAQ
54
+ ## Need Help?
59
55
 
60
56
  <AccordionGroup>
61
- <Accordion title="How do I get an API key?">
62
- You can generate an API key from your dashboard. Navigate to Settings → API Keys and click "Create New Key".
57
+ <Accordion title="Where can I get support?">
58
+ Check the GitHub repository for issues and discussions.
63
59
  </Accordion>
64
- <Accordion title="What are the rate limits?">
65
- Free tier: 100 requests/minute. Pro tier: 1000 requests/minute. Enterprise: Unlimited.
60
+ <Accordion title="How do I report bugs?">
61
+ Open an issue on GitHub with reproduction steps.
66
62
  </Accordion>
67
63
  </AccordionGroup>
@@ -1,11 +1,21 @@
1
1
  import Link from 'next/link'
2
+ import { readFileSync } from 'fs'
3
+ import { join } from 'path'
4
+
5
+ function getDocsConfig() {
6
+ const configPath = join(process.cwd(), 'docs.json')
7
+ const content = readFileSync(configPath, 'utf-8')
8
+ return JSON.parse(content)
9
+ }
2
10
 
3
11
  export default function Home() {
12
+ const docsConfig = getDocsConfig()
13
+
4
14
  return (
5
15
  <main className="min-h-screen flex flex-col items-center justify-center p-8">
6
- <h1 className="text-4xl font-bold mb-4">API Documentation</h1>
16
+ <h1 className="text-4xl font-bold mb-4">{docsConfig.name} Documentation</h1>
7
17
  <p className="text-[var(--color-text-secondary)] mb-8 text-center max-w-xl">
8
- Welcome to the API documentation. Browse the docs to learn how to integrate with our API.
18
+ {docsConfig.description}
9
19
  </p>
10
20
  <Link
11
21
  href="/docs"
@@ -26,9 +26,9 @@ export function Card({ title, icon, href, children }: CardProps) {
26
26
  <div>
27
27
  <h3 className="font-medium text-[var(--color-text)]">{title}</h3>
28
28
  {children && (
29
- <p className="mt-1 text-sm text-[var(--color-text-secondary)]">
29
+ <div className="mt-1 text-sm text-[var(--color-text-secondary)]">
30
30
  {children}
31
- </p>
31
+ </div>
32
32
  )}
33
33
  </div>
34
34
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skrypt-ai",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "AI-powered documentation generator with code examples",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",