We are legion
🤖 Meet Bob: Your AI Writing Companion:
Bob is a sleek Go application that works as a bridge between your ideas and AI language models served by Ollama to transform your prompts into content.
go install github.com/sea-monkeys/bob@latest
git clone https://github.com/sea-monkeys/bob.git
cd bob
go build
sudo mv bob /usr/local/bin/
- Requirements:
- Ollama installed and running locally (default: http://localhost:11434)
- The model specified in settings (default: qwen2.5:0.5b)
- Directory structure needed:
.bob/
├── .env # Contains OLLAMA_HOST and LLM settings
├── settings.json # Model configuration
└── instructions.md # System instructions for the LLM
- Basic usage:
bob --prompt prompt.md --settings .bob --output report.md
bob --prompt samples/json-to-go-struct/prompt.md --settings samples/json-to-go-struct/.bob --output ./report.md
- Optional flags:
--version # Shows version info
--prompt # Path to prompt file (default: prompt.md)
--context # Path to context file (default: context.md)
--settings # Path to settings directory (default: .bob)
--output # Path to output file (default: report.md)
--tools # Activate the support for tools invocation
--schema # Extract data from the generated content (JSON structured output)
--rag # Create or update a Vector store from a content directory
You can override the content of the
prompt.md
and theinstructions.md
files with the--system
and--user
flags:bob --system "you are a pizza expert" --user "what is the best pizza in the world?"
.
The application reads your prompt, sends it to Ollama with the specified configuration, and saves the LLM's response to the output file.
See the samples in the samples
directory for examples of how to use tools invocation:
If you want to use tools invocation, you need to add the --tools
flag to the command.
If you want to add the result of the tool(s) invocation as a user
message, after the user's question, use this command.
bob --tools --as-user --after-question
# or
bob --tools --as-user
# or (default)
bob --tools
If you want to add the result of the tool(s) invocation as a user
message, before the user's question, use this command.
bob --tools --as-user --before-question
If you want to add the result of the tool(s) invocation as a system
message, use this command.
bob --tools --as-system
The result will be added as a
system
message before the user question to the messages list.
See the samples in the samples
directory for examples of how to use structured JSON output:
See the samples in the samples
directory for examples of how to use RAG support:
bob --create path/to/project --kind chat|rag|tools|schema
bob --add-to-messages path/to/file