https://github.com/jadbox/solomonagent
This project provides a command-line interface (CLI) tool to interact with web pages. It fetches page content, summarizes it using an AI model, and allows users to select and interact with identified actions (like forms or links) on the page.
https://github.com/jadbox/solomonagent
Last synced: 9 months ago
JSON representation
This project provides a command-line interface (CLI) tool to interact with web pages. It fetches page content, summarizes it using an AI model, and allows users to select and interact with identified actions (like forms or links) on the page.
- Host: GitHub
- URL: https://github.com/jadbox/solomonagent
- Owner: jadbox
- Created: 2025-06-02T22:50:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-03T15:50:13.000Z (about 1 year ago)
- Last Synced: 2025-06-03T15:53:31.989Z (about 1 year ago)
- Language: TypeScript
- Size: 63.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solomon's Agent: CLI interaction to a more concise web

This project provides a command-line interface (CLI) tool to quickly interact with web from the CLI. It fetches page content, summarizes it using an AI model, and allows users to select and interact with identified actions (like forms or links) on the page. This tool acts as a smart filter for the web, right in your CLI. It parses a page to surface only the essential content and the most common next steps, streamlining tasks like reading the news, researching on Wikipedia, or getting a quick weather update.
### CLI prompt a webpage:

### Interact with a simple page form:


## Project Structure
The project is organized into a modular structure for better maintainability and scalability:
```
.
├── src/
│ ├── types.ts # Defines shared TypeScript interfaces (e.g., PageAction).
│ ├── browserUtils.ts # Handles Playwright browser automation and Chrome profile detection.
│ ├── aiUtils.ts # Contains logic for AI-powered page summarization using OpenAI/Gemini.
│ └── cliHandler.ts # Manages all command-line user interactions using @clack/prompts.
├── index.ts # The main entry point, orchestrating the application flow.
├── package.json # Project metadata and dependencies.
├── tsconfig.json # TypeScript configuration.
├── .gitignore # Specifies intentionally untracked files to ignore.
└── README.md # Project documentation.
```
## How to Run
1. **Set up Environment Variable:**
Ensure you have your Gemini API key set as an environment variable:
`export GEMINI_API_KEY="YOUR_GEMINI_API_KEY"`
2. **Install Dependencies:**
```bash
bun install
```
3. **Run the Application:**
```bash
npm install
```
Node Example with type stripping attribute:
```bash
npm run start https://example.com
```
## Features
* **Web Page Fetching:** Retrieves HTML content and title from a given URL.
* **AI Summarization:** Uses a configured AI model (Gemini) to summarize page content concisely.
* **Action Identification:** Identifies potential user actions (forms, links) on the page based on AI analysis.
* **Interactive CLI:** Provides a user-friendly command-line interface to select and interact with identified page actions.
* **Chrome Profile Detection:** [WIP] Automatically detects common Chrome user profile paths for persistent browser sessions (though currently configured for non-persistent headless mode).
## Plug
This is a silly project built while I'm looking for new opportunities around building AI-powered platforms and tools. If you're hiring, message me on https://www.linkedin.com/in/jonathandunlap/