skillfree 0.1.24 → 0.1.29

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/bin/skillfree.js CHANGED
@@ -25,13 +25,6 @@ auth
25
25
  const { authSave } = require('../scripts/commands/auth')
26
26
  await authSave(apiKey)
27
27
  })
28
- auth
29
- .command('save <apiKey>')
30
- .description('直接保存 API Key(供安装脚本调用)')
31
- .action(async (apiKey) => {
32
- const { authSave } = require('../scripts/commands/auth')
33
- await authSave(apiKey)
34
- })
35
28
  auth
36
29
  .command('status')
37
30
  .description('查看当前登录状态和积分')
@@ -152,4 +145,21 @@ program
152
145
  }
153
146
  })
154
147
 
148
+ // ── update ────────────────────────────────────────────────────────────────────
149
+ program
150
+ .command('update')
151
+ .description('更新 skillfree 到最新版本')
152
+ .action(async () => {
153
+ const { execSync } = require('child_process')
154
+ console.log('🔄 正在更新 skillfree...')
155
+ try {
156
+ execSync('npm install -g skillfree@latest', { stdio: 'inherit' })
157
+ const newPkg = JSON.parse(require('fs').readFileSync(require.resolve('skillfree/package.json'), 'utf8'))
158
+ console.log(`✅ 更新成功,当前版本:v${newPkg.version}`)
159
+ } catch (e) {
160
+ console.error('❌ 更新失败,请手动执行:npm install -g skillfree@latest')
161
+ process.exit(1)
162
+ }
163
+ })
164
+
155
165
  program.parse(process.argv)
package/install.sh CHANGED
@@ -130,15 +130,32 @@ fi
130
130
  echo ""
131
131
  echo -e " ${DIM}────────────────────────────────────────────────────${NC}"
132
132
  echo ""
133
- echo -e "${BOLD_GREEN} 🎉 全部搞定!开始召唤龙虾吧${NC}"
133
+ echo -e "${BOLD_GREEN} 🎉 全部搞定!现在你可以直接用自然语言让 SkillFree 干活${NC}"
134
134
  echo ""
135
- echo -e " ${BOLD}快速体验:${NC}"
136
- echo -e " ${CYAN} $ skillfree pilot --type chat --prompt \"你好\"${NC}"
137
- echo -e " ${CYAN} $ skillfree pilot --type image --prompt \"赛博朋克的上海\" --output ./img.png${NC}"
138
- echo -e " ${CYAN} $ skillfree pilot --type search --prompt \"今天的 AI 新闻\"${NC}"
135
+ echo -e " ${BOLD}不要先研究命令,先直接抄下面这些:${NC}"
139
136
  echo ""
140
- echo -e " ${DIM} skillfree models # 查看所有模型${NC}"
141
- echo -e " ${DIM} skillfree credits # 查看积分余额${NC}"
137
+ echo -e " ${CYAN} 做一个网站:${NC}"
138
+ echo -e " ${CYAN} $ skillfree chat \"帮我做一个极简风 SaaS 官网,包含首页文案、功能区块、价格表、FAQ,并输出完整 HTML + CSS + JS\"${NC}"
139
+ echo ""
140
+ echo -e " ${CYAN} 做一个短视频脚本:${NC}"
141
+ echo -e " ${CYAN} $ skillfree chat \"帮我写一个 60 秒短视频脚本,主题是 AI 如何帮助中小企业降本增效,要有开场钩子、正文、结尾 CTA\"${NC}"
142
+ echo ""
143
+ echo -e " ${CYAN} 生成一张配图:${NC}"
144
+ echo -e " ${CYAN} $ skillfree pilot --type image --prompt \"科技感蓝紫色 AI 工作台插画,适合官网头图\" --output ./hero.png${NC}"
145
+ echo ""
146
+ echo -e " ${CYAN} 做一个视频:${NC}"
147
+ echo -e " ${CYAN} $ skillfree pilot --type video --model paiwo-v5.6-ttv --prompt \"一只未来感龙虾在霓虹都市中行走,电影感运镜,8秒\" --output ./video.mp4${NC}"
148
+ echo ""
149
+ echo -e " ${CYAN} 做一段中文配音:${NC}"
150
+ echo -e " ${CYAN} $ skillfree pilot --type tts --model speech-2.8-hd --text \"欢迎来到 SkillFree,现在开始你的 AI 创作之旅。\" --output ./voice.mp3${NC}"
151
+ echo ""
152
+ echo -e " ${CYAN} 查今天 AI 新闻:${NC}"
153
+ echo -e " ${CYAN} $ skillfree pilot --type search --prompt \"今天最重要的 AI 新闻,帮我总结成 5 条\"${NC}"
154
+ echo ""
155
+ echo -e " ${DIM}更多能力:${NC}"
156
+ echo -e " ${DIM} skillfree models # 查看全部模型${NC}"
157
+ echo -e " ${DIM} skillfree balance # 查看积分余额${NC}"
158
+ echo -e " ${DIM} skillfree auth status # 查看登录状态${NC}"
142
159
  echo ""
