@vk007/autocli 0.1.0

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/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@vk007/autocli",
3
+ "version": "0.1.0",
4
+ "description": "Terminal automation toolkit for developers and AI agents across LLMs, social platforms, developer tools, editors, data tools, and public utilities.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/vkop007/autocli.git"
10
+ },
11
+ "homepage": "https://github.com/vkop007/autocli#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/vkop007/autocli/issues"
14
+ },
15
+ "packageManager": "bun@1.3.6",
16
+ "keywords": [
17
+ "bun",
18
+ "cli",
19
+ "automation",
20
+ "instagram",
21
+ "twitter",
22
+ "x"
23
+ ],
24
+ "bin": {
25
+ "autocli": "./dist/index.js"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "README.md",
30
+ "skills"
31
+ ],
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "engines": {
36
+ "bun": ">=1.3.0",
37
+ "node": ">=20.11.0"
38
+ },
39
+ "scripts": {
40
+ "dev": "bun run src/index.ts",
41
+ "dev:watch": "bun run --watch src/index.ts",
42
+ "start": "bun run src/index.ts",
43
+ "prepare": "bun run build",
44
+ "prepublishOnly": "bun run typecheck && bun test && bun run build",
45
+ "link:global": "bun run scripts/link-global.ts",
46
+ "typecheck": "tsc --noEmit",
47
+ "build": "bun build --target=node --format=esm --external tlsclientwrapper --external playwright-core --outdir dist ./src/index.ts",
48
+ "build:bin": "bun build --compile --target=bun --external playwright-core --outfile bin/autocli ./src/index.ts",
49
+ "test": "bun test"
50
+ },
51
+ "dependencies": {
52
+ "@whiskeysockets/baileys": "^7.0.0-rc.9",
53
+ "commander": "^14.0.3",
54
+ "csv-parse": "^6.2.1",
55
+ "csv-stringify": "^6.7.0",
56
+ "fast-xml-parser": "^5.5.9",
57
+ "fetch-cookie": "^3.2.0",
58
+ "marked": "^17.0.5",
59
+ "open-location-code": "^1.0.3",
60
+ "ora": "^9.3.0",
61
+ "pdf-lib": "^1.17.1",
62
+ "picocolors": "^1.1.1",
63
+ "playwright-core": "^1.58.2",
64
+ "qrcode-terminal": "^0.12.0",
65
+ "telegram": "^2.26.22",
66
+ "tlsclientwrapper": "^4.2.0",
67
+ "tough-cookie": "^6.0.1",
68
+ "turndown": "^7.2.2",
69
+ "ws": "^8.20.0",
70
+ "yaml": "^2.8.3",
71
+ "zod": "^4.3.6"
72
+ },
73
+ "devDependencies": {
74
+ "@types/node": "^24.10.1",
75
+ "@types/turndown": "^5.0.6",
76
+ "@types/ws": "^8.18.1",
77
+ "bun-types": "^1.3.11",
78
+ "typescript": "^5.9.3"
79
+ },
80
+ "trustedDependencies": [
81
+ "koffi"
82
+ ]
83
+ }
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: autocli
3
+ description: Use when a task can be completed through the AutoCLI command line instead of custom scripts. Helps agents choose the right category and provider, prefer --json output, use shared browser login or saved sessions safely, inspect health with status/doctor/sessions, and use session-aware tools like tools http before inventing custom web automation.
4
+ ---
5
+
6
+ # AutoCLI
7
+
8
+ Use this skill when the task maps to an existing AutoCLI provider or when you need to operate the AutoCLI repository itself.
9
+
10
+ ## Quick Rules
11
+
12
+ - Always use category-based commands: `autocli <category> <provider> ...`
13
+ - Prefer `--json` for agent work unless the user explicitly wants human-readable output.
14
+ - If auth state is unclear, start with `autocli status --json` or `autocli doctor --json`.
15
+ - Check saved sessions with `autocli sessions --json` before asking for a fresh cookie export or token.
16
+ - Use `autocli <category> <provider> capabilities --json` when you need to confirm auth type, stability, browser support, or read/write boundaries before planning a task.
17
+ - Prefer providers whose `capabilities --json` report `stability: stable` when you have multiple valid options.
18
+ - For cookie-backed providers, prefer `autocli login --browser` and then `<provider> login --browser` when manual cookie export would be awkward.
19
+ - Use `autocli tools http <provider-or-domain> inspect|request|capture` when a saved web session exists but the exact provider command is missing or unclear.
20
+ - For risky actions, read or list first, then mutate second.
21
+ - Use `autocli <category> --help` and `autocli <category> <provider> --help` before assuming subcommands.
22
+ - Some web-session providers are partial. If a route feels limited, consult the repo `README.md` support notes and the provider help text.
23
+
24
+ ## Core Workflow
25
+
26
+ 1. Map the task to a category. If unsure, read [references/category-map.md](references/category-map.md).
27
+ 2. Confirm whether the provider is public, cookie-backed, session-backed, API-token-based, bot-token-based, or local-tool-based.
28
+ 3. If the provider is unfamiliar or risky, run `capabilities --json` before acting.
29
+ 4. If the provider needs auth and no saved session exists, run `login` first.
30
+ 5. For cookie-backed providers, choose the cleanest auth path:
31
+ - `login --browser` when the user can sign in interactively
32
+ - `login --cookies ...` when they already have an export
33
+ 6. Prefer discovery commands like `search`, `me`, `profile`, `status`, `page`, `title`, `posts`, `spaces`, `projects`, `services`, or `apps` before write commands.
34
+ 7. When you need to pass results to another command, use `--json` and route through `autocli data ...` if transformation is needed.
35
+ 8. If the provider is authenticated but the exact action is not modeled yet, try `autocli tools http ...` before reaching for custom curl or browser automation.
36
+
37
+ ## Result Conventions
38
+
39
+ - Many list-style commands expose a stable `data.items` alias even if the native provider key is `repos`, `projects`, `posts`, or something else.
40
+ - Many singular reads expose a stable `data.entity` alias even if the native provider key is `profile`, `page`, `movie`, or `project`.
41
+ - `data.meta.count` and `data.meta.listKey` give a quick summary for list results.
42
+ - `data.guidance.recommendedNextCommand` and `data.guidance.nextCommands` are safe follow-up hints the agent should prefer over guessing.
43
+
44
+ ## Global Commands
45
+
46
+ - `autocli login --browser`
47
+ - `autocli status --json`
48
+ - `autocli doctor --json`
49
+ - `autocli sessions --json`
50
+ - `autocli sessions show <platform> <account> --json`
51
+ - `autocli <category> <provider> capabilities --json`
52
+
53
+ ## High-Value Patterns
54
+
55
+ - Use `login --browser` once to bootstrap the shared AutoCLI browser profile, then reuse it for later cookie-backed logins.
56
+ - Use `capabilities --json` to let the agent verify support level before it attempts mutations or browser fallbacks.
57
+ - Treat provider help as machine guidance too: `--help` now includes a generated `Quick Start`, `Support Profile`, and `Stability Guide`.
58
+ - Use `tools` and `data` as glue around other providers.
59
+ - Use `tools http` to inspect saved web sessions, replay authenticated requests, and capture logged-in traffic from the shared browser.
60
+ - Use `editor` for local transformations before upload or posting.
61
+ - Use `news`, `movie`, `music`, `maps`, `finance`, and many `tools` providers for public lookup tasks with no login step.
62
+ - Use `developer`, `social`, `llm`, `shopping`, `devops`, and some `music` providers when the task needs an account-backed action.
63
+
64
+ ## Common Examples
65
+
66
+ ```bash
67
+ autocli login --browser
68
+ autocli developer github capabilities --json
69
+ autocli developer github login --browser
70
+ autocli developer github me --json
71
+ autocli social reddit search "bun cli" --json
72
+ autocli devops render services --json
73
+ autocli tools http github inspect --json
74
+ autocli tools page-links https://example.com --type external --json
75
+ autocli data json query '{"items":[{"title":"AutoCLI"}]}' 'items[0].title'
76
+ autocli editor image resize ./photo.png --width 1200
77
+ ```
78
+
79
+ ## Failure Recovery
80
+
81
+ - If a login-based provider fails unexpectedly, run `autocli sessions --json` and `autocli doctor --json`.
82
+ - If a cookie-backed provider says the session expired, re-login with `login --browser` or re-import cookies with `login --cookies ...`.
83
+ - If a site works in the shared browser but not through its modeled provider commands yet, use `autocli tools http <provider-or-domain> inspect` or `capture`.
84
+ - If a command depends on local binaries, `doctor` will show missing tools such as `ffmpeg`, `qpdf`, `tesseract`, or other local dependencies.
85
+ - If a provider exposes async media jobs, prefer its `status`, `wait`, `download`, or `cancel` subcommands instead of polling manually.
86
+
87
+ ## When To Read More
88
+
89
+ - Read [references/category-map.md](references/category-map.md) when you need a quick category/provider chooser, auth hint, or example command pattern.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "AutoCLI"
3
+ short_description: "Use AutoCLI providers, browser login, and session-aware tools correctly"
4
+ default_prompt: "Use $autocli to choose the right AutoCLI category and provider, check provider capabilities before risky actions, prefer --json for agent work, use shared browser login or saved sessions safely, and fall back to tools http when a logged-in web action is not fully modeled yet."
5
+
6
+ policy:
7
+ allow_implicit_invocation: true
@@ -0,0 +1,53 @@
1
+ # AutoCLI Category Map
2
+
3
+ Use this file when you need to choose the right AutoCLI surface quickly.
4
+
5
+ ## Global Commands
6
+
7
+ - `login --browser`: open AutoCLI's shared browser profile for interactive sign-in
8
+ - `status`: summary of CLI and connection health
9
+ - `doctor`: environment checks, saved sessions, and missing binaries
10
+ - `sessions`: inspect or remove saved connections
11
+ - `<category> <provider> capabilities`: machine-readable provider support metadata
12
+
13
+ ## Categories
14
+
15
+ | Category | Use it for | Representative providers | Typical commands |
16
+ | --- | --- | --- | --- |
17
+ | `llm` | prompting and generation | `chatgpt`, `gemini`, `grok`, `mistral`, `perplexity`, `qwen` | `login`, `status`, `text`, `image`, `video` |
18
+ | `social` | posting, profile lookup, messaging, public social reads | `x`, `instagram`, `reddit`, `bluesky`, `mastodon`, `telegram`, `whatsapp`, `youtube` | `login`, `me`, `profile`, `posts`, `thread`, `post`, `comment`, `send` |
19
+ | `developer` | code hosting, docs, issues, workspace tools | `github`, `gitlab`, `jira`, `linear`, `trello`, `confluence`, `notion` | `login`, `me`, `projects`, `issues`, `page`, `search` |
20
+ | `devops` | infrastructure, deploys, DNS, and platform operations | `cloudflare`, `vercel`, `supabase`, `render`, `railway`, `netlify`, `digitalocean`, `fly` | `login`, `me`, `zones`, `projects`, `services`, `apps`, `deployments` |
21
+ | `editor` | local file and media editing | `image`, `video`, `audio`, `pdf`, `document`, `subtitle`, `gif`, `archive` | `info`, `convert`, `resize`, `split`, `watermark`, `ocr` |
22
+ | `data` | structured data cleanup and transformation | `json`, `csv`, `yaml`, `xml`, `html`, `markdown`, `text` | `format`, `query`, `to-json`, `filter`, `text`, `replace` |
23
+ | `tools` | public utilities, session-aware HTTP inspection, and web helpers | `http`, `websearch`, `translate`, `page-links`, `favicon`, `headers`, `rss`, `timezone` | `inspect`, `capture`, `request`, and other lookup-style commands |
24
+ | `news` | public headline and feed discovery | `news` | `top`, `search`, `sources`, `feed` |
25
+ | `maps` | geocoding, routing, geometry | `openstreetmap`, `osrm`, `geo` | `search`, `reverse`, `route`, `distance`, `elevation` |
26
+ | `finance` | market and forex lookups | `stocks`, `crypto`, `currency` | quote and conversion commands |
27
+ | `movie` | title lookup, recommendations, streaming availability | `tmdb`, `imdb`, `letterboxd`, `justwatch`, `anilist` | `search`, `title`, `recommendations`, `trending` |
28
+ | `music` | music discovery and playback surfaces | `soundcloud`, `bandcamp`, `deezer`, `spotify`, `youtube-music` | `search`, `track`, `album`, `playlist`, playback controls |
29
+ | `shopping` | product discovery and account shopping actions | `amazon`, `ebay`, `etsy`, `flipkart` | `search`, `product`, `cart`, `orders` |
30
+ | `bot` | bot-token messaging and chat ops | `telegrambot`, `discordbot`, `slackbot`, `githubbot` | `login`, `send`, `channels`, `issues` |
31
+
32
+ ## Auth Expectations
33
+
34
+ | Needs | Meaning |
35
+ | --- | --- |
36
+ | `none` | Public or local functionality |
37
+ | `cookies` | Use `login --cookies ...` or `login --browser` for a saved web session |
38
+ | `cookies + local token` | Cookie-backed session plus a token stored in site storage |
39
+ | `session` | Do one interactive login once, then reuse the saved user session |
40
+ | `api token` | Save a personal or service token once with `login --token ...` |
41
+ | `bot token` | Save a bot token once with `login --token ...` |
42
+ | `local tools` | Requires binaries like `ffmpeg`, `qpdf`, or `tesseract` |
43
+
44
+ ## Safe Agent Defaults
45
+
46
+ - Use `--json` unless the user clearly wants formatted terminal output.
47
+ - Prefer read-only commands before mutations.
48
+ - Use `capabilities --json` before risky or unfamiliar provider actions so the agent can see auth type, stability, browser support, and read/write boundaries.
49
+ - Use `doctor` and `sessions` before assuming auth is broken.
50
+ - If the user can sign in interactively, prefer `autocli login --browser` and then the provider's `login --browser`.
51
+ - If a provider is authenticated but missing a modeled action, try `autocli tools http <provider-or-domain> inspect` before inventing custom automation.
52
+ - For nested help, use `autocli <category> --help` then `autocli <category> <provider> --help`.
53
+ - Do not use flat legacy forms like `autocli github ...` or `autocli chatgpt ...`.