Skip to content

[Feature] CLI 2.0 - Ship With Only openbb-core Dependency#7433

Draft
deeleeramone wants to merge 10 commits intodevelopfrom
feature/cli-2
Draft

[Feature] CLI 2.0 - Ship With Only openbb-core Dependency#7433
deeleeramone wants to merge 10 commits intodevelopfrom
feature/cli-2

Conversation

@deeleeramone
Copy link
Copy Markdown
Contributor

This PR is a WIP. The goal is to reduce the overhead of running CLI by making it compatible with just the openbb-core package as the default, and expanding the base feature set to provide more utility.

New Feature Set: CLI Feature Engineering & Output System

  1. Feature Engineering Controller (new — 1,399 lines)
    A full data manipulation menu at /feature/ with 16 commands:

Table management: list, select, info, view, delete, copy
Column operations: colname, coltype (including datetime and category), addcol (using DataFrame eval), dropcol, renamecol, modifycol (arithmetic or pandas method detection)
Table operations: query (pandas eval with SQLite SQL push-down optimization for simple filters), join (inner/left/right/outer with --on, --left-on, --right-on)
File I/O: save (CSV, JSON, Excel, SQLite with replace/append/fail modes)
Dynamic tab-completion for tables, columns, and command arguments
2. SQLiteTable Lazy-Loading Wrapper (new — ~100 lines)
A wrapper class for SQLite tables that defers loading. Data is only read from disk when actually accessed. This allows loading large database files without reading all rows into memory upfront.

  1. Pluggable Output Adapter System (new — 6 files)
    A strategy-pattern output package with:

An abstract base class for adapters
Rich console tables (default interactive mode)
JSON output for programmatic consumption
HTML table output (for notebook/web contexts)
TSV and plain stdout stubs
The adapter is selected on the session and called uniformly with display(data, title, export, chart).

  1. Enhanced Base Controller (+490 lines)
    call_load — Load CSV, JSON, Excel, and SQLite files from OpenBBUserData into the OBBject registry, with --register_key, --sheet-name, and automatic max-obbjects eviction
    call_results — Browse, display, chart, and export registry entries by index or key, with --chart, --export, and --sheet-name flags
    Comma-value protection in argument parsing (prevents argparse from splitting AAPL,MSFT)
  2. New Sub-Controllers
    Credentials controller — Manage API credentials (set, show, clear)
    User controller — User settings management (preferences, profile, env)
  3. Session & Settings Enhancements
    Added output_adapter property and max_obbjects_exceeded helper to the session
    New settings fields for output format and data directory
  4. Comprehensive Test Suite (408 tests, ~3,100 lines added)
    25 new/extended test files covering all of the above, including real SQLite I/O tests, all controller commands, output adapters, and edge cases.

@github-actions github-actions bot added enhancement Enhancement platform OpenBB Platform v4 PRs for v4 labels Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement platform OpenBB Platform v4 PRs for v4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant