ANUS (Autonomous Networked Utility System)

repository·main·Indexed 27 days ago

https://github.com/anus-dev/anus

A Grok-powered AI agent for the terminal designed to evolve into a self-developing agent. It features a CLI optimized for xai/grok-code-fast-1, support for the Model Context Protocol (MCP) to integrate custom tools, and a VS Code Companion extension for editor-aware context, native diffing, and integrated session launching.

Tokens
26.3K
Snippets
41
Records
183
Agent score
92%

What's inside ANUS

  1. Understand ANUS Terms of Service and Privacy

    main

    ANUS is an open-source, experimental, and entertainment-focused CLI tool. Usage is governed by two distinct sets of terms:

    1. The ANUS Software: Governed by the Apache 2.0 License.
    2. AI Model API Services: Interactions with AI models (via OpenRouter) are governed by the OpenRouter Terms of Service.

    Users are responsible for understanding the terms of any third-party service they configure the tool to use.

  2. Review ANUS Data Privacy and Telemetry

    main

    The ANUS tool is designed to respect privacy and does not collect, store, or transmit any data (including prompts, code, API keys, or telemetry) to the project maintainers.

    • Data Flow: Data is sent directly from your local machine to your configured API endpoint (e.g., OpenRouter).
    • Telemetry: There is no usage statistics, analytics, or performance tracking collected by the ANUS project. There is no opt-out mechanism because no data is collected.
  3. ANUS Companion features

    main

    The ANUS Companion provides the following capabilities to the ANUS CLI:

    • Open Editor File Context: ANUS gains awareness of the files currently open in your editor to better understand project structure.
    • Selection Context: ANUS can access your cursor position and selected text.
    • Native Diffing: Allows you to view, modify, and accept code changes suggested by ANUS directly within the editor interface.
  4. Core Features of ANUS CLI

    main

    ANUS is a Grok-powered AI agent for the terminal with the following capabilities:

    • Grok-Powered Core: Natively optimized for xai/grok-code-fast-1.
    • Extensible Architecture (MCP): Uses the Model Context Protocol (MCP) to integrate custom tools.
    • Integrated Workspace Tools: Built-in support for file system operations and sandboxed shell command execution.
    • Project-Aware Context: Uses a local ANUS.md file to retain project-specific goals and instructions.
  5. Run the ANUS VS Code Companion extension locally

    main

    To develop and run the anus-vscode-ide-companion extension locally, follow these steps:

    1. Install dependencies from the repository root:
      npm install
    2. Open the packages/vscode-ide-companion directory in VS Code.
    3. Compile the extension:
      npm run compile
    4. Launch the Extension Development Host by pressing F5 (or fn+f5 on macOS).

    To enable automatic rebuilding when files change, use the watch command.

    npm install
    npm run compile
    npm run watch
  6. Quick Start with ANUS CLI

    main

    To start using ANUS in a project directory:

    1. Obtain an API key from OpenRouter.ai.
    2. Navigate to your project directory in the terminal.
    3. Run the anus command. You will be guided through the initial API key setup process.

    ANUS automatically ingests the context of the current directory to provide project-aware assistance.

    anus
  7. Install and use the ANUS Companion extension

    main

    The ANUS Companion extension enhances the ANUS CLI experience by providing editor-aware context. It allows ANUS to see your open files and cursor selections, and enables native diffing for code changes.

    Requirements:

    • VS Code version 1.99.0 or newer.
    • ANUS CLI must be installed separately and running within the VS Code integrated terminal.
  8. Understand Tool Confirmation UI behaviors

    main

    The ANUS CLI uses a confirmation interface when tools attempt to perform sensitive actions. Depending on the tool type, the CLI presents different options and information to the user. You can interact with these prompts using arrow keys and selection, or use escape / Ctrl+C to cancel.

    Confirmation Types and Options

    1. File Edits (type: 'edit')

      • Displays a diff of the changes using DiffRenderer.
      • In IDE Mode: Options include Yes, allow once, Yes, allow always, and No (esc). If a change is rejected, the CLI attempts to resolve the diff with the IDE client.
      • Standard CLI Mode: Options include Yes, allow once, Yes, allow always, Modify with external editor, and No, suggest changes (esc).
      • If a modification is already in progress, the CLI prompts you to Save and close external editor to continue.
    2. Command Execution (type: 'exec')

      • Displays the rootCommand and the specific command being executed.
      • Options: Yes, allow once, Yes, allow always ..., and No, suggest changes (esc).
    3. Information/Prompting (type: 'info')

      • Displays a prompt text and any associated URLs to fetch.
      • Options: Yes, allow once, Yes, allow always, and No, suggest changes (esc).
    4. MCP Tool Execution (type: 'mcp')

      • Displays the MCP Server name and the specific Tool name.
      • Options: Yes, allow once, Yes, always allow tool "[toolName]" from server "[serverName]", Yes, always allow all tools from server "[serverName]", and No, suggest changes (esc).
  9. Load environment variables from .env files

    main

    ANUS CLI automatically searches for and loads environment variables from .env files. It follows this search order:

    1. .anus/.env in the current directory.
    2. .env in the current directory.
    3. .anus/.env in the parent directory (traversing upwards).
    4. .env in the parent directory (traversing upwards).
    5. .anus/.env in the home directory.
    6. .env in the home directory.

    Note on Exclusions: By default, the variables DEBUG and DEBUG_MODE are excluded from being loaded from project-level .env files to prevent accidental overrides of shell debugging states. This list can be customized via the excludedProjectEnvVars setting.