MCPcopy Index your code
hub / github.com/Octrafic/octrafic-cli

github.com/Octrafic/octrafic-cli @v0.6.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.0 ↗ · + Follow
783 symbols 2,238 edges 79 files 446 documented · 57%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Octrafic

Go Version License: MIT Stars Release

Open source CLI tool for automated API testing and reporting. Test your APIs by describing what you want in natural language.

Demo

If you find Octrafic useful, please ⭐ star the repo - it helps a lot!

Features

  • Natural language testing - describe what you want to test in plain English; the agent generates and executes the test plan
  • OpenAPI Scanner - scan your application source code to automatically generate OpenAPI 3.1 specifications
  • Broad spec support - OpenAPI 3.x, Swagger 2.0, Postman Collections, GraphQL, and Markdown docs
  • Multiple auth methods - Bearer token, API Key, Basic Auth, or none
  • Export tests - generate Postman collections, Python pytest files, or Bash curl scripts from any test session
  • PDF reports - produce professional test reports with a single command (requires weasyprint)
  • Multiple LLM providers - Anthropic Claude, OpenAI, Google Gemini, OpenRouter, Ollama, llama.cpp, or any OpenAI-compatible endpoint
  • Headless / CI mode - run non-interactively with octrafic test for pipeline integration

Install

Linux & macOS:

curl -fsSL https://octrafic.com/install.sh | bash

macOS (Homebrew):

brew install octrafic/tap/octrafic

Windows:

iex (iwr -useb https://octrafic.com/install.ps1)

Quick Start

octrafic

Documentation

Getting Started - Introduction - Quick Start

Guides - Chat Features - OpenAPI Scanner - Project Management - Providers - Authentication - PDF Reports - Exporting Tests - Headless Mode

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

MIT - see LICENSE

Extension points exported contracts — how you extend this code

Provider (Interface)
Provider represents an LLM provider interface [5 implementers]
internal/llm/common/types.go
AuthProvider (Interface)
AuthProvider applies authentication to HTTP requests [4 implementers]
internal/core/auth/auth.go
Exporter (Interface)
Exporter defines the interface for test exporters [3 implementers]
internal/exporter/exporter.go
ReasoningCallback (FuncType)
ReasoningCallback is called for each chunk as it's streamed isThought=true for reasoning chunks, false for text chunks
internal/agents/chat.go
StreamCallback (FuncType)
StreamCallback is called for each chunk during streaming.
internal/llm/gemini/client.go
StreamCallback (FuncType)
StreamCallback is called for each chunk as it's streamed isThought indicates if this chunk is reasoning/thinking (true)
internal/llm/openai/client.go
StreamCallback (FuncType)
StreamCallback is called for each chunk during streaming
internal/llm/common/types.go
StreamCallback (FuncType)
(no doc)
internal/llm/claude/client.go

Core symbols most depended-on inside this repo

Render
called by 428
internal/cli/model_selector.go
addMessage
called by 238
internal/cli/utils.go
String
called by 80
internal/core/auth/basic.go
Close
called by 38
internal/llm/common/types.go
Get
called by 33
internal/ui/textarea/memo.go
printFlag
called by 33
cmd/octrafic/main.go
addSystemMessage
called by 28
internal/cli/chat.go
SetValue
called by 28
internal/ui/textarea/textarea.go

Shape

Function 334
Method 291
Struct 137
TypeAlias 12
FuncType 5
Interface 4

Languages

Go99%
Python1%

Modules by API surface

internal/ui/textarea/textarea.go78 symbols
internal/cli/project_creator.go26 symbols
internal/infra/storage/project.go25 symbols
internal/cli/onboarding.go25 symbols
internal/core/parser/parser_test.go24 symbols
internal/llm/openai/client.go23 symbols
internal/core/parser/parser.go23 symbols
internal/cli/resume_selector.go23 symbols
internal/updater/updater.go22 symbols
internal/cli/tui.go20 symbols
internal/cli/chat.go20 symbols
internal/cli/model_selector.go19 symbols

For agents

$ claude mcp add octrafic-cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact