{"id":36990120,"url":"https://github.com/anyproto/anytype-cli","last_synced_at":"2026-04-29T15:00:52.763Z","repository":{"id":329027189,"uuid":"927906635","full_name":"anyproto/anytype-cli","owner":"anyproto","description":"A command-line interface for interacting with Anytype.","archived":false,"fork":false,"pushed_at":"2026-04-19T13:26:34.000Z","size":793,"stargazers_count":90,"open_issues_count":8,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-19T13:33:27.448Z","etag":null,"topics":["anytype","api","automation","cli","local-first","privacy"],"latest_commit_sha":null,"homepage":"https://developers.anytype.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anyproto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-02-05T18:31:33.000Z","updated_at":"2026-04-19T11:39:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/anyproto/anytype-cli","commit_stats":null,"previous_names":["anyproto/anytype-cli"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/anyproto/anytype-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anyproto%2Fanytype-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anyproto%2Fanytype-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anyproto%2Fanytype-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anyproto%2Fanytype-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anyproto","download_url":"https://codeload.github.com/anyproto/anytype-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anyproto%2Fanytype-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32430803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["anytype","api","automation","cli","local-first","privacy"],"created_at":"2026-01-13T23:34:04.179Z","updated_at":"2026-04-29T15:00:52.700Z","avatar_url":"https://github.com/anyproto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anytype CLI\n\nA command-line interface for interacting with [Anytype](https://github.com/anyproto/anytype-ts). This CLI embeds [anytype-heart](https://github.com/anyproto/anytype-heart) as the server, making it a complete, self-contained solution for developers to work with a headless Anytype instance.\n\n## Contents\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Usage](#usage)\n  - [Running the Server](#running-the-server)\n  - [Network Configuration](#network-configuration)\n  - [Authentication](#authentication)\n  - [API Keys](#api-keys)\n  - [Space Management](#space-management)\n- [Development](#development)\n  - [Project Structure](#project-structure)\n  - [Building from Source](#building-from-source)\n- [Contribution](#contribution)\n\n## Installation\n\nInstall the latest release with a single command:\n\n```bash\n/usr/bin/env bash -c \"$(curl -fsSL https://raw.githubusercontent.com/anyproto/anytype-cli/HEAD/install.sh)\"\n```\n\n## Quick Start\n\n\u003e [!IMPORTANT]\n\u003e The headless middleware requires a dedicated bot account, which you create using `anytype auth create`. This process generates an account key for authentication - mnemonic-based login is not supported. The bot account only has access to spaces it explicitly joins, keeping your data isolated and allowing you to easily revoke its access at any time from the desktop app.\n\nGet up and running in just a few commands:\n\n```bash\n# Run the Anytype server\nanytype serve\n\n# Or install as a user service\nanytype service install\nanytype service start\n\n# Create a new bot account\nanytype auth create \u003cname\u003e\n\n# Join a space via invite link\nanytype space join \u003cinvite-link\u003e\n\n# Verify the space was joined\nanytype space list\n\n# Create an API key for programmatic access\nanytype auth apikey create \"my-bot-api-key\"\n```\n\nOnce running, the API is available at `http://127.0.0.1:31012`. Use your API key to authenticate requests to the endpoints described on the [Developer Portal](https://developers.anytype.io). See [Network Configuration](#network-configuration) for remote access options.\n\n## Usage\n\n```\nanytype \u003ccommand\u003e \u003csubcommand\u003e [flags]\n\nCommands:\n  auth        Manage authentication and accounts\n  serve       Run anytype in foreground\n  service     Manage anytype as a user service\n  shell       Start interactive shell mode\n  space       Manage spaces\n  update      Update to the latest version\n  version     Show version information\n\nExamples:\n  anytype serve                     # Run in foreground\n  anytype service install           # Install as user service\n  anytype service start             # Start the service\n  anytype auth login                # Log in to your account\n  anytype auth create \u003cname\u003e        # Create a new account\n  anytype space list                # List all available spaces\n\nUse \"anytype \u003ccommand\u003e --help\" for more information about a command.\n```\n\n### Running the Server\n\nThe CLI embeds anytype-heart as the server that can be run in two ways:\n\n#### 1. Interactive Mode (for development)\n\n```bash\nanytype serve\n```\n\nThis runs the server in the foreground with logs output to stdout, similar to `ollama serve`.\n\n#### 2. User Service (for production)\n\n```bash\n# Install as user service\nanytype service install\n\n# Start the service\nanytype service start\n\n# Check service status\nanytype service status\n\n# Stop the service\nanytype service stop\n\n# Uninstall the service\nanytype service uninstall\n```\n\nThe service management works across platforms:\n\n- **macOS**: Uses User Agent (launchd)\n- **Linux**: Uses systemd user service\n- **Windows**: Uses Windows User Service\n\n### Network Configuration\n\nBy default, the server binds to `127.0.0.1` (localhost only) on ports 31010-31012 and is not accessible from other machines. These ports are intentionally different from the Anytype desktop app (which uses 31007-31009), allowing both to run simultaneously on the same machine. Port 31012 is the main API endpoint used for HTTP requests.\n\n| Port  | Service  | Description                 |\n| ----- | -------- | --------------------------- |\n| 31010 | gRPC     | gRPC server endpoint        |\n| 31011 | gRPC-Web | gRPC-Web server endpoint    |\n| 31012 | API      | HTTP API server endpoint ⭐ |\n\n\nYou can change the API listen address using `--listen-address` (e.g., `--listen-address 0.0.0.0:31012`). For remote access, you can also use a reverse proxy, SSH tunnel, or Docker port mapping to expose the local ports.\n\n**Security note**: Always keep your API keys safe. If ports are exposed externally, third parties with your API key could gain unauthorized access to the spaces your headless instance has access to.\n\n### Authentication\n\nManage your Anytype account and authentication:\n\n```bash\n# Create a new account\nanytype auth create \u003cname\u003e\n\n# Log in to your account\nanytype auth login\n\n# Check authentication status\nanytype auth status\n\n# Log out and clear stored credentials\nanytype auth logout\n```\n\n### API Keys\n\nManage API keys for programmatic access:\n\n```bash\n# Create a new API key\nanytype auth apikey create \u003cname\u003e\n\n# List all API keys\nanytype auth apikey list\n\n# Revoke an API key\nanytype auth apikey revoke \u003ckey-id\u003e\n```\n\n### Space Management\n\nWork with Anytype spaces:\n\n```bash\n# List all available spaces\nanytype space list\n\n# Join a space\nanytype space join \u003cinvite-link\u003e\n\n# Leave a space\nanytype space leave \u003cspace-id\u003e\n```\n\n## Development\n\n### Project Structure\n\n```\nanytype-cli/\n├── cmd/              # CLI commands\n│   ├── auth/         # Authentication commands\n│   ├── serve/        # Server command\n│   ├── service/      # Service management\n│   ├── space/        # Space management\n│   └── ...\n├── core/             # Core business logic\n│   ├── grpcserver/   # Embedded gRPC server (anytype-heart)\n│   ├── serviceprogram/ # Service implementation\n│   └── ...\n└── dist/             # Build output\n```\n\n### Building from Source\n\n#### Prerequisites\n\n- Go 1.25 or later\n- Git\n- Make\n- C compiler (gcc or clang, for CGO)\n\n#### Build Commands\n\n```bash\n# Clone the repository\ngit clone https://github.com/anyproto/anytype-cli.git\ncd anytype-cli\n\n# Build the CLI (automatically downloads tantivy library)\nmake build\n\n# Install to ~/.local/bin\nmake install\n\n# Run tests\ngo test ./...\n\n# Run linting\nmake lint\n\n# Cross-compile for all platforms\nmake cross-compile\n```\n\n#### Uninstall\n\n```bash\n# Remove installation from ~/.local/bin\nmake uninstall\n```\n\n## Contribution\n\nThank you for your desire to develop Anytype together!\n\n❤️ This project and everyone involved in it is governed by the [Code of Conduct](https://github.com/anyproto/.github/blob/main/docs/CODE_OF_CONDUCT.md).\n\n🧑‍💻 Check out our [contributing guide](https://github.com/anyproto/.github/blob/main/docs/CONTRIBUTING.md) to learn about asking questions, creating issues, or submitting pull requests.\n\n🫢 For security findings, please email [security@anytype.io](mailto:security@anytype.io) and refer to our [security guide](https://github.com/anyproto/.github/blob/main/docs/SECURITY.md) for more information.\n\n🤝 Follow us on [Github](https://github.com/anyproto) and join the [Contributors Community](https://github.com/orgs/anyproto/discussions).\n\n---\n\nMade by Any — a Swiss association 🇨🇭\n\nLicensed under [MIT](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanyproto%2Fanytype-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanyproto%2Fanytype-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanyproto%2Fanytype-cli/lists"}