GithubHelp home page GithubHelp logo

go-book-cli's Introduction

go-book-ai

Overview

go-book-ai is a CLI tool for generating book chapters using AI. It leverages language models like OpenAI's GPT to create detailed outlines and content for book chapters.

Setup

Prerequisites

  • Go 1.20 or later
  • OpenAI API Key

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/go-book-ai.git
    cd go-book-ai
  2. Initialize the Go module:

    go mod init go-book-ai
    go mod tidy
  3. Set the OpenAI API Key as an environment variable:

    export OPENAI_API_KEY=your_openai_api_key
  4. Build the CLI application:

    go build ./cmd/bookcli

Usage

Create a New Book

To create a new book with a specific topic:

./bookcli new "Your Book Topic"

Continue an Existing Book

To continue working on an existing book:

./bookcli continue "book_id"

Testing

Run the tests to ensure everything is working correctly:

go test ./...

Error Handling

The application includes robust error handling with retries and exponential backoff for network-related issues and rate limits.

Contributing

Feel free to submit issues, fork the repository, and send pull requests. Contributions are welcome!

License

This project is licensed under the MIT License.

go-book-cli's People

Contributors

johnayoung avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.