goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Top Related Projects
Go implementation of the Ethereum protocol
Substrate: The platform for blockchain innovators
:chains: A Framework for Building High Value Public Blockchains :sparkles:
Reference client for NEAR Protocol
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Quick Overview
Goose is a Go library for parsing HTML content and extracting useful information. It's designed to identify and extract the main content from web pages, removing clutter like navigation, ads, and sidebars. Goose is particularly useful for applications that need to process and analyze web content programmatically.
Pros
- Effective at extracting main content from web pages
- Supports multiple languages
- Can extract metadata like title, publish date, and author
- Actively maintained and updated
Cons
- May occasionally misidentify content in complex page layouts
- Requires some configuration for optimal results
- Limited documentation compared to some other libraries
- Performance can be slower for very large pages
Code Examples
- Basic content extraction:
import "github.com/advancedlogic/GoOse"
g := goose.New()
article, err := g.ExtractFromURL("https://example.com/article")
if err != nil {
// Handle error
}
fmt.Println(article.CleanedText)
- Extracting metadata:
article, _ := g.ExtractFromURL("https://example.com/article")
fmt.Println("Title:", article.Title)
fmt.Println("Description:", article.MetaDescription)
fmt.Println("Keywords:", article.MetaKeywords)
fmt.Println("Author:", article.Authors)
- Using a custom configuration:
config := goose.Configuration{
UserAgent: "MyCustomUserAgent/1.0",
MinTextLength: 100,
EnableImageFetching: false,
}
g := goose.NewWithConfiguration(config)
article, _ := g.ExtractFromURL("https://example.com/article")
Getting Started
To use Goose in your Go project, first install it:
go get github.com/advancedlogic/GoOse
Then, in your Go code:
import (
"fmt"
"github.com/advancedlogic/GoOse"
)
func main() {
g := goose.New()
article, err := g.ExtractFromURL("https://example.com/article")
if err != nil {
fmt.Println("Error:", err)
return
}
fmt.Println("Title:", article.Title)
fmt.Println("Content:", article.CleanedText)
}
This basic example demonstrates how to extract content from a URL using Goose.
Competitor Comparisons
Go implementation of the Ethereum protocol
Pros of go-ethereum
- Mature and widely adopted implementation of the Ethereum protocol
- Extensive documentation and community support
- Comprehensive suite of tools for interacting with the Ethereum network
Cons of go-ethereum
- Large codebase with complex architecture
- Steep learning curve for newcomers to blockchain development
- Resource-intensive, requiring significant computational power
Code Comparison
go-ethereum:
func (s *Ethereum) Start() error {
if err := s.engine.Start(); err != nil {
return err
}
s.blockchain.Start()
return nil
}
goose:
func (g *Goose) Migrate(dir string, dialect string, args ...string) error {
d, err := g.OpenDBFromEnv()
if err != nil {
return err
}
defer d.Close()
return g.Up(d, dir)
}
Summary
go-ethereum is a full-featured Ethereum client implementation, offering robust functionality for interacting with the Ethereum network. It provides a comprehensive set of tools but comes with a steeper learning curve and higher resource requirements.
goose, on the other hand, is a database migration tool focused on simplifying schema management. It offers a more straightforward API and is lighter in terms of resource usage, but lacks the blockchain-specific features of go-ethereum.
The code comparison highlights the difference in focus: go-ethereum deals with blockchain operations, while goose handles database migrations.
Substrate: The platform for blockchain innovators
Pros of Substrate
- More comprehensive blockchain development framework
- Extensive documentation and community support
- Modular architecture allowing for customizable blockchain solutions
Cons of Substrate
- Steeper learning curve due to complexity
- Requires more resources to run and maintain
- Potentially overkill for simpler blockchain projects
Code Comparison
Substrate (Rust):
#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::weight(10_000)]
pub fn do_something(origin: OriginFor<T>, something: u32) -> DispatchResult {
let who = ensure_signed(origin)?;
// Function logic here
Ok(())
}
}
Goose (Go):
func (b *Blockchain) AddBlock(data string) {
prevBlock := b.blocks[len(b.blocks)-1]
newBlock := NewBlock(data, prevBlock.Hash)
b.blocks = append(b.blocks, newBlock)
}
Summary
Substrate is a more feature-rich and flexible blockchain development framework, offering extensive customization options and strong community support. However, it comes with a steeper learning curve and higher resource requirements. Goose, on the other hand, provides a simpler, lightweight approach to blockchain implementation in Go, making it more accessible for beginners or smaller projects. The choice between the two depends on the specific requirements and scale of the blockchain project at hand.
:chains: A Framework for Building High Value Public Blockchains :sparkles:
Pros of Cosmos SDK
- More comprehensive blockchain development framework
- Larger ecosystem and community support
- Extensive documentation and tutorials
Cons of Cosmos SDK
- Steeper learning curve for beginners
- More complex setup and configuration
- Potentially overkill for simpler blockchain projects
Code Comparison
Cosmos SDK (Go):
func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain {
var genesisState GenesisState
if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
return app.mm.InitGenesis(ctx, app.appCodec, genesisState)
}
Goose (Go):
func (m *Migration) Up() error {
_, err := m.SQL(`
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT,
email TEXT UNIQUE
);
`)
return err
}
The code snippets highlight the different focus areas of the two projects. Cosmos SDK deals with blockchain initialization and state management, while Goose is primarily concerned with database migrations. This reflects the broader scope of Cosmos SDK as a blockchain framework compared to Goose's specialized database migration tool.
Reference client for NEAR Protocol
Pros of nearcore
- More comprehensive blockchain implementation with full node functionality
- Larger community and ecosystem support
- Advanced features like sharding and smart contract support
Cons of nearcore
- Higher complexity and steeper learning curve
- Requires more resources to run and maintain
- Less suitable for simple, lightweight blockchain applications
Code comparison
nearcore (Rust):
pub fn process_block(
&mut self,
block: &Block,
provenance: Provenance,
challenges: &mut Vec<ChallengeBody>,
) -> Result<(), Error> {
// Block processing logic
}
goose (Go):
func (b *Blockchain) AddBlock(data string) {
prevBlock := b.blocks[len(b.blocks)-1]
newBlock := NewBlock(data, prevBlock.Hash)
b.blocks = append(b.blocks, newBlock)
}
Summary
nearcore is a more feature-rich and production-ready blockchain implementation, suitable for complex decentralized applications. It offers advanced functionality but comes with increased complexity. goose, on the other hand, is a simpler, educational blockchain implementation in Go, making it easier to understand and modify for learning purposes or basic blockchain projects. The code comparison highlights the difference in complexity between the two projects, with nearcore handling more intricate block processing and goose focusing on basic block addition.
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Pros of Solana
- High-performance blockchain with fast transaction speeds and low fees
- Robust ecosystem with extensive developer tools and documentation
- Large and active community, providing support and contributing to the project
Cons of Solana
- More complex codebase, potentially steeper learning curve for new developers
- Centralization concerns due to high hardware requirements for validators
- Occasional network instability issues during periods of high congestion
Code Comparison
Solana (Rust):
pub fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
instruction_data: &[u8],
) -> ProgramResult {
// Process instruction logic
}
Goose (Go):
func (h *Handler) HandleRequest(ctx context.Context, req *Request) (*Response, error) {
// Handle request logic
}
While both projects serve different purposes, Solana focuses on blockchain infrastructure with Rust, whereas Goose is a web framework written in Go. Solana's code emphasizes low-level blockchain operations, while Goose provides higher-level abstractions for web development.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
goose is your on-machine AI agent, capable of automating complex development tasks from start to finish. More than just code suggestions, goose can build entire projects from scratch, write and execute code, debug failures, orchestrate workflows, and interact with external APIs - autonomously.
Whether you're prototyping an idea, refining existing code, or managing intricate engineering pipelines, goose adapts to your workflow and executes tasks with precision.
Designed for maximum flexibility, goose works with any LLM, seamlessly integrates with MCP servers, and is available as both a desktop app as well as CLI - making it the ultimate AI assistant for developers who want to move faster and focus on innovation.
Quick Links
Goose Around with Us
Top Related Projects
Go implementation of the Ethereum protocol
Substrate: The platform for blockchain innovators
:chains: A Framework for Building High Value Public Blockchains :sparkles:
Reference client for NEAR Protocol
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot