优化readme
This commit is contained in:
parent
f10a74a663
commit
665571aaa1
3 changed files with 158 additions and 20 deletions
51
CONTRIBUTING.md
Normal file
51
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# Contributing to AutoClaw 🦞
|
||||
|
||||
Thank you for your interest in contributing to AutoClaw! We welcome contributions from everyone.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. **Fork the repository**: Click the "Fork" button on GitHub.
|
||||
2. **Clone your fork**:
|
||||
```bash
|
||||
git clone https://github.com/YOUR_USERNAME/autoclaw.git
|
||||
cd autoclaw
|
||||
```
|
||||
3. **Install dependencies**:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
4. **Create a branch**:
|
||||
```bash
|
||||
git checkout -b feature/my-new-feature
|
||||
```
|
||||
|
||||
## Development Guidelines
|
||||
|
||||
- **Code Style**: We use TypeScript. Please follow the existing code style (formatting, variable naming).
|
||||
- **Testing**: Before submitting a PR, please run `npm run build` to ensure there are no compilation errors.
|
||||
- **Commit Messages**: Write clear, descriptive commit messages. We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification (e.g., `feat: add new tool`, `fix: correct typo in README`).
|
||||
|
||||
## Submitting a Pull Request
|
||||
|
||||
1. Push your changes to your fork:
|
||||
```bash
|
||||
git push origin feature/my-new-feature
|
||||
```
|
||||
2. Go to the [original repository](https://github.com/tsingliuwin/autoclaw) and click "New Pull Request".
|
||||
3. Describe your changes clearly. What problem does it solve? Why is this change necessary?
|
||||
4. Wait for review! We will review your PR as soon as possible.
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
If you find a bug, please open an issue on GitHub with:
|
||||
- A clear description of the bug.
|
||||
- Steps to reproduce.
|
||||
- Expected behavior.
|
||||
- Screenshots or logs if applicable.
|
||||
|
||||
## Feature Requests
|
||||
|
||||
Have an idea for a new feature? Open an issue with the "enhancement" label and let's discuss it!
|
||||
|
||||
---
|
||||
Thank you for helping make AutoClaw better!
|
||||
116
README.md
116
README.md
|
|
@ -1,5 +1,10 @@
|
|||
# AutoClaw 🦞
|
||||
|
||||
[](https://www.npmjs.com/package/autoclaw)
|
||||
[](https://www.npmjs.com/package/autoclaw)
|
||||
[](https://github.com/tsingliuwin/autoclaw/blob/main/LICENSE)
|
||||
[](http://makeapullrequest.com)
|
||||
|
||||
**The Docker-Native Headless Agent for Massive Scale Automation.**
|
||||
|
||||
AutoClaw is a hyper-lightweight AI agent designed to live inside **Docker containers**. Unlike heavy, GUI-dependent agents, AutoClaw is built for **headless, massive-scale concurrency**.
|
||||
|
|
@ -11,44 +16,87 @@ You can run one instance to fix a local script, or orchestrate **10,000+ instanc
|
|||
- 🚀 **Massive Scalability**: Text-only, headless design means you can spawn thousands of agents without consuming graphical resources.
|
||||
- 🛡️ **Sandbox Safety**: Ideal for running untrusted code when isolated in Docker.
|
||||
- 🔌 **Swarm Ready**: Stateless design allows for easy orchestration via K8s, Docker Swarm, or simple shell loops.
|
||||
- 🧩 **Extensible Integrations**: Built-in support for Web Search (Tavily), Email (SMTP), and Notification Webhooks (Feishu, DingTalk, WeCom).
|
||||
|
||||
## Features
|
||||
|
||||
- 📜 **Headless Execution**: No browsers, no GUIs. Pure terminal efficiency.
|
||||
- 🤖 **Non-Interactive**: Intelligent flag handling (`-y`) for zero-touch automation.
|
||||
- 🤖 **Non-Interactive Mode**: Intelligent flag handling (`-y`, `--no-interactive`) for zero-touch automation.
|
||||
- 📂 **Universal Control**: From simple file I/O to complex system administration.
|
||||
- 🧠 **Context Aware**: Detects container environments to optimize command strategies.
|
||||
- 🌐 **Web Search**: Integrated with Tavily for real-time information retrieval.
|
||||
- 📧 **Communication**: Send emails and push notifications to chat groups automatically.
|
||||
|
||||
## Tech Stack
|
||||
- **Runtime**: Node.js
|
||||
- **Language**: TypeScript
|
||||
- **Framework**: Commander.js
|
||||
- **UI**: Inquirer (interactivity), Chalk (styling), Ora (spinners)
|
||||
- **AI**: OpenAI SDK (Compatible with DeepSeek, LocalLLM, etc.)
|
||||
|
||||
## Installation
|
||||
|
||||
### User Installation
|
||||
Install globally via npm:
|
||||
```bash
|
||||
npm install -g autoclaw
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
To update AutoClaw to the latest version:
|
||||
|
||||
```bash
|
||||
npm update -g autoclaw
|
||||
```
|
||||
### Development Installation
|
||||
1. Clone the repository:
|
||||
```bash
|
||||
git clone https://github.com/tsingliuwin/autoclaw.git
|
||||
cd autoclaw
|
||||
```
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
3. Build the project:
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
4. Link globally (optional):
|
||||
```bash
|
||||
npm link
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. **Setup**: Run the setup wizard to configure your API key.
|
||||
1. **Setup**: Run the interactive setup wizard to configure your API keys and integrations.
|
||||
```bash
|
||||
autoclaw setup
|
||||
```
|
||||
2. **Run**: Start the agent.
|
||||
2. **Run**: Start the agent in interactive mode.
|
||||
```bash
|
||||
autoclaw
|
||||
```
|
||||
|
||||
## Usage Examples
|
||||
## Usage
|
||||
|
||||
- "List all TypeScript files in the src folder."
|
||||
- "Create a new React component named Button in `components/Button.tsx`."
|
||||
- "Check my disk usage and tell me which folder is the largest."
|
||||
### Interactive Mode
|
||||
Simply run `autoclaw` to enter the chat loop.
|
||||
```bash
|
||||
autoclaw
|
||||
> List all TypeScript files in the src folder.
|
||||
```
|
||||
|
||||
### Headless Mode (One-Shot)
|
||||
Run a single command and exit.
|
||||
```bash
|
||||
autoclaw "Check disk usage and save the report to usage.txt" --no-interactive
|
||||
```
|
||||
|
||||
### Auto-Confirm (CI/CD)
|
||||
Automatically approve all tool executions (dangerous, use with caution or in sandboxes).
|
||||
```bash
|
||||
autoclaw "Refactor src/index.ts to use ES modules" -y
|
||||
```
|
||||
|
||||
### CLI Options
|
||||
- `-m, --model <model>`: Specify the LLM model (default: `gpt-4o`).
|
||||
- `-n, --no-interactive`: Exit after processing the initial query (Headless mode).
|
||||
- `-y, --yes`: Auto-confirm all tool executions (e.g., shell commands).
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
@ -61,21 +109,51 @@ AutoClaw uses a hierarchical configuration system.
|
|||
4. **Global Config**: (`~/.autoclaw/setting.json`)
|
||||
|
||||
### Supported Configuration Keys (JSON)
|
||||
- `apiKey`: Your API Key.
|
||||
- `baseUrl`: Custom Base URL.
|
||||
- `apiKey`: Your OpenAI API Key.
|
||||
- `baseUrl`: Custom Base URL (e.g., for DeepSeek or LocalLLM).
|
||||
- `model`: Default model to use.
|
||||
- `tavilyApiKey`: API Key for Tavily Web Search.
|
||||
- `smtpHost`, `smtpPort`, `smtpUser`, `smtpPass`, `smtpFrom`: SMTP Email settings.
|
||||
- `feishuWebhook`, `dingtalkWebhook`, `wecomWebhook`: Notification webhooks.
|
||||
|
||||
### Project-Level Config (Example)
|
||||
### Project-Level Config Example
|
||||
Create a file at `.autoclaw/setting.json`:
|
||||
```json
|
||||
{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"baseUrl": "https://api.example.com/v1"
|
||||
"baseUrl": "https://api.deepseek.com/v1"
|
||||
}
|
||||
```
|
||||
|
||||
> **⚠️ Security Warning**: If you store your `apiKey` in `.autoclaw/setting.json`, make sure to add `.autoclaw/` to your `.gitignore` file to prevent leaking secrets!
|
||||
> **⚠️ Security Warning**: If you store your `apiKey` or secrets in `.autoclaw/setting.json`, make sure to add `.autoclaw/` to your `.gitignore` file to prevent leaking secrets!
|
||||
|
||||
## Integrations
|
||||
|
||||
### Web Search (Tavily)
|
||||
AutoClaw can search the web if you provide a Tavily API Key during setup or in config.
|
||||
- **Usage**: "Search for the latest Node.js release notes."
|
||||
|
||||
### Email (SMTP)
|
||||
Configure SMTP settings to let the agent send emails.
|
||||
- **Usage**: "Send an email to user@example.com with the summary of the log file."
|
||||
|
||||
### Notifications (Feishu/DingTalk/WeCom)
|
||||
Configure webhooks to receive alerts or reports in your team chat apps.
|
||||
- **Usage**: "Notify the team on Feishu that the build has finished."
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please feel free to submit a Pull Request.
|
||||
|
||||
1. Fork the Project
|
||||
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
|
||||
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
||||
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
||||
5. Open a Pull Request
|
||||
|
||||
---
|
||||
GitHub: [https://github.com/tsingliuwin/autoclaw](https://github.com/tsingliuwin/autoclaw)
|
||||
11
package.json
11
package.json
|
|
@ -25,7 +25,16 @@
|
|||
"agent",
|
||||
"automation",
|
||||
"openai",
|
||||
"tool"
|
||||
"tool",
|
||||
"docker",
|
||||
"headless",
|
||||
"devops",
|
||||
"llm",
|
||||
"gpt-4",
|
||||
"typescript",
|
||||
"orchestration",
|
||||
"infrastructure",
|
||||
"terminal"
|
||||
],
|
||||
"author": "AutoClaw Contributor",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
Loading…
Reference in a new issue