143
160
  echo -e " ${DIM}充值积分:${NC}${CYAN}https://skillfree.tech/app/topup${NC}"
144
161
  echo ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillfree",
3
- "version": "0.1.24",
3
+ "version": "0.1.29",
4
4
  "description": "🦞 一个 API,满足所有龙虾技能需求",
5
5
  "main": "bin/skillfree.js",
6
6
  "bin": {
@@ -59,6 +59,33 @@ function injectToOpenclaw(apiKey) {
59
59
  }
60
60
  }
61
61
 
62
+ function printQuickExamples() {
63
+ console.log(`\n现在不要先研究参数,直接抄下面这些就能开始:`)
64
+ console.log(``)
65
+ console.log(`做一个网站:`)
66
+ console.log(` skillfree chat "帮我做一个极简风 SaaS 官网,包含首页文案、功能区块、价格表、FAQ,并输出完整 HTML + CSS + JS"`)
67
+ console.log(``)
68
+ console.log(`写一个短视频脚本:`)
69
+ console.log(` skillfree chat "帮我写一个 60 秒短视频脚本,主题是 AI 如何帮助中小企业降本增效,要有开场钩子、正文、结尾 CTA"`)
70
+ console.log(``)
71
+ console.log(`生成一张官网头图:`)
72
+ console.log(` skillfree pilot --type image --prompt "科技感蓝紫色 AI 工作台插画,适合官网头图" --output ./hero.png`)
73
+ console.log(``)
74
+ console.log(`做一个视频:`)
75
+ console.log(` skillfree pilot --type video --model paiwo-v5.6-ttv --prompt "一只未来感龙虾在霓虹都市中行走,电影感运镜,8秒" --output ./video.mp4`)
76
+ console.log(``)
77
+ console.log(`做一段中文配音:`)
78
+ console.log(` skillfree pilot --type tts --model speech-2.8-hd --text "欢迎来到 SkillFree,现在开始你的 AI 创作之旅。" --output ./voice.mp3`)
79
+ console.log(``)
80
+ console.log(`查今天 AI 新闻:`)
81
+ console.log(` skillfree pilot --type search --prompt "今天最重要的 AI 新闻,帮我总结成 5 条"`)
82
+ console.log(``)
83
+ console.log(`更多命令:`)
84
+ console.log(` skillfree models`)
85
+ console.log(` skillfree balance`)
86
+ console.log(` skillfree auth status`)
87
+ }
88
+
62
89
  async function authLogin() {
63
90
  console.log(`\n🦞 SkillFree 登录`)
64
91
  console.log(` 还没有账号?前往注册:${BASE_URL}/app`)
@@ -98,10 +125,7 @@ async function authLogin() {
98
125
  injectToOpenclaw(key)
99
126
  console.log(` ✅\n`)
100
127
  console.log(`🎉 登录成功!当前积分:${data.credits}`)
101
- console.log(`\n快速开始:`)
102
- console.log(` skillfree pilot --type chat --model DeepSeek-V3.2-Fast --prompt "你好"`)
103
- console.log(` skillfree pilot --type chat --model claude-sonnet-4-6 --prompt "你好"`)
104
- console.log(` skillfree models # 查看所有可用模型`)
128
+ printQuickExamples()
105
129
  success = true
106
130
  } catch (e) {
107
131
  console.log(` ❌`)
@@ -120,22 +144,7 @@ async function authSave(apiKey) {
120
144
  saveConfig({ apiKey })
121
145
  injectToOpenclaw(apiKey)
122
146
  console.log(`\n🎉 登录成功!`)
123
- console.log(`\n快速开始:`)
124
- console.log(` skillfree pilot --type chat --prompt "你好"`)
125
- console.log(` skillfree models # 查看所有可用模型`)
126
- }
127
-
128
- async function authSave(apiKey) {
129
- if (!apiKey || !apiKey.startsWith('sk-sf-')) {
130
- console.error('❌ Key 格式不正确')
131
- process.exit(1)
132
- }
133
- saveConfig({ apiKey })
134
- injectToOpenclaw(apiKey)
135
- console.log(`\n🎉 登录成功!`)
136
- console.log(`\n快速开始:`)
137
- console.log(` skillfree pilot --type chat --prompt "你好"`)
138
- console.log(` skillfree models # 查看所有可用模型`)
147
+ printQuickExamples()
139
148
  }
140
149
 
141
150
  async function authStatus() {