@agentoctopus/cli 0.1.0 → 0.1.1
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 +80 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# @agentoctopus/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for AgentOctopus — route natural language queries to skills from your terminal.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @agentoctopus/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Ask a question
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
octopus ask "translate hello to French"
|
|
17
|
+
# → Bonjour
|
|
18
|
+
|
|
19
|
+
octopus ask "what's the weather in Tokyo?"
|
|
20
|
+
# → Tokyo: ⛅ Partly cloudy, 18°C, Humidity: 72%, Wind: 14km/h
|
|
21
|
+
|
|
22
|
+
octopus ask "look up 8.8.8.8"
|
|
23
|
+
# → IP: 8.8.8.8 | Google LLC | US, United States
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After each answer, you'll be prompted for feedback (`y`/`n`) which is used to rank skills over time.
|
|
27
|
+
|
|
28
|
+
### List available skills
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
octopus list
|
|
32
|
+
# NAME DESCRIPTION RATING USES
|
|
33
|
+
# translation Translate text between languages 4.8 12
|
|
34
|
+
# weather Get current weather for any city 4.5 7
|
|
35
|
+
# ip-lookup Look up IP address or domain info 4.0 3
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Configuration
|
|
39
|
+
|
|
40
|
+
Create a `.env` file in your working directory (or set environment variables):
|
|
41
|
+
|
|
42
|
+
```env
|
|
43
|
+
LLM_PROVIDER=openai # openai | gemini | ollama
|
|
44
|
+
LLM_MODEL=gpt-4o-mini
|
|
45
|
+
OPENAI_API_KEY=sk-...
|
|
46
|
+
OPENAI_BASE_URL= # optional, for compatible endpoints
|
|
47
|
+
|
|
48
|
+
EMBED_PROVIDER=openai
|
|
49
|
+
EMBED_MODEL=text-embedding-3-small
|
|
50
|
+
EMBED_API_KEY=
|
|
51
|
+
EMBED_BASE_URL=
|
|
52
|
+
|
|
53
|
+
REGISTRY_PATH=./registry/skills # path to your skill manifests
|
|
54
|
+
RATINGS_PATH=./registry/ratings.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Adding custom skills
|
|
58
|
+
|
|
59
|
+
Point `REGISTRY_PATH` at a folder of `SKILL.md` files:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
---
|
|
63
|
+
name: my-skill
|
|
64
|
+
description: What this skill does and when to use it.
|
|
65
|
+
tags: [tag1, tag2]
|
|
66
|
+
version: 1.0.0
|
|
67
|
+
endpoint: https://api.example.com/invoke
|
|
68
|
+
adapter: http
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Instructions
|
|
72
|
+
|
|
73
|
+
Detailed instructions for the LLM on how/when to invoke this skill.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
See [`@agentoctopus/registry`](https://www.npmjs.com/package/@agentoctopus/registry) for the full skill manifest format.
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
Apache 2.0
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentoctopus/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "AgentOctopus CLI — route natural language queries to skills via `octopus ask`",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"octopus": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
+
"README.md",
|
|
10
11
|
"dist"
|
|
11
12
|
],
|
|
12
13
|
"dependencies": {
|
|
@@ -15,8 +16,8 @@
|
|
|
15
16
|
"ora": "^8.0.1",
|
|
16
17
|
"dotenv": "^16.4.0",
|
|
17
18
|
"readline": "^1.3.0",
|
|
18
|
-
"@agentoctopus/core": "0.1.
|
|
19
|
-
"@agentoctopus/registry": "0.1.
|
|
19
|
+
"@agentoctopus/core": "0.1.1",
|
|
20
|
+
"@agentoctopus/registry": "0.1.1"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@types/node": "^20.12.0",
|