{"id":45168991,"url":"https://github.com/mintplex-labs/anything-llm-cli","last_synced_at":"2026-02-25T02:00:42.717Z","repository":{"id":339467857,"uuid":"1161321828","full_name":"Mintplex-Labs/anything-llm-cli","owner":"Mintplex-Labs","description":"Interact with your instance of AnythingLLM from the terminal.","archived":false,"fork":false,"pushed_at":"2026-02-22T22:32:52.000Z","size":65,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T05:36:32.606Z","etag":null,"topics":["agent","ai","anythingllm","artificial-intelligence","chatbot","cli","llm","llms"],"latest_commit_sha":null,"homepage":"https://anythingllm.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mintplex-Labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T01:15:25.000Z","updated_at":"2026-02-22T22:33:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Mintplex-Labs/anything-llm-cli","commit_stats":null,"previous_names":["mintplex-labs/anything-llm-cli"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/Mintplex-Labs/anything-llm-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mintplex-Labs%2Fanything-llm-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mintplex-Labs%2Fanything-llm-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mintplex-Labs%2Fanything-llm-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mintplex-Labs%2Fanything-llm-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mintplex-Labs","download_url":"https://codeload.github.com/Mintplex-Labs/anything-llm-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mintplex-Labs%2Fanything-llm-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29808860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T22:43:48.403Z","status":"online","status_checked_at":"2026-02-25T02:00:07.329Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","anythingllm","artificial-intelligence","chatbot","cli","llm","llms"],"created_at":"2026-02-20T08:00:19.517Z","updated_at":"2026-02-25T02:00:42.672Z","avatar_url":"https://github.com/Mintplex-Labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AnythingLLM CLI\n\nA fast, lightweight command-line interface for chatting with your [AnythingLLM](https://anythingllm.com) instance directly from the terminal. Pipe in context, stream responses, and manage conversations — all without leaving your shell.\n\n```\n╔════════════════════════════════════════════════════════════════╗\n║                                                                ║\n║  █████  ███   ██ ██   ██ ████████ ██  ██ ██ ███   ██  ██████  ║\n║ ██   ██ ████  ██  ██ ██     ██    ██  ██ ██ ████  ██ ██       ║\n║ ███████ ██ ██ ██   ████     ██    █████  ██ ██ ██ ██ ██  ███  ║\n║ ██   ██ ██  ████    ██      ██    ██  ██ ██ ██  ████ ██   ██  ║\n║ ██   ██ ██   ███    ██      ██    ██  ██ ██ ██   ███  ██████  ║\n║                                                                ║\n║                    ██      ██      ██   ██                     ║\n║                    ██      ██      ███ ███                     ║\n║                    ██      ██      ██ █ ██                     ║\n║                    ██      ██      ██   ██                     ║\n║                    ███████ ███████ ██   ██                     ║\n║                                                                ║\n║    ✦ Chat with your AnythingLLM instance from the terminal ✦   ║\n║                                                                ║\n╚════════════════════════════════════════════════════════════════╝\n```\n\n## Install\n\n### Install script (macOS/Linux)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Mintplex-Labs/anything-llm-cli/main/install.sh | sh\n```\n\nThis detects your platform, downloads the latest binary, and installs it to `/usr/local/bin`. Run it again to update.\n\nTo uninstall:\n\n```bash\nsudo rm /usr/local/bin/any\n```\n\n### Via npm\n\n```bash\nnpm install -g anything-llm-cli\n```\n\nThis installs the `any` command globally.\n\n### Standalone binary\n\nDownload a prebuilt binary for your platform from the [Releases](https://github.com/mintplex-labs/anything-llm-cli/releases) page and place it somewhere on your `PATH`.\n\n| Platform      | Binary               |\n| ------------- | -------------------- |\n| macOS ARM     | `any-darwin-arm64`   |\n| macOS Intel   | `any-darwin-x64`     |\n| Linux x64     | `any-linux-x64`      |\n| Linux ARM     | `any-linux-arm64`    |\n| Windows x64   | `any-windows-x64.exe`|\n\n### From source\n\nRequires [Bun](https://bun.sh).\n\n```bash\ngit clone https://github.com/mintplex-labs/anything-llm-cli.git\ncd anything-llm-cli\nbun run setup\n```\n\nThis installs dependencies and creates a `.env.local` file from `.env.example`. Open `.env.local` and fill in your values (see [Environment Variables](#environment-variables) below).\n\nThen run with:\n\n```bash\nbun run start prompt \"Hello!\"\n```\n\nOr compile a native binary:\n\n```bash\nbun run build\n./dist/any prompt \"Hello!\"\n```\n\n## Setup\n\nThe only required setup is your API key. You can generate one from your AnythingLLM instance under **Settings \u003e Developer API**.\n\nIf running from source, fill in your `.env.local` file — Bun loads it automatically.\n\nFor the npm package or standalone binary, set environment variables directly:\n\n```bash\nexport ANYTHING_LLM_API_KEY=\"your-api-key\"\nexport ANYTHING_LLM_BASE_URL=\"https://my-instance.example.com\"  # optional, default: http://localhost:3001\nexport ANYTHING_LLM_DEFAULT_WORKSPACE_SLUG=\"my-workspace\"       # optional, avoids needing -w\n```\n\nIf no workspace is specified via `-w` or the environment variable, the CLI will automatically create and use a default workspace.\n\n\u003e **Tip:** Add these to your `.bashrc`, `.zshrc`, or `.env` file for persistence.\n\n## Usage\n\n```\nany prompt \u003cmessage\u003e [options]\n```\n\nRunning `any` with no arguments displays the help screen.\n\n### Commands\n\n| Command | Alias | Description |\n| --- | --- | --- |\n| `prompt \u003cmessage...\u003e` | `p` | Send a prompt to the LLM |\n\n### Options (for `prompt`)\n\n| Flag | Description |\n| --- | --- |\n| `-w, --workspace \u003cslug\u003e` | Workspace slug. Falls back to `ANYTHING_LLM_DEFAULT_WORKSPACE_SLUG` env var, or auto-creates a default workspace |\n| `-a, --attach \u003cpath...\u003e` | Attach files to the prompt (images, PDFs, etc.) |\n| `-t, --thread [slug]` | Use a specific thread for the conversation |\n| `--nt, --new-thread` | Start a new thread for this conversation |\n| `-S, --no-stream` | Disable streaming (wait for full response) |\n\n#### Supported attachment types\n\n`png`, `jpg`, `jpeg`, `gif`, `webp`, `svg`, `pdf`, `txt`, `csv`, `json`, `md`, `doc`, `docx`, `xls`, `xlsx`\n\n### Examples\n\n**Simple prompt:**\n\n```bash\nany prompt \"What is AnythingLLM?\"\n```\n\n**Multi-word prompts without quotes:**\n\n```bash\nany prompt What is AnythingLLM\n```\n\n**Using the short alias:**\n\n```bash\nany p \"What is AnythingLLM?\"\n```\n\n**Pipe in context from another command:**\n\n```bash\ncat error.log | any prompt \"Explain these errors\"\n```\n\n```bash\ngit diff | any prompt \"Write a commit message for these changes\"\n```\n\n```bash\ncurl -s https://api.example.com/data | any prompt \"Summarize this JSON\"\n```\n\n**Use a specific thread for ongoing conversations:**\n\n```bash\nany prompt \"Let's continue our discussion\" -t thread-slug\n```\n\n**Start a new thread:**\n\n```bash\nany prompt \"Start a fresh conversation about testing\" --new-thread\n```\n\n**Disable streaming (useful for scripting):**\n\n```bash\nRESULT=$(any prompt \"Give me a one-word answer: yes or no?\" -S)\necho \"The LLM said: $RESULT\"\n```\n\n**Save the response to a file:**\n\n```bash\nany prompt \"Write a summary of AnythingLLM\" \u003e summary.md\n```\n\n\u003e When piped to a file, ANSI formatting is automatically stripped and agent tool call assembly is cleaned up for readable plaintext output.\n\n**Attach files (images, PDFs, etc.):**\n\n```bash\nany prompt \"What's in this image?\" -a ./photo.png\n```\n\n```bash\nany prompt \"Compare these documents\" -a report.pdf notes.pdf\n```\n\n```bash\nany prompt \"Summarize all of these\" -a file1.pdf file2.pdf file3.pdf\n```\n\n**Agent workspaces:**\n\nAgent workspaces that use tools (web browsing, scraping, etc.) are fully supported. In the terminal, tool call assembly updates in place and agent thoughts are dimmed for readability. When piped to a file, output is clean plaintext.\n\n## TypeScript SDK\n\nThe project also includes a fully-typed TypeScript SDK (`AnythingLLM` class) that you can use programmatically:\n\n```typescript\nimport { AnythingLLM } from \"./src/sdk\";\n\nconst client = new AnythingLLM({\n  apiKey: \"your-api-key\",\n  baseUrl: \"http://localhost:3001\",\n});\n\n// Send a chat message\nconst result = await client.workspaces.chat({\n  slug: \"my-workspace\",\n  message: \"Hello!\",\n});\n\nif (result.ok) {\n  console.log(result.data.textResponse);\n}\n\n// Stream a response\nconst stream = client.workspaces.streamChat({\n  slug: \"my-workspace\",\n  message: \"Tell me a story\",\n  mode: \"chat\",\n});\n\nfor await (const chunk of stream) {\n  if (chunk.type === \"textResponseChunk\") {\n    process.stdout.write(chunk.textResponse);\n  }\n}\n```\n\n### SDK Methods\n\n| Method | Description |\n| --- | --- |\n| `workspaces.list()` | List all workspaces |\n| `workspaces.get({ slug })` | Get a workspace by slug |\n| `workspaces.create({ name, ... })` | Create a new workspace |\n| `workspaces.chat({ slug, message })` | Send a message and get a complete response |\n| `workspaces.streamChat({ slug, message })` | Stream a response as SSE chunks |\n| `threads.create({ workspaceSlug, title })` | Create a new thread in a workspace |\n| `threads.chat({ workspaceSlug, threadSlug, message })` | Chat within a thread |\n| `threads.streamChat({ workspaceSlug, threadSlug, message })` | Stream a response within a thread |\n| `threads.getMessages({ workspaceSlug, threadSlug? })` | Get chat history |\n\n## Development\n\n```bash\n# Install dependencies\nbun install\n\n# Run in development\nbun run start\n\n# Lint and format\nbun run lint\n\n# Build for current platform\nbun run build\n\n# Build for all platforms\nbun run build:all\n```\n\n## Environment Variables\n\n| Variable | Required | Default | Description |\n| --- | --- | --- | --- |\n| `ANYTHING_LLM_API_KEY` | Yes | — | Your AnythingLLM API key |\n| `ANYTHING_LLM_BASE_URL` | No | `http://localhost:3001` | Base URL of your AnythingLLM instance |\n| `ANYTHING_LLM_DEFAULT_WORKSPACE_SLUG` | No | — | Default workspace slug (avoids needing `-w` flag) |\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmintplex-labs%2Fanything-llm-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmintplex-labs%2Fanything-llm-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmintplex-labs%2Fanything-llm-cli/lists"}