Run the native ollama CLI with a subcommand and arguments. Uses the system PATH to find ollama unless executablePath is set.
ollama
const result = await runOllamaCLI('pull', ['llama3.1:8b'], { onStderr: (c) => console.log(c) });const listResult = await runOllamaCLI('ls', []); Copy
const result = await runOllamaCLI('pull', ['llama3.1:8b'], { onStderr: (c) => console.log(c) });const listResult = await runOllamaCLI('ls', []);
Run the native
ollamaCLI with a subcommand and arguments. Uses the system PATH to findollamaunless executablePath is set.