@castari/cli 0.1.0 → 0.1.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/README.md CHANGED
@@ -101,7 +101,7 @@ Create a `.env` file in your project:
101
101
  ```env
102
102
  ANTHROPIC_API_KEY=sk-ant-...
103
103
  CASTARI_CLIENT_ID=your-client-id
104
- # CASTARI_PLATFORM_URL=https://api.castari.com
104
+ # CASTARI_PLATFORM_URL=https://castari-api-12511-04c55b73-g4p2s9om.onporter.run
105
105
  ```
106
106
 
107
107
  ### package.json
@@ -41,7 +41,7 @@ export async function deploy(options) {
41
41
  });
42
42
  const zipBuffer = zip.toBuffer();
43
43
  console.log(chalk.blue(`🚀 Uploading to Castari Platform...`));
44
- const platformUrl = process.env.CASTARI_PLATFORM_URL || 'http://localhost:3000';
44
+ const platformUrl = process.env.CASTARI_PLATFORM_URL || 'https://castari-api-12511-04c55b73-g4p2s9om.onporter.run';
45
45
  const formData = new FormData();
46
46
  formData.append('file', new Blob([zipBuffer]), 'source.zip');
47
47
  formData.append('snapshot', snapshotName);
@@ -3,7 +3,7 @@ import inquirer from 'inquirer';
3
3
  import chalk from 'chalk';
4
4
  import { saveClientAuth } from '../utils/client-auth';
5
5
  export async function generateClientId() {
6
- const platformUrl = process.env.CASTARI_PLATFORM_URL || 'http://localhost:3000';
6
+ const platformUrl = process.env.CASTARI_PLATFORM_URL || 'https://castari-api-12511-04c55b73-g4p2s9om.onporter.run';
7
7
  const mintOnline = async () => {
8
8
  try {
9
9
  const res = await fetch(`${platformUrl}/client-ids`, { method: 'POST' });
@@ -64,7 +64,7 @@ serve({
64
64
  systemPrompt: 'You are a helpful Castari agent.',
65
65
  })
66
66
  `;
67
- const envExample = `ANTHROPIC_API_KEY=sk-ant-...\nCASTARI_CLIENT_ID=your-client-id\nCASTARI_API_KEY=castari_your-api-key\n# CASTARI_PLATFORM_URL=https://api.castari.com\n`;
67
+ const envExample = `ANTHROPIC_API_KEY=sk-ant-...\nCASTARI_CLIENT_ID=your-client-id\nCASTARI_API_KEY=castari_your-api-key\n# CASTARI_PLATFORM_URL=https://castari-api-12511-04c55b73-g4p2s9om.onporter.run\n`;
68
68
  await writeFile('package.json', JSON.stringify(packageJson, null, 2));
69
69
  await writeFile('tsconfig.json', JSON.stringify(tsConfig, null, 2));
70
70
  await writeFile('.env.example', envExample);
@@ -110,7 +110,7 @@ async function initDemo() {
110
110
  },
111
111
  include: ['src'],
112
112
  });
113
- await writeFile(join(agentDir, '.env.example'), 'ANTHROPIC_API_KEY=sk-ant-...\nCASTARI_CLIENT_ID=your-client-id\nCASTARI_API_KEY=castari_your-api-key\n# CASTARI_PLATFORM_URL=http://localhost:3000\n');
113
+ await writeFile(join(agentDir, '.env.example'), 'ANTHROPIC_API_KEY=sk-ant-...\nCASTARI_CLIENT_ID=your-client-id\nCASTARI_API_KEY=castari_your-api-key\n# CASTARI_PLATFORM_URL=https://castari-api-12511-04c55b73-g4p2s9om.onporter.run\n');
114
114
  await writeFile(join(agentDir, 'src', 'agent.ts'), `import { serve } from '@castari/sdk'
115
115
 
116
116
  serve({
@@ -187,7 +187,7 @@ const nextConfig = {
187
187
 
188
188
  export default nextConfig
189
189
  `);
190
- await writeFile(join(webDir, '.env.example'), 'ANTHROPIC_API_KEY=sk-ant-...\nCASTARI_CLIENT_ID=your-client-id\nCASTARI_API_KEY=castari_your-api-key\n# CASTARI_PLATFORM_URL=http://localhost:3000\n# CASTARI_DEBUG=false\n');
190
+ await writeFile(join(webDir, '.env.example'), 'ANTHROPIC_API_KEY=sk-ant-...\nCASTARI_CLIENT_ID=your-client-id\nCASTARI_API_KEY=castari_your-api-key\n# CASTARI_PLATFORM_URL=https://castari-api-12511-04c55b73-g4p2s9om.onporter.run\n# CASTARI_DEBUG=false\n');
191
191
  await writeFile(join(webDir, 'app', 'globals.css'), `:root {
192
192
  color-scheme: dark;
193
193
  --bg: #131418;
package/dist/index.js CHANGED
@@ -5,6 +5,9 @@ import { deploy } from './commands/deploy';
5
5
  import { start } from './commands/start';
6
6
  import { dev } from './commands/dev';
7
7
  import { generateClientId } from './commands/generate-client-id';
8
+ import { createRequire } from 'module';
9
+ const require = createRequire(import.meta.url);
10
+ const { version } = require('../package.json');
8
11
  const cli = cac('castari');
9
12
  cli
10
13
  .command('init', 'Initialize a new Castari agent project')
@@ -27,5 +30,5 @@ cli
27
30
  .command('generate-client-id', 'Generate a new Castari Client ID and save it locally')
28
31
  .action(generateClientId);
29
32
  cli.help();
30
- cli.version('0.0.7');
33
+ cli.version(version);
31
34
  cli.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castari/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "castari": "./dist/index.js"
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@anthropic-ai/claude-agent-sdk": "^0.1.44",
21
- "@castari/sdk": "^0.1.0",
21
+ "@castari/sdk": "^0.1.1",
22
22
  "adm-zip": "^0.5.16",
23
23
  "cac": "^6.7.14",
24
24
  "chalk": "^5.3.0",
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/adm-zip": "^0.5.7",
31
+ "@types/bun": "^1.3.3",
31
32
  "@types/form-data": "^2.5.2",
32
33
  "@types/inquirer": "^9.0.7",
33
34
  "@types/node": "^20.10.0",