Skip to content

AI-native personal project intelligence system - manage, track, and search across all your repositories with semantic understanding

License

Notifications You must be signed in to change notification settings

nshkrdotcom/portfolio_manager

Repository files navigation

Portfolio Manager

Portfolio Manager Logo

Hex.pm Documentation Build Status License

Portfolio Manager is the application layer on top of portfolio_core and portfolio_index. It provides CLI workflows, RAG query interfaces, graph tooling, and manifest-driven configuration for managing code portfolios.

Quick Install (0.3.1)

Add the dependency in mix.exs:

def deps do
  [
    {:portfolio_manager, "~> 0.3.1"}
  ]
end

Then:

mix deps.get

Features

  • Manifest-driven adapter wiring (vector store, graph store, embedder, LLM, chunker)
  • RAG queries with multiple strategies (hybrid, self-rag, graph-rag, agentic)
  • Graph utilities for dependency and knowledge graphs
  • CLI tasks for ask/search/index/graph operations
  • Runnable examples under examples/

Multi-Provider Routing (v0.3.1)

Route LLM requests across multiple providers with intelligent strategies:

# Automatic routing
{:ok, response} = PortfolioManager.Router.complete(messages)

# Force specific strategy
{:ok, response} = PortfolioManager.Router.complete(messages, strategy: :specialist)

# Route by task type
{:ok, response} = PortfolioManager.Router.complete(messages, task_type: :code)

# Stream responses
PortfolioManager.Router.stream(messages, &IO.write/1)

Streaming Responses (v0.3.1)

Stream RAG query responses for better UX:

PortfolioManager.RAG.stream_query("How does this work?", fn chunk ->
  IO.write(chunk)
end)

# CLI
mix portfolio.ask "Your question" --stream

Agent Framework (v0.3.1)

Use tool-based agents for complex tasks:

PortfolioManager.Agent.run("Analyze this codebase and suggest improvements",
  tools: [:search_code, :read_file, :get_graph_context]
)

Pipeline Orchestration (v0.3.1)

Build complex workflows with dependency management:

import PortfolioManager.Pipeline

run(:analysis, %{repo: "/path/to/repo"}) do
  step :scan, &scan_files/1
  step :analyze, &analyze/1, depends_on: [:scan]
  step :report, &generate_report/1, depends_on: [:analyze]
end

Quickstart

mix deps.get
mix compile

# Start the app
iex -S mix

Configuration

Manifests live in config/manifests/ and select adapters per environment. Set environment variables for API keys and graph connections as needed:

export GEMINI_API_KEY=your-key
export ANTHROPIC_API_KEY=your-key
export OPENAI_API_KEY=your-key
export NEO4J_URI=bolt://localhost:7687
export NEO4J_USER=neo4j
export NEO4J_PASSWORD=password

CLI

# Ask a question (RAG + LLM)
mix portfolio.ask "How does the workflow engine process steps?"

# Search without generation
mix portfolio.search "authentication flow" --index default --k 5

# Index a repository
mix portfolio.index . --index portfolio_manager --extensions .ex,.exs,.md

# Graph stats
mix portfolio.graph stats --graph default

Examples

Examples assume the development manifest plus Postgres/pgvector and Neo4j. Run the PortfolioIndex migrations before trying the RAG scripts:

mix ecto.create -r PortfolioIndex.Repo
mix ecto.migrate -r PortfolioIndex.Repo

See examples/README.md for runnable scripts, adapter notes, and the examples/run_all.sh runner.

License

MIT License - see LICENSE for details.

About

AI-native personal project intelligence system - manage, track, and search across all your repositories with semantic understanding

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages