Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
main.cpp File Reference

entropic CLI binary — top-level dispatcher for subcommands. More...

#include <cstdio>
#include <cstring>
#include <string>
Include dependency graph for main.cpp:

Go to the source code of this file.

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Functions

int entropic::cli::run_mcp_bridge (int argc, char *argv[])
 Entry point for the mcp-bridge subcommand.
 
int entropic::cli::run_version ()
 Print the engine version and exit.
 
int entropic::cli::run_download (int argc, char *argv[])
 Handle entropic download subcommand.
 
static void print_usage ()
 Print top-level usage to stderr.
 
int main (int argc, char *argv[])
 CLI entry point — dispatch to subcommand.
 

Detailed Description

entropic CLI binary — top-level dispatcher for subcommands.

Provides a single entropic executable that ships with the engine. Subcommands let users integrate the engine into other systems with zero code:

entropic mcp-bridge [–project-dir DIR] Speaks JSON-RPC 2.0 over stdio so external MCP clients (Claude Code, VSCode, etc.) can use the engine as a tool provider.

entropic version Print engine version and exit.

The mcp-bridge subcommand is the primary integration point: a user adds entropic to their .mcp.json with command: "entropic" and args: ["mcp-bridge"], and the engine becomes available as MCP tools without writing any code.

Version
2.0.3

Definition in file main.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

CLI entry point — dispatch to subcommand.

Parameters
argcArgument count.
argvArgument vector. argv[1] is the subcommand name.
Returns
0 on success, 1 on usage error or subcommand failure.

Definition at line 111 of file main.cpp.

◆ print_usage()

static void print_usage ( )
static

Print top-level usage to stderr.

@utility

Version
2.1.7

Definition at line 42 of file main.cpp.

◆ run_download()

int entropic::cli::run_download ( int  argc,
char *  argv[] 
)

Handle entropic download subcommand.

Parameters
argcargc-like count starting at subcommand name.
argvargv-like vector starting at subcommand name.
Returns
0 on success, non-zero on usage/runtime error.

Definition at line 296 of file download.cpp.

◆ run_mcp_bridge()

int entropic::cli::run_mcp_bridge ( int  argc,
char *  argv[] 
)

Entry point for the mcp-bridge subcommand.

Resolves the project dir, computes the engine's unix socket path via the same deterministic hash the engine uses, connects, then relays bytes between stdio and the socket until either side closes.

Parameters
argcArgument count (after the "mcp-bridge" subcommand).
argvArgument vector. argv[0] is "mcp-bridge".
Returns
0 on clean exit, 1 if no engine is reachable.

Definition at line 275 of file mcp_bridge.cpp.

◆ run_version()

int entropic::cli::run_version ( )

Print the engine version and exit.

Returns
0.

Definition at line 20 of file version.cpp.